Class ClassPropertyHolder
- java.lang.Object
-
- org.hibernate.boot.model.internal.AbstractPropertyHolder
-
- org.hibernate.boot.model.internal.ClassPropertyHolder
-
- All Implemented Interfaces:
PropertyHolder
public class ClassPropertyHolder extends AbstractPropertyHolder
-
-
Field Summary
-
Fields inherited from class org.hibernate.boot.model.internal.AbstractPropertyHolder
parent
-
-
Constructor Summary
Constructors Constructor Description ClassPropertyHolder(PersistentClass persistentClass, org.hibernate.annotations.common.reflection.XClass entityXClass, Map<String,Join> joins, MetadataBuildingContext context, Map<org.hibernate.annotations.common.reflection.XClass,InheritanceState> inheritanceStatePerClass)ClassPropertyHolder(PersistentClass persistentClass, org.hibernate.annotations.common.reflection.XClass entityXClass, EntityBinder entityBinder, MetadataBuildingContext context, Map<org.hibernate.annotations.common.reflection.XClass,InheritanceState> inheritanceStatePerClass)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JoinaddJoin(JoinTable joinTableAnn, boolean noDelayInPkColumnCreation)JoinaddJoin(JoinTable joinTable, Table table, boolean noDelayInPkColumnCreation)voidaddProperty(Property prop, org.hibernate.annotations.common.reflection.XClass declaringClass)voidaddProperty(Property prop, AnnotatedColumns columns, org.hibernate.annotations.common.reflection.XClass declaringClass)protected Map<String,AttributeConversionInfo>buildAttributeConversionInfoMap(org.hibernate.annotations.common.reflection.XClass entityXClass)StringgetClassName()StringgetEntityName()StringgetEntityOwnerClassName()KeyValuegetIdentifier()PersistentClassgetPersistentClass()TablegetTable()static voidhandleGenericComponentProperty(Property property, MetadataBuildingContext context)Embeddable classes can be defined using generics.booleanisComponent()booleanisEntity()booleanisOrWithinEmbeddedId()Return true if this component is or is embedded in a @EmbeddedIdbooleanisWithinElementCollection()Return true if this component is within an @ElementCollection.protected AttributeConversionInfolocateAttributeConversionInfo(String path)protected AttributeConversionInfolocateAttributeConversionInfo(org.hibernate.annotations.common.reflection.XProperty property)voidmovePropertyToJoin(Property property, Join join, org.hibernate.annotations.common.reflection.XClass declaringClass)protected StringnormalizeCompositePath(String attributeName)protected StringnormalizeCompositePathForLogging(String attributeName)voidstartingProperty(org.hibernate.annotations.common.reflection.XProperty property)Called during binding to allow the PropertyHolder to inspect its discovered properties.StringtoString()-
Methods inherited from class org.hibernate.boot.model.internal.AbstractPropertyHolder
buildExceptionFromInstantiationError, getContext, getJoinTable, getOverriddenColumn, getOverriddenColumnTransformer, getOverriddenForeignKey, getOverriddenJoinColumn, getOverriddenJoinTable, getPath, isInIdClass, makeAttributeConverterDescriptor, resolveAttributeConverterDescriptor, setCurrentProperty, setInIdClass, setParentProperty
-
-
-
-
Constructor Detail
-
ClassPropertyHolder
public ClassPropertyHolder(PersistentClass persistentClass, org.hibernate.annotations.common.reflection.XClass entityXClass, Map<String,Join> joins, MetadataBuildingContext context, Map<org.hibernate.annotations.common.reflection.XClass,InheritanceState> inheritanceStatePerClass)
-
ClassPropertyHolder
public ClassPropertyHolder(PersistentClass persistentClass, org.hibernate.annotations.common.reflection.XClass entityXClass, EntityBinder entityBinder, MetadataBuildingContext context, Map<org.hibernate.annotations.common.reflection.XClass,InheritanceState> inheritanceStatePerClass)
-
-
Method Detail
-
normalizeCompositePath
protected String normalizeCompositePath(String attributeName)
- Specified by:
normalizeCompositePathin classAbstractPropertyHolder
-
normalizeCompositePathForLogging
protected String normalizeCompositePathForLogging(String attributeName)
- Specified by:
normalizeCompositePathForLoggingin classAbstractPropertyHolder
-
buildAttributeConversionInfoMap
protected Map<String,AttributeConversionInfo> buildAttributeConversionInfoMap(org.hibernate.annotations.common.reflection.XClass entityXClass)
-
startingProperty
public void startingProperty(org.hibernate.annotations.common.reflection.XProperty property)
Description copied from interface:PropertyHolderCalled during binding to allow the PropertyHolder to inspect its discovered properties. Mainly this is used in collecting attribute conversion declarations (via @Convert/@Converts).- Parameters:
property- The property
-
locateAttributeConversionInfo
protected AttributeConversionInfo locateAttributeConversionInfo(org.hibernate.annotations.common.reflection.XProperty property)
- Specified by:
locateAttributeConversionInfoin classAbstractPropertyHolder
-
locateAttributeConversionInfo
protected AttributeConversionInfo locateAttributeConversionInfo(String path)
- Specified by:
locateAttributeConversionInfoin classAbstractPropertyHolder
-
getEntityName
public String getEntityName()
-
addProperty
public void addProperty(Property prop, AnnotatedColumns columns, org.hibernate.annotations.common.reflection.XClass declaringClass)
-
addProperty
public void addProperty(Property prop, org.hibernate.annotations.common.reflection.XClass declaringClass)
-
movePropertyToJoin
public void movePropertyToJoin(Property property, Join join, org.hibernate.annotations.common.reflection.XClass declaringClass)
-
handleGenericComponentProperty
public static void handleGenericComponentProperty(Property property, MetadataBuildingContext context)
Embeddable classes can be defined using generics. For this reason, we must check every property value and specially handle generic components by setting the property as generic, to later be able to resolve its concrete type, and creating a new component with correctly typed sub-properties for the metamodel.
-
getClassName
public String getClassName()
-
getEntityOwnerClassName
public String getEntityOwnerClassName()
-
getTable
public Table getTable()
-
isComponent
public boolean isComponent()
-
isEntity
public boolean isEntity()
-
getPersistentClass
public PersistentClass getPersistentClass()
-
getIdentifier
public KeyValue getIdentifier()
-
isOrWithinEmbeddedId
public boolean isOrWithinEmbeddedId()
Description copied from interface:PropertyHolderReturn true if this component is or is embedded in a @EmbeddedId
-
isWithinElementCollection
public boolean isWithinElementCollection()
Description copied from interface:PropertyHolderReturn true if this component is within an @ElementCollection.
-
-