public class EntityTypeProxy<ENTITY> extends java.lang.Object implements EntityType<ENTITY>
| Constructor and Description |
|---|
EntityTypeProxy(EntityType<ENTITY> entityType,
java.lang.String qualifiedTableName) |
| 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.
|
public EntityTypeProxy(EntityType<ENTITY> entityType, java.lang.String qualifiedTableName)
public boolean isImmutable()
EntityTypeisImmutable in interface EntityType<ENTITY>true if the entity is immutablepublic java.lang.String getName()
EntityTypegetName in interface EntityType<ENTITY>public java.lang.String getCatalogName()
EntityTypegetCatalogName in interface EntityType<ENTITY>public java.lang.String getSchemaName()
EntityTypegetSchemaName in interface EntityType<ENTITY>@Deprecated public java.lang.String getTableName()
EntityTypegetTableName in interface EntityType<ENTITY>public java.lang.String getTableName(java.util.function.BiFunction<NamingType,java.lang.String,java.lang.String> namingFunction)
EntityTypegetTableName in interface EntityType<ENTITY>namingFunction - the function that applies naming convention@Deprecated public java.lang.String getQualifiedTableName()
EntityTypegetQualifiedTableName in interface EntityType<ENTITY>@Deprecated public java.lang.String getQualifiedTableName(java.util.function.Function<java.lang.String,java.lang.String> quoteFunction)
EntityTypegetQualifiedTableName in interface EntityType<ENTITY>quoteFunction - the function that applies quotation markspublic 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)
EntityTypegetQualifiedTableName in interface EntityType<ENTITY>namingFunction - the function that applies naming conventionquoteFunction - the function that applies quotation markspublic boolean isQuoteRequired()
EntityTypeisQuoteRequired in interface EntityType<ENTITY>true if quotation marks are requiredpublic NamingType getNamingType()
EntityTypegetNamingType in interface EntityType<ENTITY>nullEntity.naming()public GeneratedIdPropertyType<ENTITY,?,?> getGeneratedIdPropertyType()
EntityTypegetGeneratedIdPropertyType in interface EntityType<ENTITY>public VersionPropertyType<ENTITY,?,?> getVersionPropertyType()
EntityTypegetVersionPropertyType in interface EntityType<ENTITY>public TenantIdPropertyType<ENTITY,?,?> getTenantIdPropertyType()
EntityTypegetTenantIdPropertyType in interface EntityType<ENTITY>public java.util.List<EntityPropertyType<ENTITY,?>> getIdPropertyTypes()
EntityTypegetIdPropertyTypes in interface EntityType<ENTITY>public EntityPropertyType<ENTITY,?> getEntityPropertyType(java.lang.String __name)
EntityTypegetEntityPropertyType in interface EntityType<ENTITY>__name - the name of the propertynull if the property is not foundpublic java.util.List<EntityPropertyType<ENTITY,?>> getEntityPropertyTypes()
EntityTypegetEntityPropertyTypes in interface EntityType<ENTITY>public ENTITY newEntity(java.util.Map<java.lang.String,Property<ENTITY,?>> __args)
EntityTypenewEntity in interface EntityType<ENTITY>__args - the argumentspublic java.lang.Class<ENTITY> getEntityClass()
EntityTypegetEntityClass in interface EntityType<ENTITY>public void saveCurrentStates(ENTITY entity)
EntityTypesaveCurrentStates in interface EntityType<ENTITY>entity - the current statespublic ENTITY getOriginalStates(ENTITY entity)
EntityTypegetOriginalStates in interface EntityType<ENTITY>entity - the original statesnull if it does not existpublic void preInsert(ENTITY entity, PreInsertContext<ENTITY> context)
EntityTypepreInsert in interface EntityType<ENTITY>entity - the entitycontext - the contextpublic void preUpdate(ENTITY entity, PreUpdateContext<ENTITY> context)
EntityTypepreUpdate in interface EntityType<ENTITY>entity - the entitycontext - the contextpublic void preDelete(ENTITY entity, PreDeleteContext<ENTITY> context)
EntityTypepreDelete in interface EntityType<ENTITY>entity - the entitycontext - the contextpublic void postInsert(ENTITY entity, PostInsertContext<ENTITY> context)
EntityTypepostInsert in interface EntityType<ENTITY>entity - the entitycontext - the contextpublic void postUpdate(ENTITY entity, PostUpdateContext<ENTITY> context)
EntityTypepostUpdate in interface EntityType<ENTITY>entity - the entitycontext - the contextpublic void postDelete(ENTITY entity, PostDeleteContext<ENTITY> context)
EntityTypepostDelete in interface EntityType<ENTITY>entity - the entitycontext - the context