Class 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 :(
    • Method Detail

      • startingProperty

        public void startingProperty​(org.hibernate.annotations.common.reflection.XProperty property)
        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:
        property - The property
      • getEntityName

        public java.lang.String getEntityName()
      • addProperty

        public void addProperty​(Property prop,
                                Ejb3Column[] columns,
                                org.hibernate.annotations.common.reflection.XClass declaringClass)
      • addJoin

        public Join addJoin​(JoinTable joinTableAnn,
                            boolean noDelayInPkColumnCreation)
      • getClassName

        public java.lang.String getClassName()
      • getEntityOwnerClassName

        public java.lang.String getEntityOwnerClassName()
      • getTable

        public Table getTable()
      • addProperty

        public void addProperty​(Property prop,
                                org.hibernate.annotations.common.reflection.XClass 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 withing an @ElementCollection.
      • isComponent

        public boolean isComponent()
      • isEntity

        public boolean isEntity()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object