E - The described classpublic final class EntityClass<E> extends Object
entity class.| Modifier and Type | Method and Description |
|---|---|
List<EntityStatement> |
createPostInsertStatements(E entity)
Marks an entity as written and creates any pending update / insert statements.
|
String |
getEntityReference(E entity,
String idField,
boolean whereExpression)
Creates an expression that references the id of an entity of this class.
|
boolean |
isNew(E entity)
Indicates that the given entity needs to be written.
|
void |
markExistingEntity(E entity)
Marks a entity reference, where we don't know the ID in the database.
|
<V> void |
markPendingUpdates(E pendingEntity,
V entityToUpdate,
Property<V,?> propertyToUpdate,
Object... arguments)
Marks an update that is necessary when an entity is written (in the future).
|
String |
toString() |
public List<EntityStatement> createPostInsertStatements(E entity)
entity - the entity that exists now in the databasepublic String getEntityReference(E entity, String idField, boolean whereExpression)
entity - the entityidField - the field that contains the id, only interesting if the id is an EmbeddedPropertywhereExpression - indicates that the reference is used in a "where" statementunique properties or the
id of the entitypublic boolean isNew(E entity)
entity - the entity to checktrue if the entity was neither written, nor exists in the databasepublic void markExistingEntity(E entity)
entity - the entity to markpublic <V> void markPendingUpdates(E pendingEntity, V entityToUpdate, Property<V,?> propertyToUpdate, Object... arguments)
pendingEntity - the entity that needs to be written, before the update can take placeentityToUpdate - the entity to updatepropertyToUpdate - the property of the entity to updatearguments - additional argumentsCopyright © 2016 fastnate.org. All rights reserved.