Class SimpleAttributesTable
- java.lang.Object
-
- mil.nga.geopackage.user.UserTable<UserCustomColumn>
-
- mil.nga.geopackage.user.custom.UserCustomTable
-
- mil.nga.geopackage.extension.related.UserRelatedTable
-
- mil.nga.geopackage.extension.related.simple.SimpleAttributesTable
-
public class SimpleAttributesTable extends UserRelatedTable
Simple Attributes Requirements Class User-Defined Related Data Table- Since:
- 3.0.1
- Author:
- osbornb
-
-
Field Summary
Fields Modifier and Type Field Description static String
COLUMN_ID
Autoincrement primary key, optional namestatic RelationType
RELATION_TYPE
User-Defined Simple Attributes Table relation name-
Fields inherited from class mil.nga.geopackage.user.UserTable
DEFAULT_AUTOINCREMENT, DEFAULT_PK_NOT_NULL
-
-
Constructor Summary
Constructors Constructor Description SimpleAttributesTable(String tableName, List<UserCustomColumn> columns)
ConstructorSimpleAttributesTable(String tableName, List<UserCustomColumn> columns, String idColumnName)
ConstructorSimpleAttributesTable(UserCustomTable table)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SimpleAttributesTable
create(SimpleAttributesTableMetadata metadata)
Create a simple attributes table with the metadatastatic UserCustomColumn
createIdColumn(int index, String idColumnName)
Create the primary key id columnstatic UserCustomColumn
createIdColumn(int index, String idColumnName, boolean autoincrement)
Create the primary key id columnstatic UserCustomColumn
createIdColumn(String idColumnName)
Create the primary key id columnstatic UserCustomColumn
createIdColumn(String idColumnName, boolean autoincrement)
Create the primary key id columnstatic List<UserCustomColumn>
createRequiredColumns()
Create the required table columnsstatic List<UserCustomColumn>
createRequiredColumns(boolean autoincrement)
Create the required table columnsstatic List<UserCustomColumn>
createRequiredColumns(int startingIndex)
Create the required table columns, starting at the provided indexstatic List<UserCustomColumn>
createRequiredColumns(int startingIndex, boolean autoincrement)
Create the required table columns, starting at the provided indexstatic List<UserCustomColumn>
createRequiredColumns(int startingIndex, String idColumnName)
Create the required table columns with id column name, starting at the provided indexstatic List<UserCustomColumn>
createRequiredColumns(int startingIndex, String idColumnName, boolean autoincrement)
Create the required table columns with id column name, starting at the provided indexstatic List<UserCustomColumn>
createRequiredColumns(String idColumnName)
Create the required table columns with the id column namestatic List<UserCustomColumn>
createRequiredColumns(String idColumnName, boolean autoincrement)
Create the required table columns with the id column nameUserCustomColumn
getIdColumn()
Get the id columnint
getIdColumnIndex()
Get the id column indexstatic boolean
isSimple(GeoPackageDataType dataType)
Determine if the data type is a simple type: TEXT, INTEGER, or REAL storage classesstatic boolean
isSimple(UserColumn column)
Determine if the column is a non nullable simple type: TEXT, INTEGER, or REALstatic int
numRequiredColumns()
Get the number of required columnsstatic List<String>
requiredColumns()
Get the required columnsstatic List<String>
requiredColumns(String idColumnName)
Get the required columns-
Methods inherited from class mil.nga.geopackage.extension.related.UserRelatedTable
getDataType, getRelationName, validateContents
-
Methods inherited from class mil.nga.geopackage.user.custom.UserCustomTable
copy, createUserColumns, 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
-
-
-
-
Field Detail
-
RELATION_TYPE
public static final RelationType RELATION_TYPE
User-Defined Simple Attributes Table relation name
-
COLUMN_ID
public static final String COLUMN_ID
Autoincrement primary key, optional name- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SimpleAttributesTable
public SimpleAttributesTable(String tableName, List<UserCustomColumn> columns)
Constructor- Parameters:
tableName
- table namecolumns
- list of columns
-
SimpleAttributesTable
public SimpleAttributesTable(String tableName, List<UserCustomColumn> columns, String idColumnName)
Constructor- Parameters:
tableName
- table namecolumns
- list of columnsidColumnName
- id column name
-
SimpleAttributesTable
public SimpleAttributesTable(UserCustomTable table)
Constructor- Parameters:
table
- user custom table
-
-
Method Detail
-
create
public static SimpleAttributesTable create(SimpleAttributesTableMetadata metadata)
Create a simple attributes table with the metadata- Parameters:
metadata
- simple attributes table metadata- Returns:
- simple attributes table
- Since:
- 4.0.0
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns()
Create the required table columns- Returns:
- user custom columns
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(boolean autoincrement)
Create the required table columns- Parameters:
autoincrement
- autoincrement id values- Returns:
- user custom columns
- Since:
- 4.0.0
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(String idColumnName)
Create the required table columns with the id column name- Parameters:
idColumnName
- id column name- Returns:
- user custom columns
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(String idColumnName, boolean autoincrement)
Create the required table columns with the id column name- Parameters:
idColumnName
- id column nameautoincrement
- autoincrement id values- Returns:
- user custom columns
- Since:
- 4.0.0
-
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
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(int startingIndex, boolean autoincrement)
Create the required table columns, starting at the provided index- Parameters:
startingIndex
- starting indexautoincrement
- autoincrement id values- Returns:
- user custom columns
- Since:
- 4.0.0
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(int startingIndex, String idColumnName)
Create the required table columns with id column name, starting at the provided index- Parameters:
startingIndex
- starting indexidColumnName
- id column name- Returns:
- user custom columns
-
createRequiredColumns
public static List<UserCustomColumn> createRequiredColumns(int startingIndex, String idColumnName, boolean autoincrement)
Create the required table columns with id column name, starting at the provided index- Parameters:
startingIndex
- starting indexidColumnName
- id column nameautoincrement
- autoincrement id values- Returns:
- user custom columns
- Since:
- 4.0.0
-
createIdColumn
public static UserCustomColumn createIdColumn(String idColumnName)
Create the primary key id column- Parameters:
idColumnName
- id column name- Returns:
- id column
- Since:
- 3.3.0
-
createIdColumn
public static UserCustomColumn createIdColumn(String idColumnName, boolean autoincrement)
Create the primary key id column- Parameters:
idColumnName
- id column nameautoincrement
- autoincrement id values- Returns:
- id column
- Since:
- 4.0.0
-
createIdColumn
public static UserCustomColumn createIdColumn(int index, String idColumnName)
Create the primary key id column- Parameters:
index
- column indexidColumnName
- id column name- Returns:
- id column
-
createIdColumn
public static UserCustomColumn createIdColumn(int index, String idColumnName, boolean autoincrement)
Create the primary key id column- Parameters:
index
- column indexidColumnName
- id column nameautoincrement
- autoincrement id values- Returns:
- id column
- Since:
- 4.0.0
-
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
-
requiredColumns
public static List<String> requiredColumns(String idColumnName)
Get the required columns- Parameters:
idColumnName
- id column name- Returns:
- required columns
-
getIdColumnIndex
public int getIdColumnIndex()
Get the id column index- Returns:
- id column index
-
getIdColumn
public UserCustomColumn getIdColumn()
Get the id column- Returns:
- id column
-
isSimple
public static boolean isSimple(UserColumn column)
Determine if the column is a non nullable simple type: TEXT, INTEGER, or REAL- Parameters:
column
- user column- Returns:
- true if a simple column
-
isSimple
public static boolean isSimple(GeoPackageDataType dataType)
Determine if the data type is a simple type: TEXT, INTEGER, or REAL storage classes- Parameters:
dataType
- data type- Returns:
- true if a simple column
-
-