Record Class ColumnDescriptor

java.lang.Object
java.lang.Record
org.hibernate.action.queue.spi.meta.ColumnDescriptor
Record Components:
name - Column name from the mapping model.
selectionExpression - The SQL selection expression for this column.
tableName - Table name containing this column.
jdbcMapping - Details about the JDBC type of the column.
All Implemented Interfaces:
Serializable, SelectableMapping, SqlTypedMapping

@Incubating public record ColumnDescriptor(String name, String selectionExpression, String tableName, JdbcMapping jdbcMapping, String writeFragment, boolean isFormula, boolean nullable, boolean insertable, boolean updatable, boolean isPartitioned) extends Record implements SelectableMapping, Serializable

Immutable descriptor for a column involved in a mutation.

Extends existing ColumnDetails with additional mutation context.

Since:
8.0
See Also:
  • Constructor Details

    • ColumnDescriptor

      public ColumnDescriptor(String name, String selectionExpression, String tableName, JdbcMapping jdbcMapping, String writeFragment, boolean isFormula, boolean nullable, boolean insertable, boolean updatable, boolean isPartitioned)
      Creates an instance of a ColumnDescriptor record class.
      Parameters:
      name - the value for the name record component
      selectionExpression - the value for the selectionExpression record component
      tableName - the value for the tableName record component
      jdbcMapping - the value for the jdbcMapping record component
      writeFragment - the value for the writeFragment record component
      isFormula - the value for the isFormula record component
      nullable - the value for the nullable record component
      insertable - the value for the insertable record component
      updatable - the value for the updatable record component
      isPartitioned - the value for the isPartitioned record component
  • Method Details

    • from

      public static ColumnDescriptor from(SelectableMapping selectable)
    • createValueDescriptor

      public JdbcValueDescriptor createValueDescriptor(ParameterUsage parameterUsage, int parameterIndex)
    • getContainingTableExpression

      public String getContainingTableExpression()
      Description copied from interface: SelectableMapping
      The name of the table to which this selectable is mapped
      Specified by:
      getContainingTableExpression in interface SelectableMapping
    • getSelectionExpression

      public String getSelectionExpression()
      Description copied from interface: SelectableMapping
      The selection's expression. This is the column name or formula
      Specified by:
      getSelectionExpression in interface SelectableMapping
    • getSelectableName

      public String getSelectableName()
      Specified by:
      getSelectableName in interface SelectableMapping
    • getCustomReadExpression

      @Nullable public String getCustomReadExpression()
      Description copied from interface: SelectableMapping
      The selection's read expression accounting for formula treatment as well as ColumnTransformer.read()
      Specified by:
      getCustomReadExpression in interface SelectableMapping
    • getCustomWriteExpression

      public String getCustomWriteExpression()
      Description copied from interface: SelectableMapping
      The selection's write expression accounting ColumnTransformer.write()
      Specified by:
      getCustomWriteExpression in interface SelectableMapping
    • isNullable

      public boolean isNullable()
      Description copied from interface: SelectableMapping
      Is the mapping considered nullable?
      Specified by:
      isNullable in interface SelectableMapping
    • isInsertable

      public boolean isInsertable()
      Specified by:
      isInsertable in interface SelectableMapping
    • isUpdateable

      public boolean isUpdateable()
      Specified by:
      isUpdateable in interface SelectableMapping
    • getLength

      @Nullable public Long getLength()
      Specified by:
      getLength in interface SqlTypedMapping
    • getArrayLength

      @Nullable public Integer getArrayLength()
      Specified by:
      getArrayLength in interface SqlTypedMapping
    • getPrecision

      @Nullable public Integer getPrecision()
      Specified by:
      getPrecision in interface SqlTypedMapping
    • getScale

      @Nullable public Integer getScale()
      Specified by:
      getScale in interface SqlTypedMapping
    • getTemporalPrecision

      @Nullable public Integer getTemporalPrecision()
      Specified by:
      getTemporalPrecision in interface SqlTypedMapping
    • getJdbcMapping

      public JdbcMapping getJdbcMapping()
      Specified by:
      getJdbcMapping in interface SqlTypedMapping
    • 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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • selectionExpression

      public String selectionExpression()
      Returns the value of the selectionExpression record component.
      Returns:
      the value of the selectionExpression record component
    • tableName

      public String tableName()
      Returns the value of the tableName record component.
      Returns:
      the value of the tableName record component
    • jdbcMapping

      public JdbcMapping jdbcMapping()
      Returns the value of the jdbcMapping record component.
      Returns:
      the value of the jdbcMapping record component
    • writeFragment

      public String writeFragment()
      Returns the value of the writeFragment record component.
      Returns:
      the value of the writeFragment record component
    • isFormula

      public boolean isFormula()
      Returns the value of the isFormula record component.
      Specified by:
      isFormula in interface SelectableMapping
      Returns:
      the value of the isFormula record component
    • nullable

      public boolean nullable()
      Returns the value of the nullable record component.
      Returns:
      the value of the nullable record component
    • insertable

      public boolean insertable()
      Returns the value of the insertable record component.
      Returns:
      the value of the insertable record component
    • updatable

      public boolean updatable()
      Returns the value of the updatable record component.
      Returns:
      the value of the updatable record component
    • isPartitioned

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