ImmutableCachedEntityClass
Base class responsible for the management of immutable Entity instances and the maintenance of their relation to the provided table. An internal cache is used to store entity loading states by the associated database, in order to guarantee that that entity updates are synchronized with this class as the lock object.
Parameters
The IdTable object that stores rows mapped to entities managed by this class.
The expected Entity class type. This can be left null
if it is the class of type argument T provided to this EntityClass instance.
Samples
org.jetbrains.exposed.sql.tests.shared.entities.ImmutableEntityTest.Schema.Organizationorg.jetbrains.exposed.sql.tests.shared.entities.ImmutableEntityTest.ECachedOrganizationConstructors
Properties
The columns that this EntityClass depends on when maintaining relations with managed Entity instances.
The IdTable that this EntityClass depends on when maintaining relations with managed Entity instances.
Functions
Gets all the Entity instances associated with this EntityClass.
Registers a reference as an immutable field of the parent entity class, which returns a child object of this EntityClass
.
Clears either only values for the database associated with the current Transaction or the entire cache if a database transaction cannot be found.
Searches the current EntityCache for all Entity instances that match the provided cacheCheckCondition. If the cache returns no matches, entities that conform to the provided op conditional expression will be retrieved from the database.
Updates an entity field directly in the database, then removes this entity from the EntityCache in the current transaction scope. This is useful when needing to ensure that an entity is only updated with data retrieved directly from a database query.
Returns a SizedIterable containing all entities with EntityID values from the provided ids list.
Returns a SizedIterable containing all entities with id values from the provided ids list.
Returns whether the entityClass type is equivalent to or a superclass of this EntityClass instance's klass.
Returns a EntityFieldWithTransform delegate that will cache the transformed value on first read of this same stored Unwrapped value.
Returns a EntityFieldWithTransform that extends transformation of existing EntityFieldWithTransform and caches the transformed value on first read.
Registers an optional reference as an immutable field of the parent entity class, which returns a child object of this EntityClass
.
Registers an optional reference as a field of the child entity class, which returns a parent object of this EntityClass
.
Registers an optional reference as an immutable field of the parent entity class, which returns a collection of child objects of this EntityClass
that all reference the parent.
Registers a reference as an immutable field of the parent entity class, which returns a collection of child objects of this EntityClass
that all reference the parent.
Removes the specified entity from the current EntityCache, as well as any stored references to or from the removed entity.
Returns a Query to select all columns in dependsOnTables with a WHERE clause that includes the provided op conditional expression.
Searches the current EntityCache for all Entity instances that match the provided cacheCheckCondition.
Searches the current EntityCache for an Entity by its EntityID value.
Returns a EntityFieldWithTransform delegate that transforms this stored Unwrapped value on every read.
Returns a EntityFieldWithTransform that extends transformation of existing EntityFieldWithTransform.
Returns a list of retrieved Entity instances whose reference column matches any of the EntityID values in references. Both the entity's source and target reference columns should have been defined in linkTable.
Returns a SizedIterable containing entities generated using data retrieved from a database result set in rows.