Record Class ColumnMeta

java.lang.Object
java.lang.Record
guru.mikelue.foxglove.ColumnMeta
Record Components:
name - The name of the column
properties - The true/false properties of this column
typeName - The name of type for the column
jdbcType - The corresponding JDBCType of the column
size - The size of the column
decimalDigits - The number of decimal digits of the column(as scale of SQL standard)

public record ColumnMeta(String name, EnumSet<ColumnMeta.Property> properties, String typeName, JDBCType jdbcType, int size, int decimalDigits) extends Record
Metadata of a column.

The information could come from:


From DatabaseMetaData.getColumns(String, String, String, String)

The columns mapping to this object are:
  • Constructor Details

    • ColumnMeta

      public ColumnMeta(String name, EnumSet<ColumnMeta.Property> properties, String typeName, JDBCType jdbcType, int size, int decimalDigits)
      Creates an instance of a ColumnMeta record class.
      Parameters:
      name - the value for the name record component
      properties - the value for the properties record component
      typeName - the value for the typeName record component
      jdbcType - the value for the jdbcType record component
      size - the value for the size record component
      decimalDigits - the value for the decimalDigits record component
  • Method Details

    • hashCode

      public int hashCode()
      Only use name of column for hash code.
      Specified by:
      hashCode in class Record
      Returns:
      Hash code of column name
    • equals

      public boolean equals(Object obj)
      Only use name and JDBCType of column for equality check.
      Specified by:
      equals in class Record
      Parameters:
      obj - The other object to be checked
      Returns:
      True if the other object is a ColumnMeta and has same name
    • toString

      public String toString()
      Builds complete properties and descriptive information of column metadata.
      Specified by:
      toString in class Record
      Returns:
      The string representation of this column
    • name

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

      public EnumSet<ColumnMeta.Property> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • typeName

      public String typeName()
      Returns the value of the typeName record component.
      Returns:
      the value of the typeName record component
    • jdbcType

      public JDBCType jdbcType()
      Returns the value of the jdbcType record component.
      Returns:
      the value of the jdbcType record component
    • size

      public int size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • decimalDigits

      public int decimalDigits()
      Returns the value of the decimalDigits record component.
      Returns:
      the value of the decimalDigits record component