Interface EntitySource
- All Superinterfaces:
AttributeSourceContainer,EntityNamingSourceContributor,IdentifiableTypeSource,ToolingHintContextContainer
- All Known Subinterfaces:
JoinedSubclassEntitySource,SubclassEntitySource
- All Known Implementing Classes:
AbstractEntitySourceImpl,JoinedSubclassEntitySourceImpl,RootEntitySourceImpl,SubclassEntitySourceImpl
public interface EntitySource
extends IdentifiableTypeSource, ToolingHintContextContainer, EntityNamingSourceContributor
Contract describing source of information related to mapping an entity.
-
Method Summary
Modifier and TypeMethodDescriptionintObtain the batch-size to be applied when initializing proxies of this entity.Obtain the name of a named-query that will be used for loading this entityObtain the name of a custom persister class to be used.Obtain the custom SQL to be used for deletes for this entityObtain the custom SQL to be used for inserts for this entityObtain the custom SQL to be used for updates for this entityGet the actual discriminator value in case of a single table inheritanceObtain the filters for this entity.Obtain the primary table for this entity.getProxy()For lazy entities, obtain the interface to use in constructing its proxies.Obtain the secondary tables for this entityString[]Obtain any additional table names on which to synchronize (auto flushing) this entity.Is the entity abstract?booleanDid the source specify dynamic inserts?booleanDid the source specify dynamic updates?booleanisLazy()Is this entity lazy (proxyable)?booleanDid the source specify to perform selects to decide whether to perform (detached) updates?Methods inherited from interface org.hibernate.boot.model.source.spi.AttributeSourceContainer
attributeSources, getAttributePathBase, getAttributeRoleBaseMethods inherited from interface org.hibernate.boot.model.source.spi.EntityNamingSourceContributor
getEntityNamingSourceMethods inherited from interface org.hibernate.boot.model.source.spi.IdentifiableTypeSource
getHierarchy, getJpaCallbackClasses, getLocalMetadataBuildingContext, getOrigin, getSubTypes, getSuperType, getTypeNameMethods inherited from interface org.hibernate.boot.model.source.spi.ToolingHintContextContainer
getToolingHintContext
-
Method Details
-
getPrimaryTable
TableSpecificationSource getPrimaryTable()Obtain the primary table for this entity.- Returns:
- The primary table.
-
getSecondaryTableMap
Map<String,SecondaryTableSource> getSecondaryTableMap()Obtain the secondary tables for this entity- Returns:
- returns an iterator over the secondary tables for this entity
-
getXmlNodeName
String getXmlNodeName() -
getCustomPersisterClassName
String getCustomPersisterClassName()Obtain the name of a custom persister class to be used.- Returns:
- The custom persister class name
-
isLazy
boolean isLazy()Is this entity lazy (proxyable)?- Returns:
trueindicates the entity is lazy;falsenon-lazy.
-
getProxy
String getProxy()For lazy entities, obtain the interface to use in constructing its proxies.- Returns:
- The proxy interface name
-
getBatchSize
int getBatchSize()Obtain the batch-size to be applied when initializing proxies of this entity.- Returns:
- returns the batch-size.
-
isAbstract
Boolean isAbstract()Is the entity abstract?The implication is whether the entity maps to a database table.
- Returns:
trueindicates the entity is abstract;falsenon-abstract;nullindicates that a reflection check should be done when building the persister.
-
isDynamicInsert
boolean isDynamicInsert()Did the source specify dynamic inserts?- Returns:
trueindicates dynamic inserts will be used;falseotherwise.
-
isDynamicUpdate
boolean isDynamicUpdate()Did the source specify dynamic updates?- Returns:
trueindicates dynamic updates will be used;falseotherwise.
-
isSelectBeforeUpdate
boolean isSelectBeforeUpdate()Did the source specify to perform selects to decide whether to perform (detached) updates?- Returns:
trueindicates selects will be done;falseotherwise.
-
getCustomLoaderName
String getCustomLoaderName()Obtain the name of a named-query that will be used for loading this entity- Returns:
- THe custom loader query name
-
getCustomSqlInsert
CustomSql getCustomSqlInsert()Obtain the custom SQL to be used for inserts for this entity- Returns:
- The custom insert SQL
-
getCustomSqlUpdate
CustomSql getCustomSqlUpdate()Obtain the custom SQL to be used for updates for this entity- Returns:
- The custom update SQL
-
getCustomSqlDelete
CustomSql getCustomSqlDelete()Obtain the custom SQL to be used for deletes for this entity- Returns:
- The custom delete SQL
-
getSynchronizedTableNames
String[] getSynchronizedTableNames()Obtain any additional table names on which to synchronize (auto flushing) this entity.- Returns:
- Additional synchronized table names or 0 sized String array, never return null.
-
getDiscriminatorMatchValue
String getDiscriminatorMatchValue()Get the actual discriminator value in case of a single table inheritance- Returns:
- the actual discriminator value in case of a single table inheritance or
nullin case there is no explicit value or a different inheritance scheme
-
getFilterSources
FilterSource[] getFilterSources()Obtain the filters for this entity.- Returns:
- returns an array of the filters for this entity.
-
getNamedQueries
List<JaxbHbmNamedQueryType> getNamedQueries() -
getNamedNativeQueries
List<JaxbHbmNamedNativeQueryType> getNamedNativeQueries()
-