Class AbstractEntitySourceImpl
- java.lang.Object
-
- org.hibernate.boot.model.source.internal.hbm.AbstractHbmSourceNode
-
- org.hibernate.boot.model.source.internal.hbm.AbstractEntitySourceImpl
-
- All Implemented Interfaces:
Helper.InLineViewNameInferrer,AttributeSourceContainer,EntityNamingSourceContributor,EntitySource,IdentifiableTypeSource,ToolingHintContextContainer
- Direct Known Subclasses:
RootEntitySourceImpl,SubclassEntitySourceImpl
public abstract class AbstractEntitySourceImpl extends AbstractHbmSourceNode implements EntitySource, Helper.InLineViewNameInferrer
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractEntitySourceImpl(MappingDocument sourceMappingDocument, JaxbHbmEntityBaseDefinition jaxbEntityMapping)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterInstantiation()List<AttributeSource>attributeSources()Obtain this container's attribute sources.protected List<AttributeSource>buildAttributeSources()protected voidbuildAttributeSources(AttributesHelper.Callback attributeBuildingCallback)static org.hibernate.boot.model.source.internal.hbm.EntityNamingSourceImplextractEntityNamingSource(MappingDocument sourceMappingDocument, EntityInfo jaxbEntityMapping)AttributePathgetAttributePathBase()AttributeRolegetAttributeRoleBase()intgetBatchSize()Obtain the batch-size to be applied when initializing proxies of this entity.StringgetCustomLoaderName()Obtain the name of a named-query that will be used for loading this entityStringgetCustomPersisterClassName()Obtain the name of a custom persister class to be used.CustomSqlgetCustomSqlDelete()Obtain the custom SQL to be used for deletes for this entityCustomSqlgetCustomSqlInsert()Obtain the custom SQL to be used for inserts for this entityCustomSqlgetCustomSqlUpdate()Obtain the custom SQL to be used for updates for this entityEntityNamingSourcegetEntityNamingSource()FilterSource[]getFilterSources()Obtain the filters for this entity.EntityHierarchySourcegetHierarchy()Get the hierarchy this belongs to.List<JpaCallbackSource>getJpaCallbackClasses()Access to the sources describing JPA lifecycle callbacks.LocalMetadataBuildingContextgetLocalMetadataBuildingContext()Obtain the metadata-building context local to this entity source.List<JaxbHbmNamedNativeQueryType>getNamedNativeQueries()List<JaxbHbmNamedQueryType>getNamedQueries()OrigingetOrigin()Obtain the origin of this source.StringgetProxy()For lazy entities, obtain the interface to use in constructing its proxies.Map<String,SecondaryTableSource>getSecondaryTableMap()Obtain the secondary tables for this entityCollection<IdentifiableTypeSource>getSubTypes()Access the subtype sources for types extending from this type source,String[]getSynchronizedTableNames()Obtain any additional table names on which to synchronize (auto flushing) this entity.ToolingHintContextgetToolingHintContext()StringgetTypeName()Get the name of this type.StringgetXmlNodeName()StringinferInLineViewName()voidinjectHierarchy(EntityHierarchySourceImpl entityHierarchy)BooleanisAbstract()Is the entity abstract?booleanisDynamicInsert()Did the source specify dynamic inserts?booleanisDynamicUpdate()Did the source specify dynamic updates?booleanisLazy()Is this entity lazy (proxyable)?booleanisSelectBeforeUpdate()Did the source specify to perform selects to decide whether to perform (detached) updates?protected JaxbHbmEntityBaseDefinitionjaxbEntityMapping()TruthValuequoteIdentifiersLocalToEntity()-
Methods inherited from class org.hibernate.boot.model.source.internal.hbm.AbstractHbmSourceNode
mappingRoot, metadataBuildingContext, origin, sourceMappingDocument
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.boot.model.source.spi.EntitySource
getDiscriminatorMatchValue, getPrimaryTable
-
Methods inherited from interface org.hibernate.boot.model.source.spi.IdentifiableTypeSource
getSuperType
-
-
-
-
Constructor Detail
-
AbstractEntitySourceImpl
protected AbstractEntitySourceImpl(MappingDocument sourceMappingDocument, JaxbHbmEntityBaseDefinition jaxbEntityMapping)
-
-
Method Detail
-
extractEntityNamingSource
public static org.hibernate.boot.model.source.internal.hbm.EntityNamingSourceImpl extractEntityNamingSource(MappingDocument sourceMappingDocument, EntityInfo jaxbEntityMapping)
-
getXmlNodeName
public String getXmlNodeName()
- Specified by:
getXmlNodeNamein interfaceEntitySource
-
getLocalMetadataBuildingContext
public LocalMetadataBuildingContext getLocalMetadataBuildingContext()
Description copied from interface:IdentifiableTypeSourceObtain the metadata-building context local to this entity source.- Specified by:
getLocalMetadataBuildingContextin interfaceAttributeSourceContainer- Specified by:
getLocalMetadataBuildingContextin interfaceIdentifiableTypeSource- Returns:
- The local binding context
-
getTypeName
public String getTypeName()
Description copied from interface:IdentifiableTypeSourceGet the name of this type.- Specified by:
getTypeNamein interfaceIdentifiableTypeSource- Returns:
- The name of this type.
-
getAttributePathBase
public AttributePath getAttributePathBase()
- Specified by:
getAttributePathBasein interfaceAttributeSourceContainer
-
getAttributeRoleBase
public AttributeRole getAttributeRoleBase()
- Specified by:
getAttributeRoleBasein interfaceAttributeSourceContainer
-
getSubTypes
public Collection<IdentifiableTypeSource> getSubTypes()
Description copied from interface:IdentifiableTypeSourceAccess the subtype sources for types extending from this type source,- Specified by:
getSubTypesin interfaceIdentifiableTypeSource- Returns:
- Sub-type sources
-
getFilterSources
public FilterSource[] getFilterSources()
Description copied from interface:EntitySourceObtain the filters for this entity.- Specified by:
getFilterSourcesin interfaceEntitySource- Returns:
- returns an array of the filters for this entity.
-
inferInLineViewName
public String inferInLineViewName()
- Specified by:
inferInLineViewNamein interfaceHelper.InLineViewNameInferrer
-
afterInstantiation
protected void afterInstantiation()
-
buildAttributeSources
protected List<AttributeSource> buildAttributeSources()
-
buildAttributeSources
protected void buildAttributeSources(AttributesHelper.Callback attributeBuildingCallback)
-
jaxbEntityMapping
protected JaxbHbmEntityBaseDefinition jaxbEntityMapping()
-
getOrigin
public Origin getOrigin()
Description copied from interface:IdentifiableTypeSourceObtain the origin of this source.- Specified by:
getOriginin interfaceIdentifiableTypeSource- Returns:
- The origin of this source.
-
getEntityNamingSource
public EntityNamingSource getEntityNamingSource()
- Specified by:
getEntityNamingSourcein interfaceEntityNamingSourceContributor
-
isAbstract
public Boolean isAbstract()
Description copied from interface:EntitySourceIs the entity abstract?The implication is whether the entity maps to a database table.
- Specified by:
isAbstractin interfaceEntitySource- Returns:
trueindicates the entity is abstract;falsenon-abstract;nullindicates that a reflection check should be done when building the persister.
-
isLazy
public boolean isLazy()
Description copied from interface:EntitySourceIs this entity lazy (proxyable)?- Specified by:
isLazyin interfaceEntitySource- Returns:
trueindicates the entity is lazy;falsenon-lazy.
-
getProxy
public String getProxy()
Description copied from interface:EntitySourceFor lazy entities, obtain the interface to use in constructing its proxies.- Specified by:
getProxyin interfaceEntitySource- Returns:
- The proxy interface name
-
getBatchSize
public int getBatchSize()
Description copied from interface:EntitySourceObtain the batch-size to be applied when initializing proxies of this entity.- Specified by:
getBatchSizein interfaceEntitySource- Returns:
- returns the batch-size.
-
isDynamicInsert
public boolean isDynamicInsert()
Description copied from interface:EntitySourceDid the source specify dynamic inserts?- Specified by:
isDynamicInsertin interfaceEntitySource- Returns:
trueindicates dynamic inserts will be used;falseotherwise.
-
isDynamicUpdate
public boolean isDynamicUpdate()
Description copied from interface:EntitySourceDid the source specify dynamic updates?- Specified by:
isDynamicUpdatein interfaceEntitySource- Returns:
trueindicates dynamic updates will be used;falseotherwise.
-
isSelectBeforeUpdate
public boolean isSelectBeforeUpdate()
Description copied from interface:EntitySourceDid the source specify to perform selects to decide whether to perform (detached) updates?- Specified by:
isSelectBeforeUpdatein interfaceEntitySource- Returns:
trueindicates selects will be done;falseotherwise.
-
getCustomPersisterClassName
public String getCustomPersisterClassName()
Description copied from interface:EntitySourceObtain the name of a custom persister class to be used.- Specified by:
getCustomPersisterClassNamein interfaceEntitySource- Returns:
- The custom persister class name
-
getCustomLoaderName
public String getCustomLoaderName()
Description copied from interface:EntitySourceObtain the name of a named-query that will be used for loading this entity- Specified by:
getCustomLoaderNamein interfaceEntitySource- Returns:
- THe custom loader query name
-
getCustomSqlInsert
public CustomSql getCustomSqlInsert()
Description copied from interface:EntitySourceObtain the custom SQL to be used for inserts for this entity- Specified by:
getCustomSqlInsertin interfaceEntitySource- Returns:
- The custom insert SQL
-
getCustomSqlUpdate
public CustomSql getCustomSqlUpdate()
Description copied from interface:EntitySourceObtain the custom SQL to be used for updates for this entity- Specified by:
getCustomSqlUpdatein interfaceEntitySource- Returns:
- The custom update SQL
-
getCustomSqlDelete
public CustomSql getCustomSqlDelete()
Description copied from interface:EntitySourceObtain the custom SQL to be used for deletes for this entity- Specified by:
getCustomSqlDeletein interfaceEntitySource- Returns:
- The custom delete SQL
-
getSynchronizedTableNames
public String[] getSynchronizedTableNames()
Description copied from interface:EntitySourceObtain any additional table names on which to synchronize (auto flushing) this entity.- Specified by:
getSynchronizedTableNamesin interfaceEntitySource- Returns:
- Additional synchronized table names or 0 sized String array, never return null.
-
getToolingHintContext
public ToolingHintContext getToolingHintContext()
- Specified by:
getToolingHintContextin interfaceToolingHintContextContainer
-
attributeSources
public List<AttributeSource> attributeSources()
Description copied from interface:AttributeSourceContainerObtain this container's attribute sources.- Specified by:
attributeSourcesin interfaceAttributeSourceContainer- Returns:
- The attribute sources.
-
injectHierarchy
public void injectHierarchy(EntityHierarchySourceImpl entityHierarchy)
-
getHierarchy
public EntityHierarchySource getHierarchy()
Description copied from interface:IdentifiableTypeSourceGet the hierarchy this belongs to.- Specified by:
getHierarchyin interfaceIdentifiableTypeSource- Returns:
- The hierarchy this belongs to.
-
getSecondaryTableMap
public Map<String,SecondaryTableSource> getSecondaryTableMap()
Description copied from interface:EntitySourceObtain the secondary tables for this entity- Specified by:
getSecondaryTableMapin interfaceEntitySource- Returns:
- returns an iterator over the secondary tables for this entity
-
getJpaCallbackClasses
public List<JpaCallbackSource> getJpaCallbackClasses()
Description copied from interface:IdentifiableTypeSourceAccess to the sources describing JPA lifecycle callbacks.- Specified by:
getJpaCallbackClassesin interfaceIdentifiableTypeSource- Returns:
- JPA lifecycle callback sources
-
getNamedQueries
public List<JaxbHbmNamedQueryType> getNamedQueries()
- Specified by:
getNamedQueriesin interfaceEntitySource
-
getNamedNativeQueries
public List<JaxbHbmNamedNativeQueryType> getNamedNativeQueries()
- Specified by:
getNamedNativeQueriesin interfaceEntitySource
-
quoteIdentifiersLocalToEntity
public TruthValue quoteIdentifiersLocalToEntity()
- Specified by:
quoteIdentifiersLocalToEntityin interfaceEntitySource
-
-