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

public Class CollectionPropertyHolder

extends AbstractPropertyHolder
Class Inheritance
Imports
java.util.HashMap, .Locale, .Map, org.hibernate.AssertionFailure, org.hibernate.annotations.CollectionType, .ManyToAny, .MapKeyType, org.hibernate.annotations.common.reflection.XClass, .XProperty, org.hibernate.boot.model.convert.spi.ConverterDescriptor, org.hibernate.boot.spi.MetadataBuildingContext, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.mapping.Collection, .Join, .KeyValue, .PersistentClass, .Property, .Table, jakarta.persistence.Convert, .Converts, .Enumerated, .JoinTable, .ManyToMany, .MapKeyClass, .MapKeyEnumerated, .MapKeyTemporal, .OneToMany, .Temporal

Authors
Emmanuel Bernard, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private final Collection
private final Map<String, AttributeConversionInfo>
private final Map<String, AttributeConversionInfo>
private static final CoreMessageLogger
pack-priv boolean
Inherited from org.hibernate.boot.model.internal.AbstractPropertyHolder:
parent

Constructor Summary

AccessConstructor and Description
public
CollectionPropertyHolder(Collection collection, String path, XClass clazzToProcess, XProperty property, PropertyHolder parentPropertyHolder, MetadataBuildingContext context)

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 joinTableAnn, Table table, boolean noDelayInPkColumnCreation)

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

public void
public void
private void
applyLocalConvert(Convert convertAnnotation, XProperty collectionProperty, boolean isComposite, Map<String, AttributeConversionInfo> elementAttributeConversionInfoMap, Map<String, AttributeConversionInfo> keyAttributeConversionInfoMap)

private void
buildAttributeConversionInfoMaps(XProperty collectionProperty, boolean isComposite, Map<String, AttributeConversionInfo> elementAttributeConversionInfoMap, Map<String, AttributeConversionInfo> keyAttributeConversionInfoMap)

public String
public Collection
public String
public String
public KeyValue
public PersistentClass
public Table
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
public ConverterDescriptor
protected String
protected String
public void
prepare(XProperty collectionProperty, boolean isComposite)

private String

Returns:

Path without prefix, or null, if path did not have the prefix.
removePrefix
(String
Path.
path
,
String
Prefix.
prefix
)

Check if path has the given prefix and remove it.

private String
removePrefix(String path, String prefix, String defaultValue)

public ConverterDescriptor
resolveElementAttributeConverterDescriptor(XProperty collectionXProperty, XClass elementXClass)

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

canElementBeConvertedback to summary
private boolean canElementBeConverted
canKeyBeConvertedback to summary
private boolean canKeyBeConverted
collectionback to summary
private final Collection collection
elementAttributeConversionInfoMapback to summary
private final Map<String, AttributeConversionInfo> elementAttributeConversionInfoMap
keyAttributeConversionInfoMapback to summary
private final Map<String, AttributeConversionInfo> keyAttributeConversionInfoMap
logback to summary
private static final CoreMessageLogger log

Hides org.hibernate.boot.model.internal.AbstractPropertyHolder.log.

preparedback to summary
pack-priv boolean prepared

Constructor Detail

CollectionPropertyHolderback to summary
public CollectionPropertyHolder(Collection collection, String path, XClass clazzToProcess, XProperty property, PropertyHolder parentPropertyHolder, MetadataBuildingContext context)

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 joinTableAnn, Table table, boolean noDelayInPkColumnCreation)

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

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

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

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

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

Annotations
@Override
applyLocalConvertback to summary
private void applyLocalConvert(Convert convertAnnotation, XProperty collectionProperty, boolean isComposite, Map<String, AttributeConversionInfo> elementAttributeConversionInfoMap, Map<String, AttributeConversionInfo> keyAttributeConversionInfoMap)
buildAttributeConversionInfoMapsback to summary
private void buildAttributeConversionInfoMaps(XProperty collectionProperty, boolean isComposite, Map<String, AttributeConversionInfo> elementAttributeConversionInfoMap, Map<String, AttributeConversionInfo> keyAttributeConversionInfoMap)
getClassNameback to summary
public String getClassName()

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

Annotations
@Override
getCollectionBindingback to summary
public Collection getCollectionBinding()
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
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
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
mapKeyAttributeConverterDescriptorback to summary
public ConverterDescriptor mapKeyAttributeConverterDescriptor(XProperty mapXProperty, XClass keyXClass)
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
prepareback to summary
public void prepare(XProperty collectionProperty, boolean isComposite)
removePrefixback to summary
private String removePrefix(String path, String prefix)

Check if path has the given prefix and remove it.

Parameters
path:String

Path.

prefix:String

Prefix.

Returns:String

Path without prefix, or null, if path did not have the prefix.

removePrefixback to summary
private String removePrefix(String path, String prefix, String defaultValue)
resolveElementAttributeConverterDescriptorback to summary
public ConverterDescriptor resolveElementAttributeConverterDescriptor(XProperty collectionXProperty, XClass elementXClass)
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