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 FieldIdField
getField(int col)
Returns the Field associated with the column of the given column indexvoid
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
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
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
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
-