Top Description Fields Constructors Methods
org.hibernate.mapping

public Class RootClass

extends PersistentClass
implements TableOwner, SoftDeletable
Class Inheritance
All Implemented Interfaces
org.hibernate.mapping.SoftDeletable, org.hibernate.mapping.TableOwner
Imports
java.util.HashSet, .Iterator, .List, .Set, org.hibernate.MappingException, .Remove, org.hibernate.boot.Metadata, org.hibernate.boot.spi.MetadataBuildingContext, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.util.ReflectHelper, org.hibernate.persister.entity.EntityPersister

A mapping model object that represents the root class in an entity class inheritance hierarchy.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private String
private String
private Property
private Property
public static final @Remove String
DEFAULT_DISCRIMINATOR_COLUMN_NAME

Deprecated since 6.2.
public static final @Remove String
DEFAULT_IDENTIFIER_COLUMN_NAME

Deprecated since 6.2.
private Value
private boolean
private boolean
private Class<? extends EntityPersister>
private boolean
private boolean
private KeyValue
private Property
private boolean
private static final CoreMessageLogger
private boolean
private String
private int
private boolean
private Column
private Table
private Property
private String
Inherited from org.hibernate.mapping.PersistentClass:
NOT_NULL_DISCRIMINATOR_MAPPINGNULL_DISCRIMINATOR_MAPPINGsynchronizedTables

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
public void
private void
checkCompositeIdentifier()

Composite id classes are supposed to override equals and hashCode, and programs will typically experience bugs if they don't.

private void
checkTableDuplication()

In single table inheritance, subclasses share a table with the root class by definition.

public void
public String
public String
public Property
public Property
public Value
public Class<? extends EntityPersister>
public KeyValue
public Property
public Set<Table>
public KeyValue
public List<KeyValue>
public String
public List<Property>
public RootClass
public Table
public Column
public int
public PersistentClass
public Set<String>
public Table
public List<Table>
public Property
public String
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
pack-priv int
public void
setCacheConcurrencyStrategy(String cacheConcurrencyStrategy)

public void
setCacheRegionName(String cacheRegionName)

public void
setDeclaredIdentifierProperty(Property declaredIdentifierProperty)

public void
setDeclaredVersion(Property declaredVersion)

public void
setDiscriminator(Value discriminator)

public void
setDiscriminatorInsertable(boolean insertable)

public void
setEmbeddedIdentifier(boolean embeddedIdentifier)

public void
public void
setExplicitPolymorphism(boolean explicitPolymorphism)

public void
setForceDiscriminator(boolean forceDiscriminator)

public void
setIdentifier(KeyValue identifier)

public void
setIdentifierProperty(Property identifierProperty)

public void
setLazyPropertiesCacheable(boolean lazyPropertiesCacheable)

public void
setMutable(boolean mutable)

public void
setNaturalIdCacheRegionName(String naturalIdCacheRegionName)

public void
setPolymorphic(boolean polymorphic)

public void
public void
public void
setWhere(String string)

public void
validate(Metadata mapping)

Overrides org.hibernate.mapping.PersistentClass.validate.

Deprecated as a consequence of Metadata being deprecated.
Inherited from org.hibernate.mapping.PersistentClass:
addCallbackDefinitionsaddCheckConstraintaddFilteraddJoinaddMappedSuperclassPropertyaddPropertyaddSubclassJoinaddSubclassPropertyaddSubclassTableaddSynchronizedTableapplyPropertyassignCheckConstraintsToTablecheckColumnDuplicationcontainscreatePrimaryKeyfindSecondaryTablefindTablegetBatchSizegetCallbackDefinitionsgetCheckConstraintsgetClassNamegetContributorgetCustomSQLDeletegetCustomSQLDeleteCheckStylegetCustomSQLInsertgetCustomSQLInsertCheckStylegetCustomSQLUpdategetCustomSQLUpdateCheckStylegetDeclaredIdentifierMappergetDeclaredPropertiesgetDirectSubclassesgetDiscriminatorValuegetEntityNamegetFiltersgetIdentifierMappergetIdentityTablegetImplicitTablegetJoinClosuregetJoinClosureSpangetJoinNumbergetJoinsgetJpaEntityNamegetLoaderNamegetMappedClassgetMetaAttributegetMetaAttributesgetNonDuplicatedPropertiesgetOptimisticLockModegetOptimisticLockStylegetPropertiesgetPropertygetPropertyClosureSpangetProxyInterfacegetProxyInterfaceNamegetRecursivePropertygetReferenceablePropertiesgetReferencedPropertygetSecondaryTablegetServiceRegistrygetSubclassClosuregetSubclassesgetSubclassJoinClosuregetSubclassPropertygetSubclassPropertyClosuregetSubclassSpangetSubclassTableClosuregetSubTypesgetSuperMappedSuperclassgetSuperPersistentClassgetSuperTypegetTablegetUnjoinedPropertieshasCollectionNotReferencingPKhasIdentifierMapperhasNaturalIdhasPartitionedSelectionMappinghasPojoRepresentationhasPropertyhasSelectBeforeUpdatehasSubclasseshasSubselectLoadableCollectionsisAbstractisCachedisCachingExplicitlyRequestedisClassOrSuperclassJoinisClassOrSuperclassTableisCustomDeleteCallableisCustomInsertCallableisCustomUpdateCallableisDefinedOnMultipleSubclassesisDiscriminatorValueNotNullisDiscriminatorValueNullisLazyisPropertyDefinedInHierarchyisPropertyDefinedInSuperHierarchyprepareForMappingModelsetAbstractsetBatchSizesetCachedsetCachingExplicitlyRequestedsetClassNamesetCustomSqlDeletesetCustomSQLDeletesetCustomSqlInsertsetCustomSQLInsertsetCustomSqlUpdatesetCustomSQLUpdatesetDeclaredIdentifierMappersetDiscriminatorValuesetDynamicInsertsetDynamicUpdatesetEntityNamesetIdentifierMappersetJpaEntityNamesetLazysetLoaderNamesetMetaAttributessetOptimisticLockModesetOptimisticLockStylesetProxyInterfaceNamesetSelectBeforeUpdatesetSubselectLoadableCollectionssetSuperMappedSuperclasstoStringuseDynamicInsertuseDynamicUpdate

Field Detail

cacheConcurrencyStrategyback to summary
private String cacheConcurrencyStrategy
cacheRegionNameback to summary
private String cacheRegionName
declaredIdentifierPropertyback to summary
private Property declaredIdentifierProperty
declaredVersionback to summary
private Property declaredVersion
DEFAULT_DISCRIMINATOR_COLUMN_NAMEback to summary
public static final @Remove String DEFAULT_DISCRIMINATOR_COLUMN_NAME

Deprecated

since 6.2.

Annotations
@Deprecated
since:6.2
@Remove
DEFAULT_IDENTIFIER_COLUMN_NAMEback to summary
public static final @Remove String DEFAULT_IDENTIFIER_COLUMN_NAME

Deprecated

since 6.2.

Annotations
@Deprecated
since:6.2
@Remove
discriminatorback to summary
private Value discriminator
discriminatorInsertableback to summary
private boolean discriminatorInsertable
embeddedIdentifierback to summary
private boolean embeddedIdentifier
entityPersisterClassback to summary
private Class<? extends EntityPersister> entityPersisterClass
explicitPolymorphismback to summary
private boolean explicitPolymorphism
forceDiscriminatorback to summary
private boolean forceDiscriminator
identifierback to summary
private KeyValue identifier
identifierPropertyback to summary
private Property identifierProperty
lazyPropertiesCacheableback to summary
private boolean lazyPropertiesCacheable
LOGback to summary
private static final CoreMessageLogger LOG
mutableback to summary
private boolean mutable
naturalIdCacheRegionNameback to summary
private String naturalIdCacheRegionName
nextSubclassIdback to summary
private int nextSubclassId
polymorphicback to summary
private boolean polymorphic
softDeleteColumnback to summary
private Column softDeleteColumn
tableback to summary
private Table table
versionback to summary
private Property version
whereback to summary
private String where

Constructor Detail

RootClassback to summary
public RootClass(MetadataBuildingContext buildingContext)

Method Detail

acceptback to summary
public Object accept(PersistentClassVisitor mv)

Implements abstract org.hibernate.mapping.PersistentClass.accept.

Annotations
@Override
addSubclassback to summary
public void addSubclass(Subclass subclass) throws MappingException

Overrides org.hibernate.mapping.PersistentClass.addSubclass.

Annotations
@Override
checkCompositeIdentifierback to summary
private void checkCompositeIdentifier()

Composite id classes are supposed to override equals and hashCode, and programs will typically experience bugs if they don't. But instead of actually enforcing this with an error (because we can't anyway verify that the implementation is actually correct) we simply log a warning.

checkTableDuplicationback to summary
private void checkTableDuplication()

In single table inheritance, subclasses share a table with the root class by definition. But for joined or union mappings, the subclasses are assumed to occupy distinct tables, and it's an error to map two subclasses to the same table.

As a special exception to this, if a joined inheritance hierarchy defines an explicit jakarta.persistence.DiscriminatorColumn, we tolerate table duplication among the subclasses, but we must "force" the discriminator to account for this. (See issue HHH-14526.)

enableSoftDeleteback to summary
public void enableSoftDelete(Column indicatorColumn)

Implements org.hibernate.mapping.SoftDeletable.enableSoftDelete.

Annotations
@Override
getCacheConcurrencyStrategyback to summary
public String getCacheConcurrencyStrategy()

Implements abstract org.hibernate.mapping.PersistentClass.getCacheConcurrencyStrategy.

Annotations
@Override
getCacheRegionNameback to summary
public String getCacheRegionName()
getDeclaredIdentifierPropertyback to summary
public Property getDeclaredIdentifierProperty()

Implements abstract org.hibernate.mapping.PersistentClass.getDeclaredIdentifierProperty.

Annotations
@Override
getDeclaredVersionback to summary
public Property getDeclaredVersion()

Implements abstract org.hibernate.mapping.PersistentClass.getDeclaredVersion.

Annotations
@Override
getDiscriminatorback to summary
public Value getDiscriminator()

Implements abstract org.hibernate.mapping.PersistentClass.getDiscriminator.

Annotations
@Override
getEntityPersisterClassback to summary
public Class<? extends EntityPersister> getEntityPersisterClass()

Implements abstract org.hibernate.mapping.PersistentClass.getEntityPersisterClass.

Annotations
@Override
getIdentifierback to summary
public KeyValue getIdentifier()

Implements abstract org.hibernate.mapping.PersistentClass.getIdentifier.

Annotations
@Override
getIdentifierPropertyback to summary
public Property getIdentifierProperty()

Implements abstract org.hibernate.mapping.PersistentClass.getIdentifierProperty.

Annotations
@Override
getIdentityTablesback to summary
public Set<Table> getIdentityTables()
getKeyback to summary
public KeyValue getKey()

Implements abstract org.hibernate.mapping.PersistentClass.getKey.

Annotations
@Override
getKeyClosureback to summary
public List<KeyValue> getKeyClosure()

Implements abstract org.hibernate.mapping.PersistentClass.getKeyClosure.

Annotations
@Override
getNaturalIdCacheRegionNameback to summary
public String getNaturalIdCacheRegionName()

Implements abstract org.hibernate.mapping.PersistentClass.getNaturalIdCacheRegionName.

Annotations
@Override
getPropertyClosureback to summary
public List<Property> getPropertyClosure()

Implements abstract org.hibernate.mapping.PersistentClass.getPropertyClosure.

Annotations
@Override
getRootClassback to summary
public RootClass getRootClass()

Implements abstract org.hibernate.mapping.PersistentClass.getRootClass.

Annotations
@Override
getRootTableback to summary
public Table getRootTable()

Implements abstract org.hibernate.mapping.PersistentClass.getRootTable.

Annotations
@Override
getSoftDeleteColumnback to summary
public Column getSoftDeleteColumn()

Implements org.hibernate.mapping.SoftDeletable.getSoftDeleteColumn.

Annotations
@Override
getSubclassIdback to summary
public int getSubclassId()

Implements abstract org.hibernate.mapping.PersistentClass.getSubclassId.

Annotations
@Override
getSuperclassback to summary
public PersistentClass getSuperclass()

Implements abstract org.hibernate.mapping.PersistentClass.getSuperclass.

Annotations
@Override
getSynchronizedTablesback to summary
public Set<String> getSynchronizedTables()

Implements abstract org.hibernate.mapping.PersistentClass.getSynchronizedTables.

Annotations
@Override
getTableback to summary
public Table getTable()

Implements abstract org.hibernate.mapping.PersistentClass.getTable.

Implements org.hibernate.mapping.AttributeContainer.getTable.

Annotations
@Override
getTableClosureback to summary
public List<Table> getTableClosure()

Implements abstract org.hibernate.mapping.PersistentClass.getTableClosure.

Annotations
@Override
getVersionback to summary
public Property getVersion()

Implements abstract org.hibernate.mapping.PersistentClass.getVersion.

Annotations
@Override
getWhereback to summary
public String getWhere()

Implements abstract org.hibernate.mapping.PersistentClass.getWhere.

Annotations
@Override
hasEmbeddedIdentifierback to summary
public boolean hasEmbeddedIdentifier()

Implements abstract org.hibernate.mapping.PersistentClass.hasEmbeddedIdentifier.

Annotations
@Override
hasIdentifierPropertyback to summary
public boolean hasIdentifierProperty()

Implements abstract org.hibernate.mapping.PersistentClass.hasIdentifierProperty.

Annotations
@Override
isDiscriminatorInsertableback to summary
public boolean isDiscriminatorInsertable()

Implements abstract org.hibernate.mapping.PersistentClass.isDiscriminatorInsertable.

Annotations
@Override
isExplicitPolymorphismback to summary
public boolean isExplicitPolymorphism()

Implements abstract org.hibernate.mapping.PersistentClass.isExplicitPolymorphism.

Annotations
@Override
isForceDiscriminatorback to summary
public boolean isForceDiscriminator()

Overrides org.hibernate.mapping.PersistentClass.isForceDiscriminator.

Annotations
@Override
isInheritedback to summary
public boolean isInherited()

Implements abstract org.hibernate.mapping.PersistentClass.isInherited.

Annotations
@Override
isJoinedSubclassback to summary
public boolean isJoinedSubclass()

Implements abstract org.hibernate.mapping.PersistentClass.isJoinedSubclass.

Annotations
@Override
isLazyPropertiesCacheableback to summary
public boolean isLazyPropertiesCacheable()
isMutableback to summary
public boolean isMutable()

Implements abstract org.hibernate.mapping.PersistentClass.isMutable.

Annotations
@Override
isPolymorphicback to summary
public boolean isPolymorphic()

Implements abstract org.hibernate.mapping.PersistentClass.isPolymorphic.

Annotations
@Override
isVersionedback to summary
public boolean isVersioned()

Implements abstract org.hibernate.mapping.PersistentClass.isVersioned.

Annotations
@Override
nextSubclassIdback to summary
pack-priv int nextSubclassId()

Implements abstract org.hibernate.mapping.PersistentClass.nextSubclassId.

Annotations
@Override
setCacheConcurrencyStrategyback to summary
public void setCacheConcurrencyStrategy(String cacheConcurrencyStrategy)
setCacheRegionNameback to summary
public void setCacheRegionName(String cacheRegionName)
setDeclaredIdentifierPropertyback to summary
public void setDeclaredIdentifierProperty(Property declaredIdentifierProperty)
setDeclaredVersionback to summary
public void setDeclaredVersion(Property declaredVersion)
setDiscriminatorback to summary
public void setDiscriminator(Value discriminator)
setDiscriminatorInsertableback to summary
public void setDiscriminatorInsertable(boolean insertable)
setEmbeddedIdentifierback to summary
public void setEmbeddedIdentifier(boolean embeddedIdentifier)
setEntityPersisterClassback to summary
public void setEntityPersisterClass(Class<? extends EntityPersister> persister)

Implements abstract org.hibernate.mapping.PersistentClass.setEntityPersisterClass.

Annotations
@Override
setExplicitPolymorphismback to summary
public void setExplicitPolymorphism(boolean explicitPolymorphism)
setForceDiscriminatorback to summary
public void setForceDiscriminator(boolean forceDiscriminator)
setIdentifierback to summary
public void setIdentifier(KeyValue identifier)
setIdentifierPropertyback to summary
public void setIdentifierProperty(Property identifierProperty)
setLazyPropertiesCacheableback to summary
public void setLazyPropertiesCacheable(boolean lazyPropertiesCacheable)
setMutableback to summary
public void setMutable(boolean mutable)
setNaturalIdCacheRegionNameback to summary
public void setNaturalIdCacheRegionName(String naturalIdCacheRegionName)
setPolymorphicback to summary
public void setPolymorphic(boolean polymorphic)
setTableback to summary
public void setTable(Table table)

Implements org.hibernate.mapping.TableOwner.setTable.

setVersionback to summary
public void setVersion(Property version)
setWhereback to summary
public void setWhere(String string)
validateback to summary
public void validate(Metadata mapping) throws MappingException

Overrides org.hibernate.mapping.PersistentClass.validate.

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

Annotations
@Override