Record Class ColumnMetaData

java.lang.Object
java.lang.Record
cool.scx.jdbc.meta_data.ColumnMetaData
All Implemented Interfaces:
Column

public record ColumnMetaData(String table, String name, DataTypeMetaData dataType, String defaultValue, String onUpdate, boolean notNull, boolean autoIncrement, boolean primary, boolean unique, boolean index, String comment) extends Record implements Column
  • Constructor Summary

    Constructors
    Constructor
    Description
    ColumnMetaData(String table, String name, DataTypeMetaData dataType, String defaultValue, String onUpdate, boolean notNull, boolean autoIncrement, boolean primary, boolean unique, boolean index, String comment)
    Creates an instance of a ColumnMetaData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the autoIncrement record component.
    Returns the value of the comment record component.
    Returns the value of the dataType record component.
    Returns the value of the defaultValue record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the index record component.
    Returns the value of the name record component.
    boolean
    Returns the value of the notNull record component.
    Returns the value of the onUpdate record component.
    boolean
    Returns the value of the primary record component.
    Returns the value of the table record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the unique record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ColumnMetaData

      public ColumnMetaData(String table, String name, DataTypeMetaData dataType, String defaultValue, String onUpdate, boolean notNull, boolean autoIncrement, boolean primary, boolean unique, boolean index, String comment)
      Creates an instance of a ColumnMetaData record class.
      Parameters:
      table - the value for the table record component
      name - the value for the name record component
      dataType - the value for the dataType record component
      defaultValue - the value for the defaultValue record component
      onUpdate - the value for the onUpdate record component
      notNull - the value for the notNull record component
      autoIncrement - the value for the autoIncrement record component
      primary - the value for the primary record component
      unique - the value for the unique record component
      index - the value for the index record component
      comment - the value for the comment 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.
    • table

      public String table()
      Returns the value of the table record component.
      Specified by:
      table in interface Column
      Returns:
      the value of the table record component
    • name

      public String name()
      Returns the value of the name record component.
      Specified by:
      name in interface Column
      Returns:
      the value of the name record component
    • dataType

      public DataTypeMetaData dataType()
      Returns the value of the dataType record component.
      Specified by:
      dataType in interface Column
      Returns:
      the value of the dataType record component
    • defaultValue

      public String defaultValue()
      Returns the value of the defaultValue record component.
      Specified by:
      defaultValue in interface Column
      Returns:
      the value of the defaultValue record component
    • onUpdate

      public String onUpdate()
      Returns the value of the onUpdate record component.
      Specified by:
      onUpdate in interface Column
      Returns:
      the value of the onUpdate record component
    • notNull

      public boolean notNull()
      Returns the value of the notNull record component.
      Specified by:
      notNull in interface Column
      Returns:
      the value of the notNull record component
    • autoIncrement

      public boolean autoIncrement()
      Returns the value of the autoIncrement record component.
      Specified by:
      autoIncrement in interface Column
      Returns:
      the value of the autoIncrement record component
    • primary

      public boolean primary()
      Returns the value of the primary record component.
      Specified by:
      primary in interface Column
      Returns:
      the value of the primary record component
    • unique

      public boolean unique()
      Returns the value of the unique record component.
      Specified by:
      unique in interface Column
      Returns:
      the value of the unique record component
    • index

      public boolean index()
      Returns the value of the index record component.
      Specified by:
      index in interface Column
      Returns:
      the value of the index record component
    • comment

      public String comment()
      Returns the value of the comment record component.
      Specified by:
      comment in interface Column
      Returns:
      the value of the comment record component