ENTITY - the entity typepublic interface EntityType<ENTITY>
The implementation instance must be thread safe.
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCatalogName()
Returns the catalog name.
|
java.lang.Class<ENTITY> |
getEntityClass()
Returns the entity class.
|
EntityPropertyType<ENTITY,?> |
getEntityPropertyType(java.lang.String __name)
Returns the property description with the name.
|
java.util.List<EntityPropertyType<ENTITY,?>> |
getEntityPropertyTypes()
Returns the property descriptions.
|
GeneratedIdPropertyType<ENTITY,?,?> |
getGeneratedIdPropertyType()
Returns the identity property description whose value is generated.
|
java.util.List<EntityPropertyType<ENTITY,?>> |
getIdPropertyTypes()
Returns the identity property descriptions
|
java.lang.String |
getName()
Returns the entity name
|
NamingType |
getNamingType()
Returns the naming convention.
|
ENTITY |
getOriginalStates(ENTITY entity)
Returns the original states.
|
java.lang.String |
getQualifiedTableName()
Deprecated.
|
java.lang.String |
getQualifiedTableName(java.util.function.BiFunction<NamingType,java.lang.String,java.lang.String> namingFunction,
java.util.function.Function<java.lang.String,java.lang.String> quoteFunction)
Returns the qualified table name.
|
java.lang.String |
getQualifiedTableName(java.util.function.Function<java.lang.String,java.lang.String> quoteFunction)
Deprecated.
|
java.lang.String |
getSchemaName()
Returns the schema name.
|
java.lang.String |
getTableName()
Deprecated.
|
java.lang.String |
getTableName(java.util.function.BiFunction<NamingType,java.lang.String,java.lang.String> namingFunction)
Returns the table name.
|
TenantIdPropertyType<ENTITY,?,?> |
getTenantIdPropertyType()
Returns the tenant id property description
|
VersionPropertyType<ENTITY,?,?> |
getVersionPropertyType()
Returns the version property description
|
boolean |
isImmutable()
Whether the entity is immutable.
|
boolean |
isQuoteRequired()
Returns quotation marks are required for catalog, schema and table.
|
ENTITY |
newEntity(java.util.Map<java.lang.String,Property<ENTITY,?>> __args)
Instantiate a new entity.
|
void |
postDelete(ENTITY entity,
PostDeleteContext<ENTITY> context)
Handles the entity after a delete.
|
void |
postInsert(ENTITY entity,
PostInsertContext<ENTITY> context)
Handles the entity after an insert.
|
void |
postUpdate(ENTITY entity,
PostUpdateContext<ENTITY> context)
Handles the entity after an update.
|
void |
preDelete(ENTITY entity,
PreDeleteContext<ENTITY> context)
Handles the entity before a delete.
|
void |
preInsert(ENTITY entity,
PreInsertContext<ENTITY> context)
Handles the entity before an insert.
|
void |
preUpdate(ENTITY entity,
PreUpdateContext<ENTITY> context)
Handles the entity before an update.
|
void |
saveCurrentStates(ENTITY entity)
Saves the current states.
|
boolean isImmutable()
true if the entity is immutablejava.lang.String getName()
java.lang.String getCatalogName()
java.lang.String getSchemaName()
@Deprecated java.lang.String getTableName()
getTableName(BiFunction)java.lang.String getTableName(java.util.function.BiFunction<NamingType,java.lang.String,java.lang.String> namingFunction)
namingFunction - the function that applies naming convention@Deprecated java.lang.String getQualifiedTableName()
getQualifiedTableName(BiFunction, Function)@Deprecated java.lang.String getQualifiedTableName(java.util.function.Function<java.lang.String,java.lang.String> quoteFunction)
getQualifiedTableName(BiFunction, Function)quoteFunction - the function that applies quotation marksjava.lang.String getQualifiedTableName(java.util.function.BiFunction<NamingType,java.lang.String,java.lang.String> namingFunction, java.util.function.Function<java.lang.String,java.lang.String> quoteFunction)
namingFunction - the function that applies naming conventionquoteFunction - the function that applies quotation marksboolean isQuoteRequired()
true if quotation marks are requiredNamingType getNamingType()
nullEntity.naming()GeneratedIdPropertyType<ENTITY,?,?> getGeneratedIdPropertyType()
VersionPropertyType<ENTITY,?,?> getVersionPropertyType()
TenantIdPropertyType<ENTITY,?,?> getTenantIdPropertyType()
java.util.List<EntityPropertyType<ENTITY,?>> getIdPropertyTypes()
EntityPropertyType<ENTITY,?> getEntityPropertyType(java.lang.String __name)
__name - the name of the propertynull if the property is not foundjava.util.List<EntityPropertyType<ENTITY,?>> getEntityPropertyTypes()
ENTITY newEntity(java.util.Map<java.lang.String,Property<ENTITY,?>> __args)
__args - the argumentsjava.lang.Class<ENTITY> getEntityClass()
void saveCurrentStates(ENTITY entity)
entity - the current statesENTITY getOriginalStates(ENTITY entity)
entity - the original statesnull if it does not existvoid preInsert(ENTITY entity, PreInsertContext<ENTITY> context)
entity - the entitycontext - the contextvoid preUpdate(ENTITY entity, PreUpdateContext<ENTITY> context)
entity - the entitycontext - the contextvoid preDelete(ENTITY entity, PreDeleteContext<ENTITY> context)
entity - the entitycontext - the contextvoid postInsert(ENTITY entity, PostInsertContext<ENTITY> context)
entity - the entitycontext - the contextvoid postUpdate(ENTITY entity, PostUpdateContext<ENTITY> context)
entity - the entitycontext - the contextvoid postDelete(ENTITY entity, PostDeleteContext<ENTITY> context)
entity - the entitycontext - the context