Class ManyToOneAttribute

java.lang.Object
org.hibernate.envers.boot.model.ManyToOneAttribute
All Implemented Interfaces:
Attribute, Bindable<Serializable>, Cloneable<Attribute>, ColumnContainer, Keyable, PluralAttribute

public class ManyToOneAttribute extends Object implements PluralAttribute, Keyable
Represents a plural attribute mapping of a many-to-one or key-many-to-one.
  • Constructor Details

    • ManyToOneAttribute

      public ManyToOneAttribute(String name, String type, boolean insertable, boolean updatable, boolean key, String explicitType)
    • ManyToOneAttribute

      public ManyToOneAttribute(ManyToOneAttribute other)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Attribute
      Get the name of the attribute
      Specified by:
      getName in interface Attribute
      Returns:
      the attribute's name
    • setName

      public void setName(String name)
      Description copied from interface: Attribute
      Set the name of the attribute
      Specified by:
      setName in interface Attribute
      Parameters:
      name - the attribute's name
    • setKey

      public void setKey(boolean key)
      Description copied from interface: Keyable
      Set whether this attribute should or shouldn't participate as a key attribute.
      Specified by:
      setKey in interface Keyable
      Parameters:
      key - specifies if the attribute is part of the key
    • isKey

      public boolean isKey()
      Description copied from interface: Keyable
      Get whether the attribute is already participatig in a key.
      Specified by:
      isKey in interface Keyable
      Returns:
      true if the attribute is in the key; false otherwise
    • getOnDelete

      public String getOnDelete()
    • setOnDelete

      public void setOnDelete(String onDelete)
    • getColumns

      public List<Column> getColumns()
      Description copied from interface: ColumnContainer
      Get all columns that are part of this property
      Specified by:
      getColumns in interface ColumnContainer
      Returns:
      unmodifiable list of property columns
    • addColumn

      public void addColumn(Column column)
      Description copied from interface: ColumnContainer
      Add a column to the container.
      Specified by:
      addColumn in interface ColumnContainer
      Parameters:
      column - the column, must not be null
    • setForeignKey

      public void setForeignKey(String foreignKey)
    • deepCopy

      public ManyToOneAttribute deepCopy()
      Description copied from interface: Cloneable
      Creates a new, deep-copied instance of this object
      Specified by:
      deepCopy in interface Cloneable<Attribute>
      Returns:
      a deep-copy clone of the referenced object
    • build

      public Serializable build()
      Description copied from interface: Bindable
      Builds the specified binded class type.
      Specified by:
      build in interface Bindable<Serializable>
      Returns:
      instance of the bindable class type, never null