Record Class TableDescriptorAsTableMapping

java.lang.Object
java.lang.Record
org.hibernate.action.queue.spi.meta.TableDescriptorAsTableMapping
All Implemented Interfaces:
TableDetails, TableMapping

@Incubating public record TableDescriptorAsTableMapping(TableDescriptor descriptor, int relativePosition, boolean isIdentifierTable, boolean isInverse) extends Record implements TableMapping
Adapts a TableDescriptor to the TableMapping interface, allowing graph-based infrastructure to use standard SQL model mutation builders.
Since:
8.0
  • Constructor Details

    • TableDescriptorAsTableMapping

      public TableDescriptorAsTableMapping(TableDescriptor descriptor, int relativePosition, boolean isIdentifierTable, boolean isInverse)
      Creates an instance of a TableDescriptorAsTableMapping record class.
      Parameters:
      descriptor - the value for the descriptor record component
      relativePosition - the value for the relativePosition record component
      isIdentifierTable - the value for the isIdentifierTable record component
      isInverse - the value for the isInverse record component
  • Method Details

    • getTableName

      public String getTableName()
      Description copied from interface: TableMapping
      The name of the mapped table
      Specified by:
      getTableName in interface TableDetails
      Specified by:
      getTableName in interface TableMapping
    • isOptional

      public boolean isOptional()
      Description copied from interface: TableMapping
      Whether the table is mapped as optional
      Specified by:
      isOptional in interface TableMapping
    • getInsertDetails

      public TableMapping.MutationDetails getInsertDetails()
      Description copied from interface: TableMapping
      Details for insertion into this table
      Specified by:
      getInsertDetails in interface TableMapping
    • getUpdateDetails

      public TableMapping.MutationDetails getUpdateDetails()
      Description copied from interface: TableMapping
      Details for updating this table
      Specified by:
      getUpdateDetails in interface TableMapping
    • isCascadeDeleteEnabled

      public boolean isCascadeDeleteEnabled()
      Description copied from interface: TableMapping
      Whether deletions are cascaded to this table at the database level.
      Specified by:
      isCascadeDeleteEnabled in interface TableMapping
      See Also:
    • getDeleteDetails

      public TableMapping.MutationDetails getDeleteDetails()
      Description copied from interface: TableMapping
      Details for deleting from this table
      Specified by:
      getDeleteDetails in interface TableMapping
    • getKeyDetails

      public TableDetails.KeyDetails getKeyDetails()
      Description copied from interface: TableDetails
      Details about the primary-key of this table
      Specified by:
      getKeyDetails in interface TableDetails
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • descriptor

      public TableDescriptor descriptor()
      Returns the value of the descriptor record component.
      Returns:
      the value of the descriptor record component
    • relativePosition

      public int relativePosition()
      Returns the value of the relativePosition record component.
      Specified by:
      relativePosition in interface TableMapping
      Returns:
      the value of the relativePosition record component
    • isIdentifierTable

      public boolean isIdentifierTable()
      Returns the value of the isIdentifierTable record component.
      Specified by:
      isIdentifierTable in interface TableDetails
      Specified by:
      isIdentifierTable in interface TableMapping
      Returns:
      the value of the isIdentifierTable record component
    • isInverse

      public boolean isInverse()
      Returns the value of the isInverse record component.
      Specified by:
      isInverse in interface TableMapping
      Returns:
      the value of the isInverse record component