Class UserMappingTable
- java.lang.Object
-
- mil.nga.geopackage.user.UserTable<UserCustomColumn>
-
- mil.nga.geopackage.user.custom.UserCustomTable
-
- mil.nga.geopackage.extension.related.UserMappingTable
-
- Direct Known Subclasses:
StyleMappingTable
public class UserMappingTable extends UserCustomTable
Contains user mapping table factory and utility methods- Since:
- 3.0.1
- Author:
- jyutzler, osbornb
-
-
Field Summary
Fields Modifier and Type Field Description static String
COLUMN_BASE_ID
Base ID column namestatic String
COLUMN_RELATED_ID
Related ID column name-
Fields inherited from class mil.nga.geopackage.user.UserTable
DEFAULT_AUTOINCREMENT, DEFAULT_PK_NOT_NULL
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UserMappingTable(String tableName, List<UserCustomColumn> columns)
Constructorprotected
UserMappingTable(UserCustomTable table)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UserMappingTable
create(String tableName)
Create a user mapping table with the minimum required columnsstatic UserMappingTable
create(String tableName, List<UserCustomColumn> additionalColumns)
Create a user mapping table with the minimum required columns followed by the additional columnsstatic UserCustomColumn
createBaseIdColumn()
Create a base id columnstatic UserCustomColumn
createBaseIdColumn(int index)
Create a base id columnstatic UserCustomColumn
createRelatedIdColumn()
Create a related id columnstatic UserCustomColumn
createRelatedIdColumn(int index)
Create a related id columnstatic List<UserCustomColumn>
createRequiredColumns()
Create the required table columnsstatic List<UserCustomColumn>
createRequiredColumns(int startingIndex)
Create the required table columns, starting at the provided indexUserCustomColumn
getBaseIdColumn()
Get the base id columnint
getBaseIdColumnIndex()
Get the base id column indexUserCustomColumn
getRelatedIdColumn()
Get the related id columnint
getRelatedIdColumnIndex()
Get the related id column indexstatic int
numRequiredColumns()
Get the number of required columnsstatic List<String>
requiredColumns()
Get the required columns-
Methods inherited from class mil.nga.geopackage.user.custom.UserCustomTable
copy, createUserColumns, getDataType, getRequiredColumns, getUserColumns
-
Methods inherited from class mil.nga.geopackage.user.UserTable
addColumn, addConstraint, addConstraints, addConstraints, alterColumn, clearConstraints, clearConstraints, columnCount, columnsOfType, createUserColumns, dropColumn, dropColumn, dropColumn, getColumn, getColumn, getColumnIndex, getColumnName, getColumnNames, getColumns, getColumns, getConstraints, getConstraints, getContents, getDataType, getPkColumn, getPkColumnIndex, getPkColumnName, getTableName, hasColumn, hasConstraints, hasConstraints, hasPkColumn, hasSchema, isPkModifiable, isValueValidation, renameColumn, renameColumn, renameColumn, setContents, setPkModifiable, setTableName, setValueValidation, validateContents
-
-
-
-
Field Detail
-
COLUMN_BASE_ID
public static final String COLUMN_BASE_ID
Base ID column name- See Also:
- Constant Field Values
-
COLUMN_RELATED_ID
public static final String COLUMN_RELATED_ID
Related ID column name- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UserMappingTable
protected UserMappingTable(String tableName, List<UserCustomColumn> columns)
Constructor- Parameters:
tableName
- table namecolumns
- list of columns
-
UserMappingTable
protected UserMappingTable(UserCustomTable table)
Constructor- Parameters:
table
- user custom table
-
-
Method Detail
-
create
public static UserMappingTable create(String tableName)
Create a user mapping table with the minimum required columns- Parameters:
tableName
- table name- Returns:
- user mapping table
-
create
public static UserMappingTable create(String tableName, List<UserCustomColumn> additionalColumns)
Create a user mapping table with the minimum required columns followed by the additional columns- Parameters:
tableName
- table nameadditionalColumns
- additional columns- Returns:
- user mapping table
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns()
Create the required table columns- Returns:
- user custom columns
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(int startingIndex)
Create the required table columns, starting at the provided index- Parameters:
startingIndex
- starting index- Returns:
- user custom columns
-
createBaseIdColumn
public static UserCustomColumn createBaseIdColumn()
Create a base id column- Returns:
- base id column
- Since:
- 3.3.0
-
createBaseIdColumn
public static UserCustomColumn createBaseIdColumn(int index)
Create a base id column- Parameters:
index
- column index- Returns:
- base id column
-
createRelatedIdColumn
public static UserCustomColumn createRelatedIdColumn()
Create a related id column- Returns:
- related id column
- Since:
- 3.3.0
-
createRelatedIdColumn
public static UserCustomColumn createRelatedIdColumn(int index)
Create a related id column- Parameters:
index
- column index- Returns:
- related id column
-
numRequiredColumns
public static int numRequiredColumns()
Get the number of required columns- Returns:
- required columns count
-
requiredColumns
public static List<String> requiredColumns()
Get the required columns- Returns:
- required columns
-
getBaseIdColumnIndex
public int getBaseIdColumnIndex()
Get the base id column index- Returns:
- base id column index
-
getBaseIdColumn
public UserCustomColumn getBaseIdColumn()
Get the base id column- Returns:
- base id column
-
getRelatedIdColumnIndex
public int getRelatedIdColumnIndex()
Get the related id column index- Returns:
- related id column index
-
getRelatedIdColumn
public UserCustomColumn getRelatedIdColumn()
Get the related id column- Returns:
- related id column
-
-