Interface TableMetaData

All Superinterfaces:
java.lang.Cloneable

public interface TableMetaData
extends java.lang.Cloneable
Captures information about the table's columns.
  • Method Summary

    Modifier and Type Method Description
    void addColumn​(int col, Field field)
    Inserts a new column at the given position.
    java.lang.Object clone()  
    int getColumnCount()
    Returns the number of columns in the table.
    int getColumnIndex​(FieldId fieldId)
    Returns the column index for the column associated with the given FieldId
    Field getField​(int col)
    Returns the Field associated with the column of the given column index
    void removeColumn​(int col)
    Removes a column from the table, and removes all values for that column from all rows.
  • Method Details

    • getColumnCount

      int getColumnCount()
      Returns the number of columns in the table.
      Returns:
      the number of columns in the table
    • getField

      Field getField​(int col) throws java.lang.IndexOutOfBoundsException
      Returns the Field associated with the column of the given column index
      Parameters:
      col - column index (starts with zero)
      Returns:
      the Field associated with the column
      Throws:
      java.lang.IndexOutOfBoundsException - column index is out of bounds
    • getColumnIndex

      int getColumnIndex​(FieldId fieldId) throws java.lang.IndexOutOfBoundsException
      Returns the column index for the column associated with the given FieldId
      Parameters:
      fieldId - the FieldId of the column
      Returns:
      column index, or -1 if the FieldId is not in this table's set of columns
      Throws:
      java.lang.IndexOutOfBoundsException - column index is out of bounds
    • addColumn

      void addColumn​(int col, Field field)
      Inserts a new column at the given position. All columns after that column will have their indexes increased by 1. All rows will have be initialized with a null value.
      Parameters:
      col - column index (starts with zero)
      field - Field which describes the content for the new column
    • removeColumn

      void removeColumn​(int col)
      Removes a column from the table, and removes all values for that column from all rows.
      Parameters:
      col - column index (starts with zero)
    • clone

      java.lang.Object clone() throws java.lang.CloneNotSupportedException
      Throws:
      java.lang.CloneNotSupportedException