Top Fields Constructors Methods
org.hibernate.boot.model.internal

public Class ClassPropertyHolder

extends AbstractPropertyHolder
Class Inheritance
Imports
java.util.ArrayList, .HashMap, .Iterator, .List, .Map, java.util.function.Consumer, org.hibernate.AssertionFailure, .MappingException, .PropertyNotFoundException, org.hibernate.annotations.common.reflection.XClass, .XProperty, org.hibernate.boot.spi.MetadataBuildingContext, .PropertyData, .SecondPass, org.hibernate.internal.util.collections.CollectionHelper, org.hibernate.mapping.Collection, .Component, .IndexedCollection, .Join, .KeyValue, .MappedSuperclass, .PersistentClass, .Property, .SimpleValue, .Table, .ToOne, .Value, jakarta.persistence.Convert, .Converts, .JoinTable

Author
Emmanuel Bernard

Field Summary

Modifier and TypeField and Description
private final Map<String, AttributeConversionInfo>
private EntityBinder
private final Map<XClass, InheritanceState>
private Map<String, Join>
private transient Map<String, Join>
private final PersistentClass
Inherited from org.hibernate.boot.model.internal.AbstractPropertyHolder:
parent

Constructor Summary

AccessConstructor and Description
public
ClassPropertyHolder(PersistentClass persistentClass, XClass entityXClass, Map<String, Join> joins, MetadataBuildingContext context, Map<XClass, InheritanceState> inheritanceStatePerClass)

public
ClassPropertyHolder(PersistentClass persistentClass, XClass entityXClass, EntityBinder entityBinder, MetadataBuildingContext context, Map<XClass, InheritanceState> inheritanceStatePerClass)

Method Summary

Modifier and TypeMethod and Description
public Join
addJoin(JoinTable joinTableAnn, boolean noDelayInPkColumnCreation)

Implements org.hibernate.boot.model.internal.PropertyHolder.addJoin.

public Join
addJoin(JoinTable joinTable, Table table, boolean noDelayInPkColumnCreation)

Implements org.hibernate.boot.model.internal.PropertyHolder.addJoin.

public void
public void
private void
addPropertyToJoin(Property property, XClass declaringClass, Join join)

private void
private void
addPropertyToPersistentClass(Property property, XClass declaringClass)

protected Map<String, AttributeConversionInfo>
private void
public String
private static List<XProperty>
getDeclaredProperties(XClass declaringClass, String accessType)

public String
public String
public KeyValue
private Map<String, Join>
getJoinsPerRealTableName()

Needed for proper compliance with naming strategy, the property table can be overridden if the properties are part of secondary tables

public PersistentClass
public Table
private static String
private static String
public static void
handleGenericComponentProperty(Property property, MetadataBuildingContext context)

Embeddable classes can be defined using generics.

public boolean
public boolean
public boolean
isOrWithinEmbeddedId()

Implements org.hibernate.boot.model.internal.PropertyHolder.isOrWithinEmbeddedId.

Return true if this component is or is embedded in a @EmbeddedId
public boolean
isWithinElementCollection()

Implements org.hibernate.boot.model.internal.PropertyHolder.isWithinElementCollection.

Return true if this component is within an @ElementCollection.
protected AttributeConversionInfo
protected AttributeConversionInfo
protected String
protected String
pack-priv static void
prepareActualProperty(Property prop, Class<?> type, boolean allowCollections, MetadataBuildingContext context, Consumer<Property> propertyConsumer)

private static void
setTypeName(Value value, String typeName)

public void
startingProperty(XProperty
The property
property
)

Implements org.hibernate.boot.model.internal.PropertyHolder.startingProperty.

Called during binding to allow the PropertyHolder to inspect its discovered properties.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.hibernate.boot.model.internal.AbstractPropertyHolder:
buildExceptionFromInstantiationErrorgetContextgetJoinTablegetOverriddenColumngetOverriddenColumnTransformergetOverriddenForeignKeygetOverriddenJoinColumngetOverriddenJoinTablegetPathisInIdClassmakeAttributeConverterDescriptorresolveAttributeConverterDescriptorsetCurrentPropertysetInIdClasssetParentProperty

Field Detail

attributeConversionInfoMapback to summary
private final Map<String, AttributeConversionInfo> attributeConversionInfoMap
entityBinderback to summary
private EntityBinder entityBinder
inheritanceStatePerClassback to summary
private final Map<XClass, InheritanceState> inheritanceStatePerClass
joinsback to summary
private Map<String, Join> joins
joinsPerRealTableNameback to summary
private transient Map<String, Join> joinsPerRealTableName
persistentClassback to summary
private final PersistentClass persistentClass

Constructor Detail

ClassPropertyHolderback to summary
public ClassPropertyHolder(PersistentClass persistentClass, XClass entityXClass, Map<String, Join> joins, MetadataBuildingContext context, Map<XClass, InheritanceState> inheritanceStatePerClass)
ClassPropertyHolderback to summary
public ClassPropertyHolder(PersistentClass persistentClass, XClass entityXClass, EntityBinder entityBinder, MetadataBuildingContext context, Map<XClass, InheritanceState> inheritanceStatePerClass)

Method Detail

addJoinback to summary
public Join addJoin(JoinTable joinTableAnn, boolean noDelayInPkColumnCreation)

Implements org.hibernate.boot.model.internal.PropertyHolder.addJoin.

Annotations
@Override
addJoinback to summary
public Join addJoin(JoinTable joinTable, Table table, boolean noDelayInPkColumnCreation)

Implements org.hibernate.boot.model.internal.PropertyHolder.addJoin.

Annotations
@Override
addPropertyback to summary
public void addProperty(Property prop, AnnotatedColumns columns, XClass declaringClass)

Implements org.hibernate.boot.model.internal.PropertyHolder.addProperty.

Annotations
@Override
addPropertyback to summary
public void addProperty(Property prop, XClass declaringClass)

Implements org.hibernate.boot.model.internal.PropertyHolder.addProperty.

Annotations
@Override
addPropertyToJoinback to summary
private void addPropertyToJoin(Property property, XClass declaringClass, Join join)
addPropertyToMappedSuperclassback to summary
private void addPropertyToMappedSuperclass(Property prop, XClass declaringClass)
addPropertyToPersistentClassback to summary
private void addPropertyToPersistentClass(Property property, XClass declaringClass)
buildAttributeConversionInfoMapback to summary
protected Map<String, AttributeConversionInfo> buildAttributeConversionInfoMap(XClass entityXClass)
collectAttributeConversionInfoback to summary
private void collectAttributeConversionInfo(Map<String, AttributeConversionInfo> infoMap, XClass xClass)
getClassNameback to summary
public String getClassName()

Implements org.hibernate.boot.model.internal.PropertyHolder.getClassName.

Annotations
@Override
getDeclaredPropertiesback to summary
private static List<XProperty> getDeclaredProperties(XClass declaringClass, String accessType)
getEntityNameback to summary
public String getEntityName()

Implements org.hibernate.boot.model.internal.PropertyHolder.getEntityName.

Annotations
@Override
getEntityOwnerClassNameback to summary
public String getEntityOwnerClassName()

Implements org.hibernate.boot.model.internal.PropertyHolder.getEntityOwnerClassName.

Annotations
@Override
getIdentifierback to summary
public KeyValue getIdentifier()

Implements org.hibernate.boot.model.internal.PropertyHolder.getIdentifier.

Annotations
@Override
getJoinsPerRealTableNameback to summary
private Map<String, Join> getJoinsPerRealTableName()

Needed for proper compliance with naming strategy, the property table can be overridden if the properties are part of secondary tables

getPersistentClassback to summary
public PersistentClass getPersistentClass()

Implements org.hibernate.boot.model.internal.PropertyHolder.getPersistentClass.

Annotations
@Override
getTableback to summary
public Table getTable()

Implements org.hibernate.boot.model.internal.PropertyHolder.getTable.

Annotations
@Override
getTypeNameback to summary
private static String getTypeName(Property property)
getTypeNameback to summary
private static String getTypeName(Value value)
handleGenericComponentPropertyback to summary
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.

isComponentback to summary
public boolean isComponent()

Implements org.hibernate.boot.model.internal.PropertyHolder.isComponent.

Annotations
@Override
isEntityback to summary
public boolean isEntity()

Implements org.hibernate.boot.model.internal.PropertyHolder.isEntity.

Annotations
@Override
isOrWithinEmbeddedIdback to summary
public boolean isOrWithinEmbeddedId()

Implements org.hibernate.boot.model.internal.PropertyHolder.isOrWithinEmbeddedId.

Doc from org.hibernate.boot.model.internal.PropertyHolder.isOrWithinEmbeddedId.

Return true if this component is or is embedded in a @EmbeddedId

Annotations
@Override
isWithinElementCollectionback to summary
public boolean isWithinElementCollection()

Implements org.hibernate.boot.model.internal.PropertyHolder.isWithinElementCollection.

Doc from org.hibernate.boot.model.internal.PropertyHolder.isWithinElementCollection.

Return true if this component is within an @ElementCollection.

Annotations
@Override
locateAttributeConversionInfoback to summary
protected AttributeConversionInfo locateAttributeConversionInfo(XProperty property)

Implements abstract org.hibernate.boot.model.internal.AbstractPropertyHolder.locateAttributeConversionInfo.

Annotations
@Override
locateAttributeConversionInfoback to summary
protected AttributeConversionInfo locateAttributeConversionInfo(String path)

Implements abstract org.hibernate.boot.model.internal.AbstractPropertyHolder.locateAttributeConversionInfo.

Annotations
@Override
normalizeCompositePathback to summary
protected String normalizeCompositePath(String attributeName)

Implements abstract org.hibernate.boot.model.internal.AbstractPropertyHolder.normalizeCompositePath.

Annotations
@Override
normalizeCompositePathForLoggingback to summary
protected String normalizeCompositePathForLogging(String attributeName)

Implements abstract org.hibernate.boot.model.internal.AbstractPropertyHolder.normalizeCompositePathForLogging.

Annotations
@Override
prepareActualPropertyback to summary
pack-priv static void prepareActualProperty(Property prop, Class<?> type, boolean allowCollections, MetadataBuildingContext context, Consumer<Property> propertyConsumer)
setTypeNameback to summary
private static void setTypeName(Value value, String typeName)
startingPropertyback to summary
public void startingProperty(XProperty property)

Implements org.hibernate.boot.model.internal.PropertyHolder.startingProperty.

Doc from org.hibernate.boot.model.internal.PropertyHolder.startingProperty.

Called 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:XProperty

The property

Annotations
@Override
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