Record Class Table

java.lang.Object
java.lang.Record
io.micronaut.controlpanel.panels.datasource.model.Table
Record Components:
schema - The table schema
name - The table name
columns - The columns
uniqueColumns - Columns that are part of unique indexes/constraints
foreignKeys - Foreign key relationships imported by this table

public record Table(String schema, String name, List<Column> columns, Set<String> uniqueColumns, List<ForeignKey> foreignKeys) extends Record
Database table metadata.
  • Constructor Details

    • Table

      public Table(String schema, String name, List<Column> columns, Set<String> uniqueColumns, List<ForeignKey> foreignKeys)
      Creates an instance of a Table record class.
      Parameters:
      schema - the value for the schema record component
      name - the value for the name record component
      columns - the value for the columns record component
      uniqueColumns - the value for the uniqueColumns record component
      foreignKeys - the value for the foreignKeys 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • schema

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

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

      public List<Column> columns()
      Returns the value of the columns record component.
      Returns:
      the value of the columns record component
    • uniqueColumns

      public Set<String> uniqueColumns()
      Returns the value of the uniqueColumns record component.
      Returns:
      the value of the uniqueColumns record component
    • foreignKeys

      public List<ForeignKey> foreignKeys()
      Returns the value of the foreignKeys record component.
      Returns:
      the value of the foreignKeys record component