Top Description Fields Constructors Methods
org.hibernate.tuple.entity

public Class EntityMetamodel

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@Deprecated
since:6
forRemoval:true
Imports
java.io.Serializable, java.util.ArrayList, .BitSet, .HashMap, .HashSet, .LinkedHashSet, .List, .Map, .Set, org.hibernate.HibernateException, .MappingException, org.hibernate.annotations.NotFoundAction, org.hibernate.boot.spi.MetadataImplementor, org.hibernate.bytecode.enhance.spi.interceptor.EnhancementHelper, org.hibernate.bytecode.internal.BytecodeEnhancementMetadataNonPojoImpl, .BytecodeEnhancementMetadataPojoImpl, org.hibernate.bytecode.spi.BytecodeEnhancementMetadata, org.hibernate.dialect.Dialect, org.hibernate.engine.OptimisticLockStyle, org.hibernate.engine.spi.CascadeStyle, .CascadeStyles, .CascadingActions, .SessionFactoryImplementor, org.hibernate.generator.Generator, .OnExecutionGenerator, .BeforeExecutionGenerator, org.hibernate.internal.CoreMessageLogger, org.hibernate.internal.util.collections.ArrayHelper, org.hibernate.mapping.Component, .GeneratorCreator, .ManyToOne, .PersistentClass, .Property, .Subclass, .ToOne, .Value, org.hibernate.metamodel.mapping.EntityMappingType, org.hibernate.metamodel.spi.RuntimeModelCreationContext, org.hibernate.persister.entity.EntityPersister, org.hibernate.persister.spi.PersisterCreationContext, org.hibernate.tuple.IdentifierProperty, .NonIdentifierAttribute, .PropertyFactory, org.hibernate.type.AssociationType, .CollectionType, .ComponentType, .CompositeType, .EntityType, .ManyToOneType, .Type

Deprecated

for removal since 6.

Replaced by EntityMappingType. EntityMetamodel was a first attempt at what has become EntityMappingType

Centralizes metamodel information about an entity.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final BytecodeEnhancementMetadata
private final CascadeStyle[]
private final boolean
private final boolean
private final Map<Class<?>, String>
private EntityType
private final boolean
private final Generator[]
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final IdentifierProperty
identifierAttribute

Deprecated as a consequence of IdentifierProperty being deprecated.
private final boolean
private final boolean
private boolean
private static final CoreMessageLogger
private final boolean
private final BitSet
private final String
private final int[]
public static final int
private final boolean[]
private final OptimisticLockStyle
private final boolean
private final NonIdentifierAttribute[]
properties

Deprecated as a consequence of NonIdentifierAttribute being deprecated.
private final boolean[]
private final Map<String, Integer>
private final boolean[]
private final boolean[]
private final String[]
private final boolean[]
private final int
private final Type[]
private final boolean[]
private final boolean[]
private final String
private final boolean
private final SessionFactoryImplementor
sessionFactory

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private final Set<String>
private final int
private final String
private final boolean
private final BeforeExecutionGenerator
private final int

Constructor Summary

AccessConstructor and Description
public
EntityMetamodel(PersistentClass persistentClass, EntityPersister persister, PersisterCreationContext creationContext)

Deprecated since 6.0.
public
EntityMetamodel(PersistentClass persistentClass, EntityPersister persister, RuntimeModelCreationContext creationContext)

Deprecated as a consequence of RuntimeModelCreationContext being deprecated.

Method Summary

Modifier and TypeMethod and Description
private static Generator
buildGenerator(final String entityName, final Property mappingProperty, final RuntimeModelCreationContext context)

Deprecated as a consequence of RuntimeModelCreationContext being deprecated.
public String

Returns:

The mapped entity-name, or null if no such mapping was found.
findEntityNameByEntityClass
(Class<?>
The class for which to resolve the entity-name.
inheritanceClass
)

Return the entity-name mapped to the given class within our inheritance hierarchy, if any.

private static boolean
public BytecodeEnhancementMetadata
public CascadeStyle[]
public EntityType
public Generator[]
public IdentifierProperty
getIdentifierProperty()

Deprecated as a consequence of IdentifierProperty being deprecated.
public BitSet
public String
public int[]
public boolean[]
public OptimisticLockStyle
public NonIdentifierAttribute[]
getProperties()

Deprecated as a consequence of NonIdentifierAttribute being deprecated.
public boolean[]
public int
getPropertyIndex(String propertyName)

public Integer
public boolean[]
public boolean[]
public String[]
public boolean[]
public int
public Type[]
public boolean[]
public boolean[]
public String
public SessionFactoryImplementor
getSessionFactory()

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public Set<String>
public int
public String
public BeforeExecutionGenerator
public VersionProperty
getVersionProperty()

Deprecated as a consequence of VersionProperty being deprecated.
public int
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
private static boolean
private static boolean
indicatesOwnedCollection(Type type, MetadataImplementor metadata)

Deprecated as a consequence of MetadataImplementor being deprecated.
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
isInstrumented()

Whether this class can be lazy (ie intercepted)

public boolean
public boolean
public boolean
public boolean

Returns:

true if one of the properties belonging to the natural id is generated during the execution of an insert statement
isNaturalIdentifierInsertGenerated
()

public boolean
public boolean
public boolean
private void
mapPropertyToIndex(Property property, int i)

private String
public void
setLazy(boolean lazy)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bytecodeEnhancementMetadataback to summary
private final BytecodeEnhancementMetadata bytecodeEnhancementMetadata
cascadeStylesback to summary
private final CascadeStyle[] cascadeStyles
dynamicInsertback to summary
private final boolean dynamicInsert
dynamicUpdateback to summary
private final boolean dynamicUpdate
entityNameByInheritanceClassMapback to summary
private final Map<Class<?>, String> entityNameByInheritanceClassMap
entityTypeback to summary
private EntityType entityType
explicitPolymorphismback to summary
private final boolean explicitPolymorphism
generatorsback to summary
private final Generator[] generators
hasCacheableNaturalIdback to summary
private final boolean hasCacheableNaturalId
hasCascadeDeleteback to summary
private final boolean hasCascadeDelete
hasCascadesback to summary
private final boolean hasCascades
hasCollectionsback to summary
private final boolean hasCollections
hasImmutableNaturalIdback to summary
private final boolean hasImmutableNaturalId
hasInsertGeneratedValuesback to summary
private final boolean hasInsertGeneratedValues
hasLazyPropertiesback to summary
private final boolean hasLazyProperties
hasNonIdentifierPropertyNamedIdback to summary
private final boolean hasNonIdentifierPropertyNamedId
hasOwnedCollectionsback to summary
private final boolean hasOwnedCollections
hasPreInsertGeneratedValuesback to summary
private final boolean hasPreInsertGeneratedValues
hasPreUpdateGeneratedValuesback to summary
private final boolean hasPreUpdateGeneratedValues
hasSubclassesback to summary
private final boolean hasSubclasses
hasUpdateGeneratedValuesback to summary
private final boolean hasUpdateGeneratedValues
identifierAttributeback to summary
private final IdentifierProperty identifierAttribute

Deprecated

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

inheritedback to summary
private final boolean inherited
isAbstractback to summary
private final boolean isAbstract
lazyback to summary
private boolean lazy
LOGback to summary
private static final CoreMessageLogger LOG
mutableback to summary
private final boolean mutable
mutablePropertiesIndexesback to summary
private final BitSet mutablePropertiesIndexes
nameback to summary
private final String name
naturalIdPropertyNumbersback to summary
private final int[] naturalIdPropertyNumbers
NO_VERSION_INDXback to summary
public static final int NO_VERSION_INDX
nonlazyPropertyUpdateabilityback to summary
private final boolean[] nonlazyPropertyUpdateability
optimisticLockStyleback to summary
private final OptimisticLockStyle optimisticLockStyle
polymorphicback to summary
private final boolean polymorphic
propertiesback to summary
private final NonIdentifierAttribute[] properties

Deprecated

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

propertyCheckabilityback to summary
private final boolean[] propertyCheckability
propertyIndexesback to summary
private final Map<String, Integer> propertyIndexes
propertyInsertabilityback to summary
private final boolean[] propertyInsertability
propertyLazinessback to summary
private final boolean[] propertyLaziness
propertyNamesback to summary
private final String[] propertyNames
propertyNullabilityback to summary
private final boolean[] propertyNullability
propertySpanback to summary
private final int propertySpan
propertyTypesback to summary
private final Type[] propertyTypes
propertyUpdateabilityback to summary
private final boolean[] propertyUpdateability
propertyVersionabilityback to summary
private final boolean[] propertyVersionability
rootNameback to summary
private final String rootName
selectBeforeUpdateback to summary
private final boolean selectBeforeUpdate
sessionFactoryback to summary
private final SessionFactoryImplementor sessionFactory

Deprecated

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

subclassEntityNamesback to summary
private final Set<String> subclassEntityNames
subclassIdback to summary
private final int subclassId
superclassback to summary
private final String superclass
versionedback to summary
private final boolean versioned
versionGeneratorback to summary
private final BeforeExecutionGenerator versionGenerator
versionPropertyIndexback to summary
private final int versionPropertyIndex

Constructor Detail

EntityMetamodelback to summary
public EntityMetamodel(PersistentClass persistentClass, EntityPersister persister, PersisterCreationContext creationContext)

Deprecated

since 6.0.

Annotations
@Deprecated
since:6.0
EntityMetamodelback to summary
public EntityMetamodel(PersistentClass persistentClass, EntityPersister persister, RuntimeModelCreationContext creationContext)

Deprecated

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

Method Detail

buildGeneratorback to summary
private static Generator buildGenerator(final String entityName, final Property mappingProperty, final RuntimeModelCreationContext context)

Deprecated

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

findEntityNameByEntityClassback to summary
public String findEntityNameByEntityClass(Class<?> inheritanceClass)

Return the entity-name mapped to the given class within our inheritance hierarchy, if any.

Parameters
inheritanceClass:Class<?>

The class for which to resolve the entity-name.

Returns:String

The mapped entity-name, or null if no such mapping was found.

generatedWithNoParameterback to summary
private static boolean generatedWithNoParameter(Generator generator)
getBytecodeEnhancementMetadataback to summary
public BytecodeEnhancementMetadata getBytecodeEnhancementMetadata()
getCascadeStylesback to summary
public CascadeStyle[] getCascadeStyles()
getEntityTypeback to summary
public EntityType getEntityType()
getGeneratorsback to summary
public Generator[] getGenerators()
getIdentifierPropertyback to summary
public IdentifierProperty getIdentifierProperty()

Deprecated

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

getMutablePropertiesIndexesback to summary
public BitSet getMutablePropertiesIndexes()
getNameback to summary
public String getName()
getNaturalIdentifierPropertiesback to summary
public int[] getNaturalIdentifierProperties()
getNonlazyPropertyUpdateabilityback to summary
public boolean[] getNonlazyPropertyUpdateability()
getOptimisticLockStyleback to summary
public OptimisticLockStyle getOptimisticLockStyle()
getPropertiesback to summary
public NonIdentifierAttribute[] getProperties()

Deprecated

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

getPropertyCheckabilityback to summary
public boolean[] getPropertyCheckability()
getPropertyIndexback to summary
public int getPropertyIndex(String propertyName)
getPropertyIndexOrNullback to summary
public Integer getPropertyIndexOrNull(String propertyName)
getPropertyInsertabilityback to summary
public boolean[] getPropertyInsertability()
getPropertyLazinessback to summary
public boolean[] getPropertyLaziness()
getPropertyNamesback to summary
public String[] getPropertyNames()
getPropertyNullabilityback to summary
public boolean[] getPropertyNullability()
getPropertySpanback to summary
public int getPropertySpan()
getPropertyTypesback to summary
public Type[] getPropertyTypes()
getPropertyUpdateabilityback to summary
public boolean[] getPropertyUpdateability()
getPropertyVersionabilityback to summary
public boolean[] getPropertyVersionability()
getRootNameback to summary
public String getRootName()
getSessionFactoryback to summary
public SessionFactoryImplementor getSessionFactory()

Deprecated

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

getSubclassEntityNamesback to summary
public Set<String> getSubclassEntityNames()
getSubclassIdback to summary
public int getSubclassId()
getSuperclassback to summary
public String getSuperclass()
getVersionGeneratorback to summary
public BeforeExecutionGenerator getVersionGenerator()
getVersionPropertyback to summary
public VersionProperty getVersionProperty()

Deprecated

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

getVersionPropertyIndexback to summary
public int getVersionPropertyIndex()
hasCascadeDeleteback to summary
public boolean hasCascadeDelete()
hasCascadesback to summary
public boolean hasCascades()
hasCollectionsback to summary
public boolean hasCollections()
hasImmutableNaturalIdback to summary
public boolean hasImmutableNaturalId()
hasInsertGeneratedValuesback to summary
public boolean hasInsertGeneratedValues()
hasLazyPropertiesback to summary
public boolean hasLazyProperties()
hasMutablePropertiesback to summary
public boolean hasMutableProperties()
hasNaturalIdentifierback to summary
public boolean hasNaturalIdentifier()
hasNonIdentifierPropertyNamedIdback to summary
public boolean hasNonIdentifierPropertyNamedId()
hasOwnedCollectionsback to summary
public boolean hasOwnedCollections()
hasPreInsertGeneratedValuesback to summary
public boolean hasPreInsertGeneratedValues()
hasPreUpdateGeneratedValuesback to summary
public boolean hasPreUpdateGeneratedValues()
hasSubclassesback to summary
public boolean hasSubclasses()
hasUpdateGeneratedValuesback to summary
public boolean hasUpdateGeneratedValues()
indicatesCollectionback to summary
private static boolean indicatesCollection(Type type)
indicatesOwnedCollectionback to summary
private static boolean indicatesOwnedCollection(Type type, MetadataImplementor metadata)

Deprecated

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

isAbstractback to summary
public boolean isAbstract()
isDynamicInsertback to summary
public boolean isDynamicInsert()
isDynamicUpdateback to summary
public boolean isDynamicUpdate()
isExplicitPolymorphismback to summary
public boolean isExplicitPolymorphism()
isInheritedback to summary
public boolean isInherited()
isInstrumentedback to summary
public boolean isInstrumented()

Whether this class can be lazy (ie intercepted)

isLazyback to summary
public boolean isLazy()
isMutableback to summary
public boolean isMutable()
isNaturalIdentifierCachedback to summary
public boolean isNaturalIdentifierCached()
isNaturalIdentifierInsertGeneratedback to summary
public boolean isNaturalIdentifierInsertGenerated()
Returns:boolean

true if one of the properties belonging to the natural id is generated during the execution of an insert statement

isPolymorphicback to summary
public boolean isPolymorphic()
isSelectBeforeUpdateback to summary
public boolean isSelectBeforeUpdate()
isVersionedback to summary
public boolean isVersioned()
mapPropertyToIndexback to summary
private void mapPropertyToIndex(Property property, int i)
propertyNameback to summary
private String propertyName(Property property)
setLazyback to summary
public void setLazy(boolean lazy)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
verifyNaturalIdPropertyback to summary
private void verifyNaturalIdProperty(Property property)