Interface Based Column
public final class InterfaceBasedColumn extends AbstractColumn implements ColumnDeclaredInProto, ColumnWithCustomGetter
A column declared with the help of io.spine.base.EntityWithColumns-derived interface.
An interface-based column is:
- Declared in Protobuf with
(column)
option:int32 year_of_registration = 8 [(column) = true];
Content copied to clipboard - Implemented using custom Spine-generated interface:
interface UserProfileWithColumns extends EntityWithColumns { int getYearOfRegistration(); } // ... class UserProfileProjection extends Projection<UserId, UserProfile, UserProfile.Builder> implements UserProfileWithColumns { @Override public int getYearOfRegistration() { return yearOfRegistration; } }
Content copied to clipboard - Extracted from the entity and propagated to the entity state at the moment of transaction commit. The column value is finalized by this moment.