Uses of Interface
is.codion.framework.domain.entity.Entity.Key
Packages that use Entity.Key
Package
Description
Package configuration values:
EntityConnectionProvider.CLIENT_DOMAIN_TYPE
EntityConnectionProvider.CLIENT_CONNECTION_TYPE
Package configuration values:
EntityValidator.STRICT_VALIDATION
Entities.VALIDATE_FOREIGN_KEYS
Entities.STRICT_DESERIALIZATION
AttributeDefinition.MAXIMUM_FRACTION_DIGITS
AttributeDefinition.TIME_FORMAT
AttributeDefinition.NUMBER_FORMAT_GROUPING
AttributeDefinition.GROUPING_SEPARATOR
AttributeDefinition.DECIMAL_SEPARATOR
AttributeDefinition.USE_LEXICAL_STRING_COMPARATOR
AttributeDefinition.DATE_TIME_FORMAT
AttributeDefinition.DATE_FORMAT
AttributeDefinition.DECIMAL_ROUNDING_MODE
ForeignKeyDefinition.FOREIGN_KEY_REFERENCE_DEPTH
Provides a type-safe condition API for building SQL WHERE clauses programmatically.
Package configuration values:
EntityApplicationModel.USERNAME_PREFIX
EntityApplicationModel.SAVE_DEFAULT_USERNAME
EntityEditModel.POST_EDIT_EVENTS
EntityEditModel.EntityEditor.PERSIST_FOREIGN_KEYS
EntityQueryModel.LIMIT
EntityTableModel.ON_INSERT
EntityTableModel.HANDLE_EDIT_EVENTS
EntityTableModel.ORDER_QUERY_BY_SORT_ORDER
ForeignKeyModelLink.SET_CONDITION_ON_INSERT
ForeignKeyModelLink.SET_VALUE_ON_INSERT
ForeignKeyModelLink.REFRESH_ON_SELECTION
ForeignKeyModelLink.CLEAR_CONDITION_ON_EMPTY_SELECTION
ForeignKeyModelLink.CLEAR_VALUE_ON_EMPTY_SELECTION
EntitySearchModel.DEFAULT_LIMIT
Package configuration values:
EntityComboBoxModel.HANDLE_EDIT_EVENTS
-
Uses of Entity.Key in is.codion.framework.db
Methods in is.codion.framework.db that return Entity.KeyModifier and TypeMethodDescriptionInserts the given entity, returning the primary key.Methods in is.codion.framework.db that return types with arguments of type Entity.KeyModifier and TypeMethodDescriptionEntityConnection.insert
(Collection<Entity> entities) Inserts the given entities, returning the primary keys.Methods in is.codion.framework.db with parameters of type Entity.KeyModifier and TypeMethodDescriptionvoid
EntityConnection.delete
(Entity.Key key) Deletes the entity with the given primary key.EntityConnection.select
(Entity.Key key) Selects an entity by keyMethod parameters in is.codion.framework.db with type arguments of type Entity.KeyModifier and TypeMethodDescriptionvoid
EntityConnection.delete
(Collection<Entity.Key> keys) Deletes the entities with the given primary keys.EntityConnection.BatchInsert.Builder.onInsert
(Consumer<Collection<Entity.Key>> onInsert) EntityConnection.select
(Collection<Entity.Key> keys) Selects entities based on the givenkeys
-
Uses of Entity.Key in is.codion.framework.db.rmi
Methods in is.codion.framework.db.rmi that return Entity.KeyModifier and TypeMethodDescriptionInserts the given entity, returning the primary key.Methods in is.codion.framework.db.rmi that return types with arguments of type Entity.KeyModifier and TypeMethodDescriptionRemoteEntityConnection.insert
(Collection<Entity> entities) Inserts the given entities, returning the primary keys in the same order as they were received.Methods in is.codion.framework.db.rmi with parameters of type Entity.KeyModifier and TypeMethodDescriptionvoid
RemoteEntityConnection.delete
(Entity.Key key) Deletes an entity according to the given primary key.RemoteEntityConnection.select
(Entity.Key key) Selects an entity by keyMethod parameters in is.codion.framework.db.rmi with type arguments of type Entity.KeyModifier and TypeMethodDescriptionvoid
RemoteEntityConnection.delete
(Collection<Entity.Key> keys) Deletes the entities with the given primary keys.RemoteEntityConnection.select
(Collection<Entity.Key> keys) Selects entities based on the givenkeys
-
Uses of Entity.Key in is.codion.framework.domain.entity
Methods in is.codion.framework.domain.entity that return Entity.KeyModifier and TypeMethodDescriptionEntity.Key.Builder.build()
Builds the key instanceEntity.key
(ForeignKey foreignKey) Returns the key referenced by the givenForeignKey
, if the reference is null this method returns null.Entity.originalPrimaryKey()
Returns the primary key of this entity, in its original state.final <T> Entity.Key
DefaultEntities.primaryKey
(EntityType entityType, T value) <T> Entity.Key
Entities.primaryKey
(EntityType entityType, @Nullable T value) Creates a newEntity.Key
instance of the given entityType, initialised with the given valueEntities entities = domain.entities(); // Create a single-value primary key Entity.Key customerKey = entities.primaryKey(Customer.TYPE, 42); // Use the key to fetch an entity Entity customer = connection.selectSingle(customerKey); // Keys can be compared Entity.Key anotherKey = entities.primaryKey(Customer.TYPE, 42); customerKey.equals(anotherKey); // true // Null values are allowed Entity.Key nullKey = entities.primaryKey(Customer.TYPE, null);
Entity.primaryKey()
Returns the primary key of this entity.<T> Entity.Key
EntityDefinition.primaryKey
(T value) Creates a newEntity.Key
instance based on this definition, initialised with the given valueMethods in is.codion.framework.domain.entity that return types with arguments of type Entity.KeyModifier and TypeMethodDescriptionstatic LinkedHashMap
<EntityType, List<Entity.Key>> Entity.Key.groupByType
(Collection<Entity.Key> keys) Returns a LinkedHashMap containing the given entity keys mapped to their entityTypes, respecting the iteration order of the given collectionstatic Collection
<Entity.Key> Entity.keys
(ForeignKey foreignKey, Collection<Entity> entities) Returns the non-null keys referenced by the givenForeignKey
static Collection
<Entity.Key> Entity.originalPrimaryKeys
(Collection<Entity> entities) Returns the primary keys of the given entities with their original values.static Map
<Entity.Key, Entity> Entity.primaryKeyMap
(Collection<Entity> entities) Maps the given entities to their primary key, assuming each entity appears only once in the given collection.final <T> List
<Entity.Key> DefaultEntities.primaryKeys
(EntityType entityType, T... values) <T> List
<Entity.Key> Entities.primaryKeys
(EntityType entityType, T... values) Creates newEntity.Key
instances of the given entityType, initialised with the given valuesEntities entities = domain.entities(); // Create multiple keys at once List<Entity.Key> customerKeys = entities.primaryKeys(Customer.TYPE, 1, 2, 3, 4, 5); // Fetch multiple entities List<Entity> customers = connection.select(customerKeys); // Varargs syntax allows flexible usage List<Entity.Key> keys = entities.primaryKeys(Order.TYPE, "ORD-001", "ORD-002", "ORD-003");
static Collection
<Entity.Key> Entity.primaryKeys
(Collection<Entity> entities) Returns the primary keys of the given entities.Methods in is.codion.framework.domain.entity with parameters of type Entity.KeyModifier and TypeMethodDescriptionstatic Entity.Builder
Entity.builder
(Entity.Key key) static Entity
Entity.entity
(Entity.Key key) Method parameters in is.codion.framework.domain.entity with type arguments of type Entity.KeyModifier and TypeMethodDescriptionstatic LinkedHashMap
<EntityType, List<Entity.Key>> Entity.Key.groupByType
(Collection<Entity.Key> keys) Returns a LinkedHashMap containing the given entity keys mapped to their entityTypes, respecting the iteration order of the given collectionstatic <T> Collection
<T> Entity.values
(Collection<Entity.Key> keys) Retrieves the values of the given keys, assuming they are single column keys. -
Uses of Entity.Key in is.codion.framework.domain.entity.condition
Methods in is.codion.framework.domain.entity.condition with parameters of type Entity.KeyModifier and TypeMethodDescriptionstatic Condition
Condition.key
(Entity.Key key) Creates aCondition
based on the given keyMethod parameters in is.codion.framework.domain.entity.condition with type arguments of type Entity.KeyModifier and TypeMethodDescriptionstatic Condition
Condition.keys
(Collection<Entity.Key> keys) Creates aCondition
based on the given keys. -
Uses of Entity.Key in is.codion.framework.json.domain
Fields in is.codion.framework.json.domain with type parameters of type Entity.KeyModifier and TypeFieldDescriptionstatic final com.fasterxml.jackson.core.type.TypeReference
<List<Entity.Key>> EntityObjectMapper.KEY_LIST_REFERENCE
Methods in is.codion.framework.json.domain that return types with arguments of type Entity.KeyModifier and TypeMethodDescriptionEntityObjectMapper.deserializeKeys
(InputStream inputStream) Deserializes the given JSON input stream into a list of Key instancesEntityObjectMapper.deserializeKeys
(String jsonString) Deserializes the given JSON string into a list of Key instances -
Uses of Entity.Key in is.codion.framework.model
Method parameters in is.codion.framework.model with type arguments of type Entity.KeyModifier and TypeMethodDescriptionfinal void
AbstractEntityTableModel.refresh
(Collection<Entity.Key> keys) void
EntityTableModel.refresh
(Collection<Entity.Key> keys) Refreshes the entities with the given keys by re-selecting them from the underlying database.final void
AbstractEntityTableModel.select
(Collection<Entity.Key> keys) void
EntityTableModel.select
(Collection<Entity.Key> keys) Selects entities according to the primary keys inprimaryKeys
protected void
AbstractEntityEditModel.updated
(ForeignKey foreignKey, Map<Entity.Key, Entity> entities) Called when entities of the type referenced by the given foreign key have been updated.protected void
AbstractEntityTableModel.updated
(ForeignKey foreignKey, Map<Entity.Key, Entity> entities) Called when entities of the type referenced by the given foreign key are updated -
Uses of Entity.Key in is.codion.swing.framework.model.component
Methods in is.codion.swing.framework.model.component that return types with arguments of type Entity.KeyMethods in is.codion.swing.framework.model.component with parameters of type Entity.KeyModifier and TypeMethodDescriptionEntityComboBoxModel.find
(Entity.Key primaryKey) void
EntityComboBoxModel.select
(Entity.Key primaryKey) Selects the entity with the given primary key, whether filtered or visible.void
EntityComboBoxModel.ForeignKeyFilter.set
(Entity.Key key) Filters the combo box model so that only items referencing the given key are visible.Method parameters in is.codion.swing.framework.model.component with type arguments of type Entity.KeyModifier and TypeMethodDescriptionvoid
EntityComboBoxModel.ForeignKeyFilter.set
(Collection<Entity.Key> keys) Filters the combo box model so that only items referencing the given keys are visible.