Class ComponentPropertyHolder
java.lang.Object
org.hibernate.boot.model.internal.AbstractPropertyHolder
org.hibernate.boot.model.internal.ComponentPropertyHolder
- All Implemented Interfaces:
PropertyHolder
PropertyHolder
for composites (Embeddable/Embedded).
To facilitate code comments, I'll often refer to this example:
@Embeddable @Convert( attributeName="city", ... ) class Address { ... @Convert(...) public String city; } @Entity @Convert( attributeName="homeAddress.city", ... ) class Person { ... @Embedded @Convert( attributeName="city", ... ) public Address homeAddress; }
As you can see, lots of ways to specify the conversion for embeddable attributes :(
-
Field Summary
Fields inherited from class org.hibernate.boot.model.internal.AbstractPropertyHolder
parent
-
Constructor Summary
ConstructorsConstructorDescriptionComponentPropertyHolder
(Component component, String path, PropertyData inferredData, PropertyHolder parent, MetadataBuildingContext context, Map<org.hibernate.models.spi.ClassDetails, InheritanceState> inheritanceStatePerClass) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(Property property, org.hibernate.models.spi.MemberDetails attributeMemberDetails, AnnotatedColumns columns, org.hibernate.models.spi.ClassDetails declaringClass) void
addProperty
(Property prop, org.hibernate.models.spi.MemberDetails attributeMemberDetails, org.hibernate.models.spi.ClassDetails declaringClass) Column[]
getOverriddenColumn
(String propertyName) Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothinggetTable()
boolean
boolean
isEntity()
boolean
Return true if this component is or is embedded in a @EmbeddedIdboolean
Return true if this component is within an @ElementCollection.protected AttributeConversionInfo
protected AttributeConversionInfo
locateAttributeConversionInfo
(org.hibernate.models.spi.MemberDetails attributeMember) protected String
normalizeCompositePath
(String attributeName) protected String
normalizeCompositePathForLogging
(String attributeName) void
setParentProperty
(String parentProperty) void
startingProperty
(org.hibernate.models.spi.MemberDetails propertyMemberDetails) Called during binding to allow the PropertyHolder to inspect its discovered properties.toString()
Methods inherited from class org.hibernate.boot.model.internal.AbstractPropertyHolder
buildExceptionFromInstantiationError, getContext, getJoinTable, getOverriddenColumnTransformer, getOverriddenForeignKey, getOverriddenJoinColumn, getOverriddenJoinTable, getPath, getSourceModelContext, isInIdClass, makeAttributeConverterDescriptor, resolveAttributeConverterDescriptor, setCurrentProperty, setInIdClass
-
Constructor Details
-
ComponentPropertyHolder
public ComponentPropertyHolder(Component component, String path, PropertyData inferredData, PropertyHolder parent, MetadataBuildingContext context, Map<org.hibernate.models.spi.ClassDetails, InheritanceState> inheritanceStatePerClass)
-
-
Method Details
-
normalizeCompositePath
- Specified by:
normalizeCompositePath
in classAbstractPropertyHolder
-
normalizeCompositePathForLogging
- Specified by:
normalizeCompositePathForLogging
in classAbstractPropertyHolder
-
startingProperty
public void startingProperty(org.hibernate.models.spi.MemberDetails propertyMemberDetails) Description copied from interface:PropertyHolder
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:
propertyMemberDetails
- The property
-
locateAttributeConversionInfo
protected AttributeConversionInfo locateAttributeConversionInfo(org.hibernate.models.spi.MemberDetails attributeMember) - Specified by:
locateAttributeConversionInfo
in classAbstractPropertyHolder
-
locateAttributeConversionInfo
- Specified by:
locateAttributeConversionInfo
in classAbstractPropertyHolder
-
getEntityName
-
addProperty
public void addProperty(Property property, org.hibernate.models.spi.MemberDetails attributeMemberDetails, AnnotatedColumns columns, org.hibernate.models.spi.ClassDetails declaringClass) -
addJoin
-
addJoin
-
getClassName
-
getEntityOwnerClassName
-
getAggregateColumn
-
getTable
-
addProperty
public void addProperty(Property prop, org.hibernate.models.spi.MemberDetails attributeMemberDetails, org.hibernate.models.spi.ClassDetails declaringClass) -
getIdentifier
-
isOrWithinEmbeddedId
public boolean isOrWithinEmbeddedId()Description copied from interface:PropertyHolder
Return true if this component is or is embedded in a @EmbeddedId -
isWithinElementCollection
public boolean isWithinElementCollection()Description copied from interface:PropertyHolder
Return true if this component is within an @ElementCollection. -
getPersistentClass
-
isComponent
public boolean isComponent() -
isEntity
public boolean isEntity() -
setParentProperty
- Specified by:
setParentProperty
in interfacePropertyHolder
- Overrides:
setParentProperty
in classAbstractPropertyHolder
-
getOverriddenColumn
Description copied from class:AbstractPropertyHolder
Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothingThese rules are here to support both JPA 2 and legacy overriding rules.
- Specified by:
getOverriddenColumn
in interfacePropertyHolder
- Overrides:
getOverriddenColumn
in classAbstractPropertyHolder
-
toString
-