Module is.codion.framework.domain
Interface EntityDefinition.PrimaryKey
- Enclosing interface:
- EntityDefinition
public static interface EntityDefinition.PrimaryKey
Holds the primary key definition for an entity type
-
Method Summary
Modifier and TypeMethodDescriptionList<ColumnDefinition<?>>
Returns a list containing the definitions of all primary key columns associated with this entity type.columns()
Returns a list containing all primary key columns associated with this entity type.boolean
Returns true if the value for the primary key of this entity is generated with aKeyGenerator
.
-
Method Details
-
columns
Returns a list containing all primary key columns associated with this entity type. If the entity has no primary key columns defined, an empty list is returned.- Returns:
- the primary key columns of this entity type, sorted by primary key column index
-
columnDefinitions
List<ColumnDefinition<?>> columnDefinitions()Returns a list containing the definitions of all primary key columns associated with this entity type. If the entity has no primary key columns defined, an empty list is returned.- Returns:
- the primary key column definitions of this entity type, sorted by primary key column index
-
generator
KeyGenerator generator()- Returns:
- the object responsible for generating primary key values for entities of this type
- See Also:
-
generated
boolean generated()Returns true if the value for the primary key of this entity is generated with aKeyGenerator
.- Returns:
- true if the value for the primary key is generated
- See Also:
-