TColumn - column typepublic abstract class UserTable<TColumn extends UserColumn> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
UserTable(UserColumns<TColumn> columns)
Constructor
|
protected |
UserTable(UserTable<TColumn> userTable)
Copy Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(TColumn column)
Add a new column
|
void |
addConstraint(Constraint constraint)
Add constraint
|
void |
addConstraints(Collection<Constraint> constraints)
Add constraints
|
void |
alterColumn(TColumn column)
Alter a column
|
List<Constraint> |
clearConstraints()
Clear the constraints
|
int |
columnCount()
Get the column count
|
List<TColumn> |
columnsOfType(GeoPackageDataType type)
Get the columns with the provided data type
|
abstract UserTable<TColumn> |
copy()
Copy the table
|
abstract UserColumns<TColumn> |
createUserColumns(List<TColumn> columns)
Create user columns for a subset of table columns
|
UserColumns<TColumn> |
createUserColumns(String[] columnNames)
Create user columns for a subset of table columns
|
void |
dropColumn(int index)
Drop a column
|
void |
dropColumn(String columnName)
Drop a column
|
void |
dropColumn(TColumn column)
Drop a column
|
TColumn |
getColumn(int index)
Get the column at the index
|
TColumn |
getColumn(String columnName)
Get the column of the column name
|
int |
getColumnIndex(String columnName)
Get the column index of the column name
|
String |
getColumnName(int index)
Get the column name at the index
|
String[] |
getColumnNames()
Get the array of column names
|
List<TColumn> |
getColumns()
Get the list of columns
|
List<TColumn> |
getColumns(String[] columnNames)
Get the columns from the column names
|
List<Constraint> |
getConstraints()
Get the constraints
|
List<Constraint> |
getConstraints(ConstraintType type)
Get the constraints of the provided type
|
Contents |
getContents()
Get the contents
|
abstract String |
getDataType()
Get the contents data type
|
TColumn |
getPkColumn()
Get the primary key column
|
int |
getPkColumnIndex()
Get the primary key column index
|
String |
getPkColumnName()
Get the primary key column name
|
String |
getTableName()
Get the table name
|
UserColumns<TColumn> |
getUserColumns()
Get the user columns
|
boolean |
hasColumn(String columnName)
Check if the table has the column
|
boolean |
hasConstraints()
Check if has constraints
|
boolean |
hasPkColumn()
Check if the table has a primary key column
|
void |
renameColumn(int index,
String newColumnName)
Rename a column
|
void |
renameColumn(String columnName,
String newColumnName)
Rename a column
|
void |
renameColumn(TColumn column,
String newColumnName)
Rename a column
|
void |
setContents(Contents contents)
Set the contents
|
void |
setTableName(String tableName)
Set the table name
|
protected void |
validateContents(Contents contents)
Validate that the set contents are valid
|
protected UserTable(UserColumns<TColumn> columns)
columns - columnspublic abstract String getDataType()
public abstract UserColumns<TColumn> createUserColumns(List<TColumn> columns)
columns - columnspublic UserColumns<TColumn> createUserColumns(String[] columnNames)
columnNames - column namespublic UserColumns<TColumn> getUserColumns()
public int getColumnIndex(String columnName)
columnName - column namepublic String[] getColumnNames()
public String getColumnName(int index)
index - column indexpublic List<TColumn> getColumns(String[] columnNames)
columnNames - column namespublic TColumn getColumn(int index)
index - column indexpublic TColumn getColumn(String columnName)
columnName - column namepublic boolean hasColumn(String columnName)
columnName - column namepublic int columnCount()
public String getTableName()
public void setTableName(String tableName)
tableName - table namepublic boolean hasPkColumn()
public int getPkColumnIndex()
public TColumn getPkColumn()
public String getPkColumnName()
public void addConstraint(Constraint constraint)
constraint - constraintpublic void addConstraints(Collection<Constraint> constraints)
constraints - constraintspublic boolean hasConstraints()
public List<Constraint> getConstraints()
public List<Constraint> getConstraints(ConstraintType type)
type - constraint typepublic List<Constraint> clearConstraints()
public List<TColumn> columnsOfType(GeoPackageDataType type)
type - data typepublic Contents getContents()
public void setContents(Contents contents)
contents - contentsprotected void validateContents(Contents contents)
contents - contentspublic void addColumn(TColumn column)
column - new columnpublic void renameColumn(TColumn column, String newColumnName)
column - columnnewColumnName - new column namepublic void renameColumn(String columnName, String newColumnName)
columnName - column namenewColumnName - new column namepublic void renameColumn(int index,
String newColumnName)
index - column indexnewColumnName - new column namepublic void dropColumn(TColumn column)
column - column to droppublic void dropColumn(String columnName)
columnName - column namepublic void dropColumn(int index)
index - column indexpublic void alterColumn(TColumn column)
column - altered columnCopyright © 2020 National Geospatial-Intelligence Agency. All rights reserved.