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
ConstructorsModifierConstructorDescriptionprotected
AbstractEntitySourceImpl
(MappingDocument sourceMappingDocument, JaxbHbmEntityBaseDefinition jaxbEntityMapping) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Obtain this container's attribute sources.protected List<AttributeSource>
protected void
buildAttributeSources
(AttributesHelper.Callback attributeBuildingCallback) static org.hibernate.boot.model.source.internal.hbm.EntityNamingSourceImpl
extractEntityNamingSource
(MappingDocument sourceMappingDocument, EntityInfo jaxbEntityMapping) int
Obtain 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 entityObtain the filters for this entity.Get the hierarchy this belongs to.Access to the sources describing JPA lifecycle callbacks.Obtain the metadata-building context local to this entity source.Obtain the origin of this source.getProxy()
For lazy entities, obtain the interface to use in constructing its proxies.Obtain the secondary tables for this entityAccess the subtype sources for types extending from this type source,String[]
Obtain any additional table names on which to synchronize (auto flushing) this entity.Get the name of this type.void
injectHierarchy
(EntityHierarchySourceImpl entityHierarchy) Is the entity abstract?boolean
Did the source specify dynamic inserts?boolean
Did the source specify dynamic updates?boolean
isLazy()
Is this entity lazy (proxyable)?boolean
Did the source specify to perform selects to decide whether to perform (detached) updates?protected JaxbHbmEntityBaseDefinition
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 Details
-
AbstractEntitySourceImpl
protected AbstractEntitySourceImpl(MappingDocument sourceMappingDocument, JaxbHbmEntityBaseDefinition jaxbEntityMapping)
-
-
Method Details
-
extractEntityNamingSource
public static org.hibernate.boot.model.source.internal.hbm.EntityNamingSourceImpl extractEntityNamingSource(MappingDocument sourceMappingDocument, EntityInfo jaxbEntityMapping) -
getXmlNodeName
- Specified by:
getXmlNodeName
in interfaceEntitySource
-
getLocalMetadataBuildingContext
Description copied from interface:IdentifiableTypeSource
Obtain the metadata-building context local to this entity source.- Specified by:
getLocalMetadataBuildingContext
in interfaceAttributeSourceContainer
- Specified by:
getLocalMetadataBuildingContext
in interfaceIdentifiableTypeSource
- Returns:
- The local binding context
-
getTypeName
Description copied from interface:IdentifiableTypeSource
Get the name of this type.- Specified by:
getTypeName
in interfaceIdentifiableTypeSource
- Returns:
- The name of this type.
-
getAttributePathBase
- Specified by:
getAttributePathBase
in interfaceAttributeSourceContainer
-
getAttributeRoleBase
- Specified by:
getAttributeRoleBase
in interfaceAttributeSourceContainer
-
getSubTypes
Description copied from interface:IdentifiableTypeSource
Access the subtype sources for types extending from this type source,- Specified by:
getSubTypes
in interfaceIdentifiableTypeSource
- Returns:
- Sub-type sources
-
getFilterSources
Description copied from interface:EntitySource
Obtain the filters for this entity.- Specified by:
getFilterSources
in interfaceEntitySource
- Returns:
- returns an array of the filters for this entity.
-
inferInLineViewName
- Specified by:
inferInLineViewName
in interfaceHelper.InLineViewNameInferrer
-
afterInstantiation
protected void afterInstantiation() -
buildAttributeSources
-
buildAttributeSources
-
jaxbEntityMapping
-
getOrigin
Description copied from interface:IdentifiableTypeSource
Obtain the origin of this source.- Specified by:
getOrigin
in interfaceIdentifiableTypeSource
- Returns:
- The origin of this source.
-
getEntityNamingSource
- Specified by:
getEntityNamingSource
in interfaceEntityNamingSourceContributor
-
isAbstract
Description copied from interface:EntitySource
Is the entity abstract?The implication is whether the entity maps to a database table.
- Specified by:
isAbstract
in interfaceEntitySource
- Returns:
true
indicates the entity is abstract;false
non-abstract;null
indicates that a reflection check should be done when building the persister.
-
isLazy
public boolean isLazy()Description copied from interface:EntitySource
Is this entity lazy (proxyable)?- Specified by:
isLazy
in interfaceEntitySource
- Returns:
true
indicates the entity is lazy;false
non-lazy.
-
getProxy
Description copied from interface:EntitySource
For lazy entities, obtain the interface to use in constructing its proxies.- Specified by:
getProxy
in interfaceEntitySource
- Returns:
- The proxy interface name
-
getBatchSize
public int getBatchSize()Description copied from interface:EntitySource
Obtain the batch-size to be applied when initializing proxies of this entity.- Specified by:
getBatchSize
in interfaceEntitySource
- Returns:
- returns the batch-size.
-
isDynamicInsert
public boolean isDynamicInsert()Description copied from interface:EntitySource
Did the source specify dynamic inserts?- Specified by:
isDynamicInsert
in interfaceEntitySource
- Returns:
true
indicates dynamic inserts will be used;false
otherwise.
-
isDynamicUpdate
public boolean isDynamicUpdate()Description copied from interface:EntitySource
Did the source specify dynamic updates?- Specified by:
isDynamicUpdate
in interfaceEntitySource
- Returns:
true
indicates dynamic updates will be used;false
otherwise.
-
isSelectBeforeUpdate
public boolean isSelectBeforeUpdate()Description copied from interface:EntitySource
Did the source specify to perform selects to decide whether to perform (detached) updates?- Specified by:
isSelectBeforeUpdate
in interfaceEntitySource
- Returns:
true
indicates selects will be done;false
otherwise.
-
getCustomPersisterClassName
Description copied from interface:EntitySource
Obtain the name of a custom persister class to be used.- Specified by:
getCustomPersisterClassName
in interfaceEntitySource
- Returns:
- The custom persister class name
-
getCustomLoaderName
Description copied from interface:EntitySource
Obtain the name of a named-query that will be used for loading this entity- Specified by:
getCustomLoaderName
in interfaceEntitySource
- Returns:
- THe custom loader query name
-
getCustomSqlInsert
Description copied from interface:EntitySource
Obtain the custom SQL to be used for inserts for this entity- Specified by:
getCustomSqlInsert
in interfaceEntitySource
- Returns:
- The custom insert SQL
-
getCustomSqlUpdate
Description copied from interface:EntitySource
Obtain the custom SQL to be used for updates for this entity- Specified by:
getCustomSqlUpdate
in interfaceEntitySource
- Returns:
- The custom update SQL
-
getCustomSqlDelete
Description copied from interface:EntitySource
Obtain the custom SQL to be used for deletes for this entity- Specified by:
getCustomSqlDelete
in interfaceEntitySource
- Returns:
- The custom delete SQL
-
getSynchronizedTableNames
Description copied from interface:EntitySource
Obtain any additional table names on which to synchronize (auto flushing) this entity.- Specified by:
getSynchronizedTableNames
in interfaceEntitySource
- Returns:
- Additional synchronized table names or 0 sized String array, never return null.
-
getToolingHintContext
- Specified by:
getToolingHintContext
in interfaceToolingHintContextContainer
-
attributeSources
Description copied from interface:AttributeSourceContainer
Obtain this container's attribute sources.- Specified by:
attributeSources
in interfaceAttributeSourceContainer
- Returns:
- The attribute sources.
-
injectHierarchy
-
getHierarchy
Description copied from interface:IdentifiableTypeSource
Get the hierarchy this belongs to.- Specified by:
getHierarchy
in interfaceIdentifiableTypeSource
- Returns:
- The hierarchy this belongs to.
-
getSecondaryTableMap
Description copied from interface:EntitySource
Obtain the secondary tables for this entity- Specified by:
getSecondaryTableMap
in interfaceEntitySource
- Returns:
- returns an iterator over the secondary tables for this entity
-
getJpaCallbackClasses
Description copied from interface:IdentifiableTypeSource
Access to the sources describing JPA lifecycle callbacks.- Specified by:
getJpaCallbackClasses
in interfaceIdentifiableTypeSource
- Returns:
- JPA lifecycle callback sources
-
getNamedQueries
- Specified by:
getNamedQueries
in interfaceEntitySource
-
getNamedNativeQueries
- Specified by:
getNamedNativeQueries
in interfaceEntitySource
-