Class ComponentPropertyHolder

java.lang.Object
org.hibernate.boot.model.internal.AbstractPropertyHolder
org.hibernate.boot.model.internal.ComponentPropertyHolder
All Implemented Interfaces:
PropertyHolder

public class ComponentPropertyHolder extends AbstractPropertyHolder
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 :(

  • Constructor Details

  • Method Details

    • getComponent

      public Component getComponent()
      Access to the underlying component
    • normalizeCompositePath

      protected String normalizeCompositePath(String attributeName)
      Specified by:
      normalizeCompositePath in class AbstractPropertyHolder
    • normalizeCompositePathForLogging

      protected String normalizeCompositePathForLogging(String attributeName)
      Specified by:
      normalizeCompositePathForLogging in class AbstractPropertyHolder
    • 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 class AbstractPropertyHolder
    • locateAttributeConversionInfo

      protected AttributeConversionInfo locateAttributeConversionInfo(String path)
      Specified by:
      locateAttributeConversionInfo in class AbstractPropertyHolder
    • getEntityName

      public String getEntityName()
    • addProperty

      public void addProperty(Property property, org.hibernate.models.spi.MemberDetails attributeMemberDetails, @Nullable AnnotatedColumns columns, org.hibernate.models.spi.ClassDetails declaringClass)
    • addJoin

      public Join addJoin(JoinTable joinTable, boolean noDelayInPkColumnCreation)
    • addJoin

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

      public String getClassName()
    • getEntityOwnerClassName

      public String getEntityOwnerClassName()
    • getAggregateColumn

      public AggregateColumn getAggregateColumn()
    • getTable

      public Table getTable()
    • addProperty

      public void addProperty(Property prop, org.hibernate.models.spi.MemberDetails attributeMemberDetails, org.hibernate.models.spi.ClassDetails declaringClass)
    • movePropertyToJoin

      public void movePropertyToJoin(Property prop, Join join, org.hibernate.models.spi.MemberDetails memberDetails, org.hibernate.models.spi.ClassDetails declaringClass)
    • getIdentifier

      public KeyValue 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

      public PersistentClass getPersistentClass()
    • isComponent

      public boolean isComponent()
    • isEntity

      public boolean isEntity()
    • setParentProperty

      public void setParentProperty(String parentProperty)
      Specified by:
      setParentProperty in interface PropertyHolder
      Overrides:
      setParentProperty in class AbstractPropertyHolder
    • getOverriddenColumn

      public Column[] getOverriddenColumn(String propertyName)
      Description copied from class: AbstractPropertyHolder
      Get column overriding, property first, then parent, then holder replace the placeholder 'collection&&element' with nothing

      These rules are here to support both JPA 2 and legacy overriding rules.

      Specified by:
      getOverriddenColumn in interface PropertyHolder
      Overrides:
      getOverriddenColumn in class AbstractPropertyHolder
    • toString

      public String toString()
      Overrides:
      toString in class Object