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 protected
AbstractEntitySourceImpl(MappingDocument sourceMappingDocument, JaxbHbmEntityBaseDefinition jaxbEntityMapping)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterInstantiation()
List<AttributeSource>
attributeSources()
Obtain this container's attribute sources.protected List<AttributeSource>
buildAttributeSources()
protected void
buildAttributeSources(AttributesHelper.Callback attributeBuildingCallback)
static org.hibernate.boot.model.source.internal.hbm.EntityNamingSourceImpl
extractEntityNamingSource(MappingDocument sourceMappingDocument, EntityInfo jaxbEntityMapping)
AttributePath
getAttributePathBase()
AttributeRole
getAttributeRoleBase()
int
getBatchSize()
Obtain the batch-size to be applied when initializing proxies of this entity.String
getCustomLoaderName()
Obtain the name of a named-query that will be used for loading this entityString
getCustomPersisterClassName()
Obtain the name of a custom persister class to be used.CustomSql
getCustomSqlDelete()
Obtain the custom SQL to be used for deletes for this entityCustomSql
getCustomSqlInsert()
Obtain the custom SQL to be used for inserts for this entityCustomSql
getCustomSqlUpdate()
Obtain the custom SQL to be used for updates for this entityEntityNamingSource
getEntityNamingSource()
FilterSource[]
getFilterSources()
Obtain the filters for this entity.EntityHierarchySource
getHierarchy()
Get the hierarchy this belongs to.List<JpaCallbackSource>
getJpaCallbackClasses()
Access to the sources describing JPA lifecycle callbacks.LocalMetadataBuildingContext
getLocalMetadataBuildingContext()
Obtain the metadata-building context local to this entity source.List<JaxbHbmNamedNativeQueryType>
getNamedNativeQueries()
List<JaxbHbmNamedQueryType>
getNamedQueries()
Origin
getOrigin()
Obtain the origin of this source.String
getProxy()
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.ToolingHintContext
getToolingHintContext()
String
getTypeName()
Get the name of this type.String
getXmlNodeName()
String
inferInLineViewName()
void
injectHierarchy(EntityHierarchySourceImpl entityHierarchy)
Boolean
isAbstract()
Is the entity abstract?boolean
isDynamicInsert()
Did the source specify dynamic inserts?boolean
isDynamicUpdate()
Did the source specify dynamic updates?boolean
isLazy()
Is this entity lazy (proxyable)?boolean
isSelectBeforeUpdate()
Did the source specify to perform selects to decide whether to perform (detached) updates?protected JaxbHbmEntityBaseDefinition
jaxbEntityMapping()
TruthValue
quoteIdentifiersLocalToEntity()
-
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:
getXmlNodeName
in interfaceEntitySource
-
getLocalMetadataBuildingContext
public LocalMetadataBuildingContext 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
public String getTypeName()
Description copied from interface:IdentifiableTypeSource
Get the name of this type.- Specified by:
getTypeName
in interfaceIdentifiableTypeSource
- Returns:
- The name of this type.
-
getAttributePathBase
public AttributePath getAttributePathBase()
- Specified by:
getAttributePathBase
in interfaceAttributeSourceContainer
-
getAttributeRoleBase
public AttributeRole getAttributeRoleBase()
- Specified by:
getAttributeRoleBase
in interfaceAttributeSourceContainer
-
getSubTypes
public Collection<IdentifiableTypeSource> 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
public FilterSource[] 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
public String inferInLineViewName()
- Specified by:
inferInLineViewName
in 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:IdentifiableTypeSource
Obtain the origin of this source.- Specified by:
getOrigin
in interfaceIdentifiableTypeSource
- Returns:
- The origin of this source.
-
getEntityNamingSource
public EntityNamingSource getEntityNamingSource()
- Specified by:
getEntityNamingSource
in interfaceEntityNamingSourceContributor
-
isAbstract
public Boolean 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
public String 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
public String 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
public String 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
public CustomSql 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
public CustomSql 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
public CustomSql 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
public String[] 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
public ToolingHintContext getToolingHintContext()
- Specified by:
getToolingHintContext
in interfaceToolingHintContextContainer
-
attributeSources
public List<AttributeSource> attributeSources()
Description copied from interface:AttributeSourceContainer
Obtain this container's attribute sources.- Specified by:
attributeSources
in interfaceAttributeSourceContainer
- Returns:
- The attribute sources.
-
injectHierarchy
public void injectHierarchy(EntityHierarchySourceImpl entityHierarchy)
-
getHierarchy
public EntityHierarchySource getHierarchy()
Description copied from interface:IdentifiableTypeSource
Get the hierarchy this belongs to.- Specified by:
getHierarchy
in interfaceIdentifiableTypeSource
- Returns:
- The hierarchy this belongs to.
-
getSecondaryTableMap
public Map<String,SecondaryTableSource> 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
public List<JpaCallbackSource> 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
public List<JaxbHbmNamedQueryType> getNamedQueries()
- Specified by:
getNamedQueries
in interfaceEntitySource
-
getNamedNativeQueries
public List<JaxbHbmNamedNativeQueryType> getNamedNativeQueries()
- Specified by:
getNamedNativeQueries
in interfaceEntitySource
-
quoteIdentifiersLocalToEntity
public TruthValue quoteIdentifiersLocalToEntity()
- Specified by:
quoteIdentifiersLocalToEntity
in interfaceEntitySource
-
-