Class Table.PrimaryKey

java.lang.Object
com.invirgance.convirgance.jdbc.schema.Table.PrimaryKey
Enclosing class:
Table

public class Table.PrimaryKey extends Object
  • Constructor Details

    • PrimaryKey

      public PrimaryKey(Column[] columns, com.invirgance.convirgance.json.JSONObject[] records)
  • Method Details

    • getName

      public String getName()
    • getTable

      public Table getTable()
      The table the primary key belongs to
      Returns:
      the Table containing the primary key column(s)
    • getColumn

      public Column getColumn()
      Obtain the primary key Column. Throws an exception if the primary key is multi-column/composite.
      Returns:
      the primary key Column
      Throws:
      com.invirgance.convirgance.ConvirganceException - if primary key is multi-column/composite
    • getColumns

      public Column[] getColumns()
      Obtain the primary key columns. Columns are guaranteed to be returned in primary key order.
      Returns:
      an array of Column objects representing the primary key
    • equals

      public boolean equals(Object obj)
      Checks that the comparison PrimaryKey has the same table and record count as this.
      Overrides:
      equals in class Object
      Parameters:
      obj - A PrimaryKey to compare against.
      Returns:
      Boolean
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object