Class ColumnDTO

java.lang.Object
org.apache.gravitino.dto.rel.ColumnDTO
All Implemented Interfaces:
Column

public class ColumnDTO extends Object implements Column
Represents a Column DTO (Data Transfer Object).
  • Method Details

    • name

      public String name()
      Specified by:
      name in interface Column
      Returns:
      The name of this column.
    • dataType

      public Type dataType()
      Specified by:
      dataType in interface Column
      Returns:
      The data type of this column.
    • comment

      public String comment()
      Specified by:
      comment in interface Column
      Returns:
      The comment of this column, null if not specified.
    • nullable

      public boolean nullable()
      Specified by:
      nullable in interface Column
      Returns:
      True if this column may produce null values. Default is true.
    • autoIncrement

      public boolean autoIncrement()
      Specified by:
      autoIncrement in interface Column
      Returns:
      True if this column is an auto-increment column. Default is false.
    • defaultValue

      public Expression defaultValue()
      Specified by:
      defaultValue in interface Column
      Returns:
      The default value of this column, Column.DEFAULT_VALUE_NOT_SET if not specified
    • builder

      public static ColumnDTO.Builder builder()
      Creates a new Builder to build a Column DTO.
      Returns:
      A new Builder instance.
    • validate

      public void validate() throws IllegalArgumentException
      Validates the Column DTO.
      Throws:
      IllegalArgumentException - If some of the required fields are not set or if the column is non-nullable with a null default value, this method will throw an IllegalArgumentException.