Record Class ColumnDefinitionRequest

java.lang.Object
java.lang.Record
org.hibernate.dialect.schema.spi.ColumnDefinitionRequest

@SPI(USE) public record ColumnDefinitionRequest(String sqlType, @Nullable String renderedCollation, boolean nullable, @Nullable String defaultExpression, @Nullable String generatedExpression) extends Record

Provides the rendered inputs for a non-identity column definition.

The collation value is the rendered collation name, while default and generated values are expressions without their surrounding clauses.

Since:
8.0
  • Constructor Details

    • ColumnDefinitionRequest

      public ColumnDefinitionRequest(String sqlType, @Nullable String renderedCollation, boolean nullable, @Nullable String defaultExpression, @Nullable String generatedExpression)
      Creates an instance of a ColumnDefinitionRequest record class.
      Parameters:
      sqlType - the value for the sqlType record component
      renderedCollation - the value for the renderedCollation record component
      nullable - the value for the nullable record component
      defaultExpression - the value for the defaultExpression record component
      generatedExpression - the value for the generatedExpression record component
  • Method Details

    • 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.
    • sqlType

      public String sqlType()
      Returns the value of the sqlType record component.
      Returns:
      the value of the sqlType record component
    • renderedCollation

      @Nullable public String renderedCollation()
      Returns the value of the renderedCollation record component.
      Returns:
      the value of the renderedCollation record component
    • nullable

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

      @Nullable public String defaultExpression()
      Returns the value of the defaultExpression record component.
      Returns:
      the value of the defaultExpression record component
    • generatedExpression

      @Nullable public String generatedExpression()
      Returns the value of the generatedExpression record component.
      Returns:
      the value of the generatedExpression record component