Class ManyToOne

All Implemented Interfaces:
Serializable, Fetchable, KeyValue, SortableValue, Value

public class ManyToOne extends ToOne
A mapping model object representing a many-to-one association.
See Also:
  • Constructor Details

  • Method Details

    • copy

      public ManyToOne copy()
    • getType

      public Type getType() throws MappingException
      Throws:
      MappingException
    • createUniqueKey

      public void createUniqueKey(MetadataBuildingContext context)
      Specified by:
      createUniqueKey in interface Value
      Overrides:
      createUniqueKey in class SimpleValue
    • createPropertyRefConstraints

      public void createPropertyRefConstraints(Map<String,PersistentClass> persistentClasses)
      Creates a foreign key constraint in the case that the foreign key of this association does not reference the primary key of the referenced table, but instead some other unique key.

      We depend here on having a property of the referenced entity that does hold the referenced unique key. We might have created a "synthetic" composite property for this purpose.

    • accept

      public Object accept(ValueVisitor visitor)
      Specified by:
      accept in interface Value
      Overrides:
      accept in class SimpleValue
    • getNotFoundAction

      public NotFoundAction getNotFoundAction()
    • setNotFoundAction

      public void setNotFoundAction(NotFoundAction notFoundAction)
    • isIgnoreNotFound

      public boolean isIgnoreNotFound()
    • setIgnoreNotFound

      public void setIgnoreNotFound(boolean ignoreNotFound)
    • markAsLogicalOneToOne

      public void markAsLogicalOneToOne()
    • isLogicalOneToOne

      public boolean isLogicalOneToOne()
    • isNullable

      public boolean isNullable()
      Specified by:
      isNullable in interface Value
      Overrides:
      isNullable in class SimpleValue