Class ToOne

All Implemented Interfaces:
Serializable, Fetchable, KeyValue, SortableValue, Value
Direct Known Subclasses:
ManyToOne, OneToOne

public abstract sealed class ToOne extends SimpleValue implements Fetchable, SortableValue permits OneToOne, ManyToOne
A mapping model object representing an association where the target side has cardinality one.
See Also:
  • Field Details

    • referencedPropertyName

      protected String referencedPropertyName
  • Constructor Details

  • Method Details

    • getFetchMode

      public FetchMode getFetchMode()
      Specified by:
      getFetchMode in interface Fetchable
      Specified by:
      getFetchMode in interface Value
      Overrides:
      getFetchMode in class SimpleValue
    • setFetchMode

      public void setFetchMode(FetchMode fetchMode)
      Specified by:
      setFetchMode in interface Fetchable
    • getReferencedPropertyName

      public String getReferencedPropertyName()
    • setReferencedPropertyName

      public void setReferencedPropertyName(String name)
    • getReferencedEntityName

      public String getReferencedEntityName()
    • setReferencedEntityName

      public void setReferencedEntityName(String referencedEntityName)
    • getPropertyName

      public String getPropertyName()
    • setPropertyName

      public void setPropertyName(String propertyName)
    • setTypeUsingReflection

      public void setTypeUsingReflection(String className, String propertyName) throws MappingException
      Specified by:
      setTypeUsingReflection in interface Value
      Overrides:
      setTypeUsingReflection in class SimpleValue
      Throws:
      MappingException
    • isTypeSpecified

      public boolean isTypeSpecified()
      Overrides:
      isTypeSpecified in class SimpleValue
    • isSame

      public boolean isSame(SimpleValue other)
      Overrides:
      isSame in class SimpleValue
    • isSame

      public boolean isSame(ToOne other)
    • isValid

      public boolean isValid(MappingContext mappingContext) throws MappingException
      Specified by:
      isValid in interface Value
      Overrides:
      isValid in class SimpleValue
      Throws:
      MappingException
    • isLazy

      public boolean isLazy()
      Specified by:
      isLazy in interface Fetchable
    • setLazy

      public void setLazy(boolean lazy)
      Specified by:
      setLazy in interface Fetchable
    • isUnwrapProxy

      public boolean isUnwrapProxy()
    • setUnwrapProxy

      public void setUnwrapProxy(boolean unwrapProxy)
    • isUnwrapProxyImplicit

      public boolean isUnwrapProxyImplicit()
    • setUnwrapProxyImplicit

      public void setUnwrapProxyImplicit(boolean unwrapProxyImplicit)
      Related to HHH-13658 - keep track of whether `unwrapProxy` is an implicit value for reference later
    • isReferenceToPrimaryKey

      public boolean isReferenceToPrimaryKey()
    • setReferenceToPrimaryKey

      public void setReferenceToPrimaryKey(boolean referenceToPrimaryKey)
    • isSorted

      public boolean isSorted()
      Specified by:
      isSorted in interface SortableValue
    • setSorted

      public void setSorted(boolean sorted)
    • sortProperties

      public int[] sortProperties()
      Specified by:
      sortProperties in interface SortableValue
    • createForeignKey

      public void createForeignKey(PersistentClass referencedEntity, org.hibernate.boot.model.internal.AnnotatedJoinColumns joinColumns)
      Overrides:
      createForeignKey in class SimpleValue
    • createForeignKey

      public void createForeignKey()
      Specified by:
      createForeignKey in interface Value
      Overrides:
      createForeignKey in class SimpleValue