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 :(
- Author:
- Steve Ebersole, Emmanuel Bernard
-
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<XClass, InheritanceState> inheritanceStatePerClass) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(Property prop, XClass declaringClass) voidaddProperty(Property property, AnnotatedColumns columns, XClass declaringClass) Column[]getOverriddenColumn(String propertyName) Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothinggetOverriddenJoinColumn(String propertyName) Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothinggetTable()booleanbooleanisEntity()booleanReturn true if this component is or is embedded in a @EmbeddedIdbooleanReturn true if this component is within an @ElementCollection.protected AttributeConversionInfoprotected AttributeConversionInfolocateAttributeConversionInfo(XProperty property) protected StringnormalizeCompositePath(String attributeName) protected StringnormalizeCompositePathForLogging(String attributeName) voidsetParentProperty(String parentProperty) voidstartingProperty(XProperty property) 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, getOverriddenJoinTable, getPath, isInIdClass, makeAttributeConverterDescriptor, resolveAttributeConverterDescriptor, setCurrentProperty, setInIdClass
-
Constructor Details
-
ComponentPropertyHolder
public ComponentPropertyHolder(Component component, String path, PropertyData inferredData, PropertyHolder parent, MetadataBuildingContext context, Map<XClass, InheritanceState> inheritanceStatePerClass)
-
-
Method Details
-
normalizeCompositePath
- Specified by:
normalizeCompositePathin classAbstractPropertyHolder
-
normalizeCompositePathForLogging
- Specified by:
normalizeCompositePathForLoggingin classAbstractPropertyHolder
-
startingProperty
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
- Specified by:
locateAttributeConversionInfoin classAbstractPropertyHolder
-
locateAttributeConversionInfo
- Specified by:
locateAttributeConversionInfoin classAbstractPropertyHolder
-
getEntityName
-
addProperty
-
addJoin
-
addJoin
-
getClassName
-
getEntityOwnerClassName
-
getAggregateColumn
-
getTable
-
addProperty
-
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. -
getPersistentClass
-
isComponent
public boolean isComponent() -
isEntity
public boolean isEntity() -
setParentProperty
- Specified by:
setParentPropertyin interfacePropertyHolder- Overrides:
setParentPropertyin classAbstractPropertyHolder
-
getOverriddenColumn
Description copied from class:AbstractPropertyHolderGet 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:
getOverriddenColumnin interfacePropertyHolder- Overrides:
getOverriddenColumnin classAbstractPropertyHolder
-
getOverriddenJoinColumn
Description copied from class:AbstractPropertyHolderGet 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:
getOverriddenJoinColumnin interfacePropertyHolder- Overrides:
getOverriddenJoinColumnin classAbstractPropertyHolder
-
toString
-