Uses of Interface
is.codion.framework.domain.entity.Entity
Packages that use Entity
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
Attribute related classes.
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
Package configuration values:
EntityApplicationPanel.HELP_URL
EntityApplicationPanel.CONFIRM_EXIT
EntityApplicationPanel.SHOW_STARTUP_DIALOG
EntityApplicationPanel.CACHE_ENTITY_PANELS
EntityApplicationPanel.USER_PREFERENCES_ENABLED
EntityApplicationPanel.RESTORE_DEFAULT_PREFERENCES
EntityApplicationPanel.CALL_SYSTEM_EXIT
EntityEditComponentPanel.VALID_INDICATOR
EntityEditComponentPanel.MODIFIED_INDICATOR
EntityEditComponentPanel.DEFAULT_TEXT_FIELD_COLUMNS
EntityEditPanel.Config.USE_SAVE_CAPTION
EntityEditPanel.Config.USE_FOCUS_ACTIVATION
EntityEditPanel.Config.INCLUDE_ENTITY_MENU
EntityEditPanel.Config.MODIFIED_WARNING
EntityPanel.Config.USE_KEYBOARD_NAVIGATION
EntityPanel.Config.DISPOSE_EDIT_DIALOG_ON_ESCAPE
EntityPanel.Config.INCLUDE_TOGGLE_EDIT_PANEL_CONTROL
EntityPanel.Config.TOOLBAR_CONTROLS
EntityPanel.Config.CONTROL_PANEL_CONSTRAINTS
EntityPanel.Config.CONTROL_TOOLBAR_CONSTRAINTS
EntityPanel.Config.WINDOW_TYPE
EntityTablePanel.Config.EXCLUDE_HIDDEN_COLUMNS
EntityTablePanel.Config.CONDITION_VIEW
EntityTablePanel.Config.FILTER_VIEW
EntityTablePanel.Config.SUMMARY_PANEL_VISIBLE
EntityTablePanel.Config.INCLUDE_POPUP_MENU
EntityTablePanel.Config.INCLUDE_ENTITY_MENU
EntityTablePanel.Config.INCLUDE_QUERY_INSPECTOR
EntityTablePanel.Config.INCLUDE_CLEAR_CONTROL
EntityTablePanel.Config.INCLUDE_LIMIT_MENU
EntityTablePanel.Config.REFRESH_BUTTON_VISIBLE
EntityTablePanel.Config.COLUMN_SELECTION
EntityTablePanel.Config.INCLUDE_CONDITIONS
EntityTablePanel.Config.INCLUDE_FILTERS
EntityTablePanel.Config.INCLUDE_SUMMARY
EntityTablePanel.Config.REFRESH_PROGRESS_BAR
ReferentialIntegrityErrorHandling.REFERENTIAL_INTEGRITY_ERROR_HANDLING
TabbedApplicationLayout.TAB_PLACEMENT
TabbedDetailLayout.INCLUDE_CONTROLS
Package configuration values:
EntitySearchField.SEARCH_INDICATOR
DefaultEditComponentFactory.DEFAULT_TEXT_FIELD_COLUMNS
-
Uses of Entity in is.codion.framework.db
Methods in is.codion.framework.db that return EntityModifier and TypeMethodDescriptionEntityConnection.insertSelect
(Entity entity) Inserts the given entity, returning the inserted entity.EntityConnection.select
(Entity.Key key) Selects an entity by keyEntityConnection.selectSingle
(EntityConnection.Select select) Selects a single entity based on the specified selectEntityConnection.selectSingle
(Condition condition) Selects a single entity based on the specified conditionEntityConnection.updateSelect
(Entity entity) Updates the given entity based on its attribute values.Methods in is.codion.framework.db that return types with arguments of type EntityModifier and TypeMethodDescriptionEntityConnection.dependencies
(Collection<Entity> entities) Selects the entities that depend on the given entities via (non-soft) foreign keys, mapped to corresponding entityTypesEntityConnection.insertSelect
(Collection<Entity> entities) Inserts the given entities, returning the inserted entities.EntityConnection.select
(EntityConnection.Select select) Selects entities based on the given select// Select with ordering and limit List<Entity> recentInvoices = connection.select( Select.where(Invoice.CUSTOMER_FK.equalTo(customer)) .orderBy(OrderBy.descending(Invoice.DATE)) .limit(10) .build() ); // Select specific attributes only List<Entity> trackInfo = connection.select( Select.where(Track.ALBUM_FK.equalTo(album)) .attributes(Track.NAME, Track.MILLISECONDS) .build() ); // Control foreign key fetching depth List<Entity> tracks = connection.select( Select.where(Track.GENRE_FK.equalTo(genre)) .referenceDepth(0) // Don't fetch foreign keys .build() );
Selects entities based on the given condition// Select all jazz albums Entity jazz = connection.selectSingle(Genre.NAME.equalTo("Jazz")); List<Entity> jazzTracks = connection.select(Track.GENRE_FK.equalTo(jazz)); // Select with composite condition List<Entity> longExpensiveTracks = connection.select(and( Track.UNITPRICE.greaterThan(0.99), Track.MILLISECONDS.greaterThan(300_000) ));
EntityConnection.select
(Collection<Entity.Key> keys) Selects entities based on the givenkeys
EntityConnection.updateSelect
(Collection<Entity> entities) Updates the given entities based on their attribute values.Methods in is.codion.framework.db with parameters of type EntityModifier and TypeMethodDescriptionInserts the given entity, returning the primary key.EntityConnection.insertSelect
(Entity entity) Inserts the given entity, returning the inserted entity.void
Updates the given entity based on its attribute values.Note that the query returned by this method is only guaranteed to be valid if the the given entity is modified.EntityConnection.updateSelect
(Entity entity) Updates the given entity based on its attribute values.Method parameters in is.codion.framework.db with type arguments of type EntityModifier and TypeMethodDescriptionEntityConnection.batchInsert
(EntityConnection connection, Iterator<Entity> entities) Creates a newEntityConnection.BatchInsert
instance based on the given iterator, with a default batch size of 100.EntityConnection.dependencies
(Collection<Entity> entities) Selects the entities that depend on the given entities via (non-soft) foreign keys, mapped to corresponding entityTypesEntityConnection.insert
(Collection<Entity> entities) Inserts the given entities, returning the primary keys.EntityConnection.insertSelect
(Collection<Entity> entities) Inserts the given entities, returning the inserted entities.void
EntityConnection.update
(Collection<Entity> entities) Updates the given entities based on their attribute values.EntityConnection.updateSelect
(Collection<Entity> entities) Updates the given entities based on their attribute values. -
Uses of Entity in is.codion.framework.db.local
Methods in is.codion.framework.db.local that return types with arguments of type EntityModifier and TypeMethodDescriptionLocalEntityConnection.iterator
(EntityConnection.Select select) Returns a result set iterator based on the given select.Returns a result set iterator based on the given query condition. -
Uses of Entity in is.codion.framework.db.rmi
Methods in is.codion.framework.db.rmi that return EntityModifier and TypeMethodDescriptionRemoteEntityConnection.insertSelect
(Entity entity) Inserts the given entity, returning the inserted etity.RemoteEntityConnection.select
(Entity.Key key) Selects an entity by keyRemoteEntityConnection.selectSingle
(EntityConnection.Select select) Selects a single entity based on the specified selectRemoteEntityConnection.selectSingle
(Condition condition) Selects a single entity based on the specified conditionRemoteEntityConnection.updateSelect
(Entity entity) Updates the given entity based on its attribute values.Methods in is.codion.framework.db.rmi that return types with arguments of type EntityModifier and TypeMethodDescriptionRemoteEntityConnection.dependencies
(Collection<Entity> entities) Selects the entities that depend on the given entities via (non-soft) foreign keys, mapped to corresponding entityTypesRemoteEntityConnection.insertSelect
(Collection<Entity> entities) Inserts the given entities, returning the inserted entities.RemoteEntityConnection.select
(EntityConnection.Select select) Selects entities based on the given selectSelects entities based on the given conditionRemoteEntityConnection.select
(Collection<Entity.Key> keys) Selects entities based on the givenkeys
RemoteEntityConnection.updateSelect
(Collection<Entity> entities) Updates the given entities based on their attribute values.Methods in is.codion.framework.db.rmi with parameters of type EntityModifier and TypeMethodDescriptionInserts the given entity, returning the primary key.RemoteEntityConnection.insertSelect
(Entity entity) Inserts the given entity, returning the inserted etity.void
Updates the given entity based on its attribute values.RemoteEntityConnection.updateSelect
(Entity entity) Updates the given entity based on its attribute values.Method parameters in is.codion.framework.db.rmi with type arguments of type EntityModifier and TypeMethodDescriptionRemoteEntityConnection.dependencies
(Collection<Entity> entities) Selects the entities that depend on the given entities via (non-soft) foreign keys, mapped to corresponding entityTypesRemoteEntityConnection.insert
(Collection<Entity> entities) Inserts the given entities, returning the primary keys in the same order as they were received.RemoteEntityConnection.insertSelect
(Collection<Entity> entities) Inserts the given entities, returning the inserted entities.void
RemoteEntityConnection.update
(Collection<Entity> entities) Updates the given entities based on their attribute values.RemoteEntityConnection.updateSelect
(Collection<Entity> entities) Updates the given entities based on their attribute values. -
Uses of Entity in is.codion.framework.domain.entity
Methods in is.codion.framework.domain.entity that return EntityModifier and TypeMethodDescriptionEntity.Builder.build()
Builds the Entity instancefinal Entity
DefaultEntities.entity
(EntityType entityType) Entities.entity
(EntityType entityType) Creates a new emptyEntity
instance of the given entityTypeEntities entities = domain.entities(); // Create an empty entity Entity customer = entities.entity(Customer.TYPE); // Set values individually customer.set(Customer.NAME, "John Doe"); customer.set(Customer.EMAIL, "john@example.com"); // The entity is mutable and tracks changes customer.set(Customer.NAME, "John Lennon"); customer.modified(Customer.NAME); // true
Entity.entity
(ForeignKey foreignKey) Returns the Entity instance referenced by the givenForeignKey
.static Entity
Entity.entity
(Entity.Key key) EntityDefinition.entity()
Creates a newEntity
instance based on this definitionCreates a newEntity
instance based on this definitionCreates a newEntity
instance based on this definitionEntity.immutable()
Returns an immutable version of this entity, all foreign key entities are also immutable.Entity.Copy.mutable()
Returns a mutable copy of this entity.Methods in is.codion.framework.domain.entity that return types with arguments of type EntityModifier and TypeMethodDescriptionStringFactory.Builder.build()
EntityDefinition.comparator()
EntityType.entityAttribute
(String name) Creates a newAttribute
, associated with this EntityType.EntityDefinition.exists()
The default exists predicate returns true if the entity has a non-null original primary key, which is a best-guess about an entity existing in a database.static LinkedHashMap
<EntityType, List<Entity>> Entity.groupByType
(Collection<Entity> entities) Returns aLinkedHashMap
containing the given entities mapped to their entityTypes, respecting the iteration order of the given collectionstatic <T> LinkedHashMap
<T, List<Entity>> Entity.groupByValue
(Attribute<T> attribute, Collection<Entity> entities) Returns aLinkedHashMap
containing the given entities mapped to the value ofattribute
, respecting the iteration order of the given collectionList<Entity> orders = connection.select(all(Order.TYPE)); // Group orders by status LinkedHashMap<String, List<Entity>> ordersByStatus = Entity.groupByValue(Order.STATUS, orders); // Process orders by status ordersByStatus.forEach((status, statusOrders) -> { System.out.println("Status: " + status + ", Count: " + statusOrders.size()); }); // Groups can contain entities with null values List<Entity> pendingOrders = ordersByStatus.get("PENDING"); List<Entity> nullStatusOrders = ordersByStatus.get(null);
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.EntityDefinition.stringFactory()
Returns the function responsible for providing toString values for this entity type.Methods in is.codion.framework.domain.entity with parameters of type EntityModifier and TypeMethodDescriptiondefault void
KeyGenerator.afterInsert
(Entity entity, DatabaseConnection connection, Statement insertStatement) Prepares the given entity after insert, that is, fetches automatically generated primary key values and populates the entity's primary key.default void
KeyGenerator.beforeInsert
(Entity entity, DatabaseConnection connection) Prepares the given entity for insert, that is, generates and fetches any required primary key values and populates the entity's primary key.boolean
Entity.equalValues
(Entity entity) Compares the values of all attributes in the given entity to the values in this entity instance.boolean
Entity.equalValues
(Entity entity, Collection<? extends Attribute<?>> attributes) Compares the values of the given attributes in the given entity to the values in this entity instance.<T> boolean
<T> boolean
Returns true if the value based on the given attribute accepts a null value for the given entity, by default this method simply returns the nullable state of the underlying attribute.After a call to this method this Entity contains the same values and original values as the source entity.final boolean
boolean
Returns true if the given entity contains only valid values.void
<T> void
void
Checks if the values in the given entity are valid.<T> void
Checks if the value associated with the give attribute is valid, throws a ValidationException if notMethod parameters in is.codion.framework.domain.entity with type arguments of type EntityModifier and TypeMethodDescriptionEntityDefinition.Builder.comparator
(Comparator<Entity> comparator) Sets the comparator to use when comparing entities of this typestatic <T> Collection
<T> Entity.distinct
(Attribute<T> attribute, Collection<Entity> entities) Returns the distinct non-null values ofattribute
from the given entities.Sets the predicate to use when checking if an entity of this type exists in the database.static LinkedHashMap
<EntityType, List<Entity>> Entity.groupByType
(Collection<Entity> entities) Returns aLinkedHashMap
containing the given entities mapped to their entityTypes, respecting the iteration order of the given collectionstatic <T> LinkedHashMap
<T, List<Entity>> Entity.groupByValue
(Attribute<T> attribute, Collection<Entity> entities) Returns aLinkedHashMap
containing the given entities mapped to the value ofattribute
, respecting the iteration order of the given collectionList<Entity> orders = connection.select(all(Order.TYPE)); // Group orders by status LinkedHashMap<String, List<Entity>> ordersByStatus = Entity.groupByValue(Order.STATUS, orders); // Process orders by status ordersByStatus.forEach((status, statusOrders) -> { System.out.println("Status: " + status + ", Count: " + statusOrders.size()); }); // Groups can contain entities with null values List<Entity> pendingOrders = ordersByStatus.get("PENDING"); List<Entity> nullStatusOrders = ordersByStatus.get(null);
static 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.static Collection
<Entity.Key> Entity.primaryKeys
(Collection<Entity> entities) Returns the primary keys of the given entities.EntityDefinition.Builder.stringFactory
(Function<Entity, String> stringFactory) Sets the string factory, that is, the function responsible for creating toString() values for this entity type.static <T> Collection
<T> Entity.values
(Attribute<T> attribute, Collection<Entity> entities) Returns the non-null values associated withattribute
from the given entities. -
Uses of Entity in is.codion.framework.domain.entity.attribute
Method parameters in is.codion.framework.domain.entity.attribute with type arguments of type EntityModifier and TypeMethodDescription<B extends DerivedAttributeDefinition.Builder<T,
B>>
DerivedAttributeDefinition.Builder<T, B> Attribute.AttributeDefiner.denormalized
(Attribute<Entity> entityAttribute, Attribute<T> denormalizedAttribute) Instantiates aDerivedAttributeDefinition.Builder
instance, for displaying a value from a referenced entity attribute. -
Uses of Entity in is.codion.framework.domain.entity.condition
Methods in is.codion.framework.domain.entity.condition with parameters of type EntityModifier and TypeMethodDescriptionReturns a 'equalTo'Condition
or 'isNull' in casevalue
is null.Returns an 'in'Condition
.ForeignKeyCondition.Factory.notEqualTo
(@Nullable Entity value) Returns a 'notEqualTo'Condition
or 'isNotNull' in casevalue
is null.Returns a 'notIn'Condition
.Method parameters in is.codion.framework.domain.entity.condition with type arguments of type EntityModifier and TypeMethodDescriptionForeignKeyCondition.Factory.in
(Collection<Entity> values) Returns an 'in'Condition
.ForeignKeyCondition.Factory.notIn
(Collection<Entity> values) Returns a 'notIn' condition. -
Uses of Entity in is.codion.framework.domain.test
Methods in is.codion.framework.domain.test that return EntityModifier and TypeMethodDescriptionDefaultEntityFactory.entity
(EntityType entityType) DomainTest.EntityFactory.entity
(EntityType entityType) Initializes the Entity instance on which to run the tests, by default this method creates an instance filled with random values.Methods in is.codion.framework.domain.test that return types with arguments of type EntityModifier and TypeMethodDescriptionDefaultEntityFactory.entity
(ForeignKey foreignKey) DomainTest.EntityFactory.entity
(ForeignKey foreignKey) Initializes an Entity instance to reference via the given foreign key.Methods in is.codion.framework.domain.test with parameters of type Entity -
Uses of Entity in is.codion.framework.json.domain
Fields in is.codion.framework.json.domain with type parameters of type EntityMethods in is.codion.framework.json.domain that return types with arguments of type EntityModifier and TypeMethodDescriptionEntityObjectMapper.deserializeEntities
(InputStream inputStream) Deserializes the given JSON input stream into a list of Entity instancesEntityObjectMapper.deserializeEntities
(String jsonString) Deserializes the given JSON string into a list of Entity instances -
Uses of Entity in is.codion.framework.model
Methods in is.codion.framework.model that return EntityModifier and TypeMethodDescriptionfinal Entity
AbstractEntityEditModel.delete()
EntityEditModel.delete()
Note: This method must be called on the UI thread in case a panel has been based on this model.EntityEditModel.EntityEditor.get()
final Entity
AbstractEntityEditModel.insert()
EntityEditModel.insert()
Note: This method must be called on the UI thread in case a panel has been based on this model.final Entity
AbstractEntityEditModel.update()
EntityEditModel.update()
Note: This method must be called on the UI thread in case a panel has been based on this model.Methods in is.codion.framework.model that return types with arguments of type EntityModifier and TypeMethodDescriptionfinal Observer
<Collection<Entity>> AbstractEntityEditModel.afterDelete()
EntityEditModel.afterDelete()
final Observer
<Collection<Entity>> AbstractEntityEditModel.afterInsert()
EntityEditModel.afterInsert()
AbstractEntityEditModel.afterUpdate()
AbstractEntityEditModel.afterUpdate()
EntityEditModel.afterUpdate()
EntityEditModel.afterUpdate()
final Observer
<Collection<Entity>> AbstractEntityEditModel.beforeDelete()
EntityEditModel.beforeDelete()
final Observer
<Collection<Entity>> AbstractEntityEditModel.beforeInsert()
EntityEditModel.beforeInsert()
final Observer
<Collection<Entity>> AbstractEntityEditModel.beforeUpdate()
EntityEditModel.beforeUpdate()
EntityEditModel.EntityEditor.changing()
EntityQueryModel.dataSource()
AValue
controlling the data source.final Collection
<Entity> AbstractEntityEditModel.delete
(Collection<Entity> entities) EntityEditModel.delete
(Collection<Entity> entities) Note: This method must be called on the UI thread in case a panel has been based on this model.EntityEditModel.EditEvents.deleted
(EntityType entityType) Returns deleteEntityEditModel.EditEvent
, notified each time entities of the given type are deleted.final Collection
<Entity> AbstractEntityTableModel.deleteSelected()
EntityTableModel.deleteSelected()
Deletes the selected entitiesEntitySearchModel.Selection.entities()
EntitySearchModel.Selection.entity()
protected FilterModel
<Entity> AbstractEntityTableModel.filterModel()
EntityEditModel.DeleteEntities.Result.handle()
Notifies listeners that delete has been performed.EntityEditModel.InsertEntities.Result.handle()
Notifies listeners that an insert has been performed.EntityEditModel.UpdateEntities.Result.handle()
Notifies listeners that an update has been performed.final Collection
<Entity> AbstractEntityEditModel.insert
(Collection<Entity> entities) protected Collection
<Entity> AbstractEntityEditModel.insert
(Collection<Entity> entities, EntityConnection connection) Inserts the given entities into the database using the given connectionEntityEditModel.insert
(Collection<Entity> entities) Note: This method must be called on the UI thread in case a panel has been based on this model.EntityEditModel.EditEvents.inserted
(EntityType entityType) Returns an insertEntityEditModel.EditEvent
, notified each time entities of the given type are inserted.EntityEditModel.EntityEditor.Exists.predicate()
Controls the 'exists' predicate for thisEntityEditModel.EntityEditor.Exists
instance, which is responsible for providing the exists state of the underlying entity.EntityEditModel.EntityEditor.Modified.predicate()
Controls the 'modified' predicate for thisEntityEditModel.EntityEditor.Modified
instance, which is responsible for providing the modified state of the underlying entity.EntityQueryModel.query()
Performs a query and returns the result.EntitySearchModel.Search.result()
Performs a query based on the current search configuration and returns the result.EntityTableModel.selection()
final Collection
<Entity> AbstractEntityEditModel.update
(Collection<Entity> entities) protected Collection
<Entity> AbstractEntityEditModel.update
(Collection<Entity> entities, EntityConnection connection) Updates the given entities in the database using the given connectionEntityEditModel.update
(Collection<Entity> entities) Note: This method must be called on the UI thread in case a panel has been based on this model.EntityEditModel.EditEvents.updated
(EntityType entityType) Returns an updateEntityEditModel.EditEvent
, notified each time entities of the given type are updated.EntityEditModel.EditEvents.updated
(EntityType entityType) Returns an updateEntityEditModel.EditEvent
, notified each time entities of the given type are updated.Methods in is.codion.framework.model with parameters of type EntityModifier and TypeMethodDescriptionvoid
Populates this editor with the values from the given entity or sets the default value for all attributes in case it is null.void
Validates the given entity, using the underlying validator.Method parameters in is.codion.framework.model with type arguments of type EntityModifier and TypeMethodDescription<T> void
AbstractEntityEditModel.applyEdit
(Collection<Entity> entities, Attribute<T> attribute, T value) <T> void
EntityEditModel.applyEdit
(Collection<Entity> entities, Attribute<T> attribute, T value) Applies the given value to the given entities.AbstractEntityEditModel.createDelete
(Collection<Entity> entities) EntityEditModel.createDelete
(Collection<Entity> entities) Creates a newEntityEditModel.DeleteEntities
instance for deleting the given entities.AbstractEntityEditModel.createInsert
(Collection<Entity> entities) EntityEditModel.createInsert
(Collection<Entity> entities) Creates a newEntityEditModel.InsertEntities
instance for inserting the given entities.AbstractEntityEditModel.createUpdate
(Collection<Entity> entities) EntityEditModel.createUpdate
(Collection<Entity> entities) Creates a newEntityEditModel.UpdateEntities
instance for updating the given entities.final Collection
<Entity> AbstractEntityEditModel.delete
(Collection<Entity> entities) protected void
AbstractEntityEditModel.delete
(Collection<Entity> entities, EntityConnection connection) Deletes the given entities from the database using the given connectionEntityEditModel.delete
(Collection<Entity> entities) Note: This method must be called on the UI thread in case a panel has been based on this model.protected void
AbstractEntityEditModel.deleted
(ForeignKey foreignKey, Collection<Entity> entities) Called when entities of the type referenced by the given foreign key are deleted.final Collection
<Entity> AbstractEntityEditModel.insert
(Collection<Entity> entities) protected Collection
<Entity> AbstractEntityEditModel.insert
(Collection<Entity> entities, EntityConnection connection) Inserts the given entities into the database using the given connectionEntityEditModel.insert
(Collection<Entity> entities) Note: This method must be called on the UI thread in case a panel has been based on this model.protected void
AbstractEntityEditModel.inserted
(ForeignKey foreignKey, Collection<Entity> entities) Called when entities of the type referenced by the given foreign key are inserted.protected final void
AbstractEntityEditModel.notifyAfterDelete
(Collection<Entity> deletedEntities) Notifies that delete has been performedprotected final void
AbstractEntityEditModel.notifyAfterInsert
(Collection<Entity> insertedEntities) Notifies that insert has been performedprotected final void
AbstractEntityEditModel.notifyAfterUpdate
(Map<Entity, Entity> updatedEntities) Notifies that update has been performedprotected final void
AbstractEntityEditModel.notifyAfterUpdate
(Map<Entity, Entity> updatedEntities) Notifies that update has been performedprotected final void
AbstractEntityEditModel.notifyBeforeDelete
(Collection<Entity> entitiesToDelete) Notifies that delete is about to be performedprotected final void
AbstractEntityEditModel.notifyBeforeInsert
(Collection<Entity> entitiesToInsert) Notifies that insert is about to be performedprotected final void
AbstractEntityEditModel.notifyBeforeUpdate
(Collection<Entity> entitiesToUpdate) Notifies that update is about to be performedModelLink.Builder.onDelete
(Consumer<Collection<Entity>> onDelete) void
ModelLink.onDelete
(Collection<Entity> deletedEntities) Called when delete is performed in the parent model, regardless of entity type.ForeignKeyModelLink.Builder.onInsert
(Consumer<Collection<Entity>> onInsert) Note that this overridesForeignKeyModelLink.Builder.setValueOnInsert(boolean)
ModelLink.Builder.onInsert
(Consumer<Collection<Entity>> onInsert) void
ModelLink.onInsert
(Collection<Entity> insertedEntities) Called when insert is performed in the parent model, regardless of entity type.ForeignKeyModelLink.Builder.onSelection
(Consumer<Collection<Entity>> onSelection) Note that this overridesForeignKeyModelLink.Builder.refreshOnSelection(boolean)
,ForeignKeyModelLink.Builder.clearConditionOnEmptySelection(boolean)
andForeignKeyModelLink.Builder.clearValueOnEmptySelection(boolean)
Note that only active model links respond to parent model selection by default.ModelLink.Builder.onSelection
(Consumer<Collection<Entity>> onSelection) Note that only active model links respond to parent model selection by default.void
ModelLink.onSelection
(Collection<Entity> selectedEntities) Called when the selection changes in the parent model or when this link is activated.void
Called when an update is performed in the parent model, regardless of entity type.void
Called when an update is performed in the parent model, regardless of entity type.final void
AbstractEntityTableModel.replace
(Collection<Entity> entities) void
EntityTableModel.replace
(Collection<Entity> entities) Replaces the given entities in this table modelfinal Collection
<Entity> AbstractEntityEditModel.update
(Collection<Entity> entities) protected Collection
<Entity> AbstractEntityEditModel.update
(Collection<Entity> entities, EntityConnection connection) Updates the given entities in the database using the given connectionEntityEditModel.update
(Collection<Entity> entities) Note: This method must be called on the UI thread in case a panel has been based on this model.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 updatedvoid
EntityEditModel.EntityEditor.validate
(Collection<Entity> entities) Validates the given entities, using the underlying validator.Constructor parameters in is.codion.framework.model with type arguments of type EntityModifierConstructorDescriptionprotected
AbstractEntityTableModel
(E editModel, FilterModel<Entity> filterModel) protected
AbstractEntityTableModel
(E editModel, FilterModel<Entity> filterModel, EntityQueryModel queryModel) -
Uses of Entity in is.codion.framework.model.test
Fields in is.codion.framework.model.test with type parameters of type Entity -
Uses of Entity in is.codion.swing.framework.model
Methods in is.codion.swing.framework.model that return types with arguments of type EntityModifier and TypeMethodDescriptionfinal FilterTableModel.TableColumns
<Entity, Attribute<?>> SwingEntityTableModel.columns()
protected final FilterTableModel
<Entity, Attribute<?>> SwingEntityTableModel.filterModel()
final FilterModel.Items
<Entity> SwingEntityTableModel.items()
final FilterListSelection
<Entity> SwingEntityTableModel.selection()
final FilterTableSort
<Entity, Attribute<?>> SwingEntityTableModel.sort()
Methods in is.codion.swing.framework.model with parameters of type EntityModifier and TypeMethodDescriptionprotected boolean
Returns true if the given attribute is editable for the given entity.Constructor parameters in is.codion.swing.framework.model with type arguments of type EntityModifierConstructorDescriptionSwingEntityTableModel
(EntityType entityType, Collection<Entity> entities, EntityConnectionProvider connectionProvider) Instantiates a new SwingEntityTableModel containing the given entites.SwingEntityTableModel
(Collection<Entity> entities, EntityConnectionProvider connectionProvider) Instantiates a new SwingEntityTableModel containing the given entites. -
Uses of Entity in is.codion.swing.framework.model.component
Methods in is.codion.swing.framework.model.component that return types with arguments of type EntityModifier and TypeMethodDescriptionEntityComboBoxModel.find
(Entity.Key primaryKey) EntityComboBoxModel.Filter.predicate()
Controls the additional filter predicate, which is tested for items that pass all foreign key filtersMethod parameters in is.codion.swing.framework.model.component with type arguments of type EntityModifier and TypeMethodDescriptionEntityComboBoxModel.Builder.comparator
(Comparator<Entity> comparator) Note that this comparator is not used ifEntityComboBoxModel.Builder.orderBy(OrderBy)
has been specified. -
Uses of Entity in is.codion.swing.framework.ui
Methods in is.codion.swing.framework.ui with type parameters of type EntityModifier and TypeMethodDescriptionprotected final <B extends TextFieldBuilder<Entity,
JTextField, B>>
TextFieldBuilder<Entity, JTextField, B> EntityEditComponentPanel.createTextField
(ForeignKey foreignKey) Creates a builder for a read-only, non-focusable foreign key text field.Methods in is.codion.swing.framework.ui that return types with arguments of type EntityModifier and TypeMethodDescriptionstatic <T> FilterTableCellRenderer.Builder
<Entity, Attribute<?>, T> EntityTableCellRenderer.builder
(Attribute<T> attribute, SwingEntityTableModel tableModel) protected final <B extends TextFieldBuilder<Entity,
JTextField, B>>
TextFieldBuilder<Entity, JTextField, B> EntityEditComponentPanel.createTextField
(ForeignKey foreignKey) Creates a builder for a read-only, non-focusable foreign key text field.EntityDialogs.EntitySelectionDialogBuilder.select()
Displays theEntityTablePanel
for selecting one or more entitiesEntityDialogs.EntitySelectionDialogBuilder.selectSingle()
Displays theEntityTablePanel
for selecting a single entityfinal FilterTable
<Entity, Attribute<?>> EntityTablePanel.table()
Methods in is.codion.swing.framework.ui with parameters of type EntityModifier and TypeMethodDescriptionEntityTableCellRenderer.EntityColorProvider.color
(FilterTable<Entity, Attribute<?>> table, Entity entity, Attribute<?> attribute, T value) void
Displays a dialog for editing a single attribute for the given entityMethod parameters in is.codion.swing.framework.ui with type arguments of type EntityModifier and TypeMethodDescriptionEntityTableCellRenderer.EntityColorProvider.color
(FilterTable<Entity, Attribute<?>> table, Entity entity, Attribute<?> attribute, T value) default FilterTableCellRenderer
<?> EntityTableCellRenderer.Factory.create
(Attribute<?> attribute, FilterTableModel<Entity, Attribute<?>> tableModel) EntityDialogs.EditAttributeDialogBuilder.defaultValue
(Function<Collection<Entity>, T> defaultValue) Provides the default value presented in the edit component.void
EntityDialogs.EditAttributeDialogBuilder.edit
(Collection<Entity> entities) Displays a dialog for editing a single attribute for the given entitiesEntityEditPanel.DeleteCommand.Builder.onDelete
(Consumer<Collection<Entity>> onDelete) EntityEditPanel.InsertCommand.Builder.onInsert
(Consumer<Collection<Entity>> onInsert) EntityEditPanel.UpdateCommand.Builder.onUpdate
(Consumer<Collection<Entity>> onUpdate) EntityTablePanel.Config.table
(Consumer<FilterTable.Builder<Entity, Attribute<?>>> builder) Provides access to the builder for the underlyingFilterTable
-
Uses of Entity in is.codion.swing.framework.ui.component
Methods in is.codion.swing.framework.ui.component with type parameters of type EntityModifier and TypeMethodDescription<B extends TextFieldBuilder<Entity,
JTextField, B>>
TextFieldBuilder<Entity, JTextField, B> EntityComponents.textField
(ForeignKey foreignKey) Methods in is.codion.swing.framework.ui.component that return types with arguments of type EntityModifier and TypeMethodDescriptionEntitySearchField.ListSelector.list()
EntitySearchField.TableSelector.table()
<B extends TextFieldBuilder<Entity,
JTextField, B>>
TextFieldBuilder<Entity, JTextField, B> EntityComponents.textField
(ForeignKey foreignKey) Method parameters in is.codion.swing.framework.ui.component with type arguments of type EntityModifier and TypeMethodDescriptionstatic EntityComboBox.Builder
EntityComboBox.builder
(EntityComboBoxModel comboBoxModel, Value<Entity> linkedValue) Instantiates a newEntityComboBox
builderstatic EntityComboBoxPanel.Builder
EntityComboBoxPanel.builder
(EntityComboBoxModel comboBoxModel, Supplier<EntityEditPanel> editPanel, Value<Entity> linkedValue) <B extends TextFieldBuilder<Integer,
NumberField<Integer>, B>>
TextFieldBuilder<Integer, NumberField<Integer>, B> EntityComboBox.integerSelectorField
(FilterComboBoxModel.ItemFinder<Entity, Integer> itemFinder) Creates aTextFieldBuilder
returning aNumberField
which value is bound to the selected value in this combo boxvoid
Displays a dialog for selecting from the given entities.EntitySearchField.Builder.stringFactory
(Function<Entity, String> stringFactory) Overrides the default toString() for search elements when displayed in a field based on this model<B extends TextFieldBuilder<String,
JTextField, B>>
TextFieldBuilder<String, JTextField, B> EntityComboBox.stringSelectorField
(FilterComboBoxModel.ItemFinder<Entity, String> itemFinder) Creates aTextFieldBuilder
returning a text field which value is bound to the selected value in this combo box