Package org.hibernate.mapping
Class Subclass
- java.lang.Object
-
- org.hibernate.mapping.PersistentClass
-
- org.hibernate.mapping.Subclass
-
- All Implemented Interfaces:
Serializable
,AttributeContainer
,Contributable
,Filterable
,MetaAttributable
- Direct Known Subclasses:
JoinedSubclass
,SingleTableSubclass
,UnionSubclass
public class Subclass extends PersistentClass
A mapping model object that represents a subclass in an entity class inheritance hierarchy.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.hibernate.mapping.PersistentClass
NOT_NULL_DISCRIMINATOR_MAPPING, NULL_DISCRIMINATOR_MAPPING, synchronizedTables
-
-
Constructor Summary
Constructors Constructor Description Subclass(PersistentClass superclass, MetadataBuildingContext buildingContext)
-
Method Summary
-
Methods inherited from class org.hibernate.mapping.PersistentClass
addCallbackDefinitions, addCheckConstraint, addFilter, addSubclass, addSynchronizedTable, assignCheckConstraintsToTable, checkColumnDuplication, contains, createPrimaryKey, getBatchSize, getCallbackDefinitions, getCheckConstraints, getClassName, getContributor, getCustomSQLDelete, getCustomSQLDeleteCheckStyle, getCustomSQLInsert, getCustomSQLInsertCheckStyle, getCustomSQLUpdate, getCustomSQLUpdateCheckStyle, getDeclaredIdentifierMapper, getDeclaredProperties, getDeclaredPropertyIterator, getDirectSubclasses, getDiscriminatorColumnIterator, getDiscriminatorValue, getEntityName, getIdentityTable, getJoinIterator, getJoinNumber, getJoins, getJpaEntityName, getLoaderName, getMappedClass, getMetaAttribute, getMetaAttributes, getNonDuplicatedProperties, getNonDuplicatedPropertyIterator, getOptimisticLockMode, getProperties, getProperty, getPropertyIterator, getProxyInterface, getProxyInterfaceName, getRecursiveProperty, getReferenceableProperties, getReferenceablePropertyIterator, getReferencedProperty, getServiceRegistry, getSubclassClosure, getSubclassClosureIterator, getSubclasses, getSubclassIterator, getSubclassJoinClosure, getSubclassJoinClosureIterator, getSubclassProperty, getSubclassPropertyClosure, getSubclassPropertyClosureIterator, getSubclassSpan, getSubclassTableClosure, getSubclassTableClosureIterator, getSuperMappedSuperclass, getSuperPersistentClass, getUnjoinedProperties, getUnjoinedPropertyIterator, hasCollectionNotReferencingPK, hasIdentifierMapper, hasNaturalId, hasPartitionedSelectionMapping, hasPojoRepresentation, hasProperty, hasSelectBeforeUpdate, hasSubclasses, isAbstract, isCached, isCachingExplicitlyRequested, isCustomDeleteCallable, isCustomInsertCallable, isCustomUpdateCallable, isDefinedOnMultipleSubclasses, isDiscriminatorValueNotNull, isDiscriminatorValueNull, isLazy, isPropertyDefinedInHierarchy, isPropertyDefinedInSuperHierarchy, prepareForMappingModel, setAbstract, setBatchSize, setCached, setCachingExplicitlyRequested, setClassName, setCustomSqlDelete, setCustomSQLDelete, setCustomSqlInsert, setCustomSQLInsert, setCustomSqlUpdate, setCustomSQLUpdate, setDeclaredIdentifierMapper, setDiscriminatorValue, setDynamicInsert, setDynamicUpdate, setEntityName, setIdentifierMapper, setJpaEntityName, setLazy, setLoaderName, setMetaAttributes, setOptimisticLockMode, setOptimisticLockStyle, setProxyInterfaceName, setSelectBeforeUpdate, setSubselectLoadableCollections, setSuperMappedSuperclass, toString, useDynamicInsert, useDynamicUpdate, validate
-
-
-
-
Constructor Detail
-
Subclass
public Subclass(PersistentClass superclass, MetadataBuildingContext buildingContext)
-
-
Method Detail
-
getSubclassId
public int getSubclassId()
- Specified by:
getSubclassId
in classPersistentClass
-
getNaturalIdCacheRegionName
public String getNaturalIdCacheRegionName()
- Specified by:
getNaturalIdCacheRegionName
in classPersistentClass
-
getCacheConcurrencyStrategy
public String getCacheConcurrencyStrategy()
- Specified by:
getCacheConcurrencyStrategy
in classPersistentClass
-
getRootClass
public RootClass getRootClass()
- Specified by:
getRootClass
in classPersistentClass
-
getSuperclass
public PersistentClass getSuperclass()
- Specified by:
getSuperclass
in classPersistentClass
-
getIdentifierProperty
public Property getIdentifierProperty()
- Specified by:
getIdentifierProperty
in classPersistentClass
-
getDeclaredIdentifierProperty
public Property getDeclaredIdentifierProperty()
- Specified by:
getDeclaredIdentifierProperty
in classPersistentClass
-
getIdentifier
public KeyValue getIdentifier()
- Specified by:
getIdentifier
in classPersistentClass
-
hasIdentifierProperty
public boolean hasIdentifierProperty()
- Specified by:
hasIdentifierProperty
in classPersistentClass
-
getDiscriminator
public Value getDiscriminator()
- Specified by:
getDiscriminator
in classPersistentClass
-
isMutable
public boolean isMutable()
- Specified by:
isMutable
in classPersistentClass
-
isInherited
public boolean isInherited()
- Specified by:
isInherited
in classPersistentClass
-
isPolymorphic
public boolean isPolymorphic()
- Specified by:
isPolymorphic
in classPersistentClass
-
addProperty
public void addProperty(Property property)
Description copied from interface:AttributeContainer
Add a property to thisPersistentClass
orJoin
.- Specified by:
addProperty
in interfaceAttributeContainer
- Overrides:
addProperty
in classPersistentClass
-
addMappedSuperclassProperty
public void addMappedSuperclassProperty(Property property)
- Overrides:
addMappedSuperclassProperty
in classPersistentClass
-
addJoin
public void addJoin(Join j)
- Overrides:
addJoin
in classPersistentClass
-
getPropertyClosure
public List<Property> getPropertyClosure()
- Specified by:
getPropertyClosure
in classPersistentClass
-
getPropertyClosureIterator
@Deprecated public Iterator<Property> getPropertyClosureIterator()
Deprecated.- Specified by:
getPropertyClosureIterator
in classPersistentClass
-
getTableClosureIterator
@Deprecated public Iterator<Table> getTableClosureIterator()
Deprecated.- Specified by:
getTableClosureIterator
in classPersistentClass
-
getTableClosure
public List<Table> getTableClosure()
- Specified by:
getTableClosure
in classPersistentClass
-
getKeyClosureIterator
@Deprecated public Iterator<KeyValue> getKeyClosureIterator()
Deprecated.- Specified by:
getKeyClosureIterator
in classPersistentClass
-
getKeyClosure
public List<KeyValue> getKeyClosure()
- Specified by:
getKeyClosure
in classPersistentClass
-
addSubclassProperty
protected void addSubclassProperty(Property p)
- Overrides:
addSubclassProperty
in classPersistentClass
-
addSubclassJoin
protected void addSubclassJoin(Join j)
- Overrides:
addSubclassJoin
in classPersistentClass
-
addSubclassTable
protected void addSubclassTable(Table table)
- Overrides:
addSubclassTable
in classPersistentClass
-
isVersioned
public boolean isVersioned()
- Specified by:
isVersioned
in classPersistentClass
-
getVersion
public Property getVersion()
- Specified by:
getVersion
in classPersistentClass
-
getDeclaredVersion
public Property getDeclaredVersion()
- Specified by:
getDeclaredVersion
in classPersistentClass
-
hasEmbeddedIdentifier
public boolean hasEmbeddedIdentifier()
- Specified by:
hasEmbeddedIdentifier
in classPersistentClass
-
getEntityPersisterClass
public Class<? extends EntityPersister> getEntityPersisterClass()
- Specified by:
getEntityPersisterClass
in classPersistentClass
-
getRootTable
public Table getRootTable()
- Specified by:
getRootTable
in classPersistentClass
-
getKey
public KeyValue getKey()
- Specified by:
getKey
in classPersistentClass
-
isExplicitPolymorphism
public boolean isExplicitPolymorphism()
- Specified by:
isExplicitPolymorphism
in classPersistentClass
-
setSuperclass
public void setSuperclass(PersistentClass superclass)
-
getWhere
public String getWhere()
- Specified by:
getWhere
in classPersistentClass
-
isJoinedSubclass
public boolean isJoinedSubclass()
- Specified by:
isJoinedSubclass
in classPersistentClass
-
createForeignKey
public void createForeignKey()
-
setEntityPersisterClass
public void setEntityPersisterClass(Class<? extends EntityPersister> classPersisterClass)
- Specified by:
setEntityPersisterClass
in classPersistentClass
-
getJoinClosureSpan
public int getJoinClosureSpan()
- Overrides:
getJoinClosureSpan
in classPersistentClass
-
getPropertyClosureSpan
public int getPropertyClosureSpan()
- Overrides:
getPropertyClosureSpan
in classPersistentClass
-
getJoinClosure
public List<Join> getJoinClosure()
- Overrides:
getJoinClosure
in classPersistentClass
-
getJoinClosureIterator
@Deprecated(since="6.0") public Iterator<Join> getJoinClosureIterator()
Deprecated.- Overrides:
getJoinClosureIterator
in classPersistentClass
-
isClassOrSuperclassJoin
public boolean isClassOrSuperclassJoin(Join join)
- Overrides:
isClassOrSuperclassJoin
in classPersistentClass
-
isClassOrSuperclassTable
public boolean isClassOrSuperclassTable(Table table)
- Overrides:
isClassOrSuperclassTable
in classPersistentClass
-
getTable
public Table getTable()
- Specified by:
getTable
in interfaceAttributeContainer
- Specified by:
getTable
in classPersistentClass
-
isForceDiscriminator
public boolean isForceDiscriminator()
- Overrides:
isForceDiscriminator
in classPersistentClass
-
isDiscriminatorInsertable
public boolean isDiscriminatorInsertable()
- Specified by:
isDiscriminatorInsertable
in classPersistentClass
-
getSynchronizedTables
public Set<String> getSynchronizedTables()
- Specified by:
getSynchronizedTables
in classPersistentClass
-
accept
public Object accept(PersistentClassVisitor mv)
- Specified by:
accept
in classPersistentClass
-
getFilters
public List<FilterConfiguration> getFilters()
- Specified by:
getFilters
in interfaceFilterable
- Overrides:
getFilters
in classPersistentClass
-
hasSubselectLoadableCollections
public boolean hasSubselectLoadableCollections()
- Overrides:
hasSubselectLoadableCollections
in classPersistentClass
-
getIdentifierMapper
public Component getIdentifierMapper()
- Overrides:
getIdentifierMapper
in classPersistentClass
-
getOptimisticLockStyle
public OptimisticLockStyle getOptimisticLockStyle()
- Overrides:
getOptimisticLockStyle
in classPersistentClass
-
-