Class GeometryColumnsDao
- java.lang.Object
-
- com.j256.ormlite.dao.BaseDaoImpl<T,ID>
-
- mil.nga.geopackage.db.GeoPackageDao<GeometryColumns,TableColumnKey>
-
- mil.nga.geopackage.features.columns.GeometryColumnsDao
-
- All Implemented Interfaces:
CloseableIterable<GeometryColumns>,Dao<GeometryColumns,TableColumnKey>,Iterable<GeometryColumns>
public class GeometryColumnsDao extends GeoPackageDao<GeometryColumns,TableColumnKey>
Geometry Columns Data Access Object- Author:
- osbornb
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.j256.ormlite.dao.Dao
Dao.CreateOrUpdateStatus, Dao.DaoObserver
-
-
Field Summary
-
Fields inherited from class mil.nga.geopackage.db.GeoPackageDao
db
-
Fields inherited from class com.j256.ormlite.dao.BaseDaoImpl
connectionSource, constructor, databaseType, dataClass, lastIterator, objectFactory, statementExecutor, tableConfig, tableInfo
-
-
Constructor Summary
Constructors Constructor Description GeometryColumnsDao(ConnectionSource connectionSource, Class<GeometryColumns> dataClass)Constructor, required by ORMLite
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeometryColumnsDaocreate(GeoPackageCoreConnection db)Create the DAOstatic GeometryColumnsDaocreate(GeoPackageCore geoPackage)Create the DAOintdelete(GeometryColumns data)intdeleteById(TableColumnKey id)intdeleteIds(Collection<TableColumnKey> idCollection)TableColumnKeyextractId(GeometryColumns data)List<String>getFeatureTables()Get all the feature table namesbooleanidExists(TableColumnKey id)List<GeometryColumns>queryForEq(String fieldName, Object value)GeometryColumnsqueryForId(TableColumnKey key)GeometryColumnsqueryForSameId(GeometryColumns data)GeometryColumnsqueryForTableName(String tableName)Query for the table nameintupdate(GeometryColumns geometryColumns)intupdateId(GeometryColumns data, TableColumnKey newId)-
Methods inherited from class mil.nga.geopackage.db.GeoPackageDao
createDao, createDao, createDao, dropTable, getDatabase, isTable, isTableExists, isTableOrView, isView, setDatabase, tableExists, tableOrViewExists, verifyExists, viewExists
-
Methods inherited from class com.j256.ormlite.dao.BaseDaoImpl
assignEmptyForeignCollection, callBatchTasks, checkForInitialized, clearAllInternalObjectCaches, clearObjectCache, closeableIterator, closeLastIterator, commit, countOf, countOf, create, create, createIfNotExists, createObjectInstance, createOrUpdate, delete, delete, deleteBuilder, endThreadConnection, executeRaw, executeRawNoArgs, findForeignFieldType, getConnectionSource, getDataClass, getEmptyForeignCollection, getObjectCache, getRawRowMapper, getSelectStarRowMapper, getTableConfig, getTableInfo, getTableName, getWrappedIterable, getWrappedIterable, initialize, isAutoCommit, isUpdatable, iterator, iterator, iterator, iterator, mapSelectStarRow, notifyChanges, objectsEqual, objectToString, query, queryBuilder, queryForAll, queryForFieldValues, queryForFieldValuesArgs, queryForFirst, queryForFirst, queryForMatching, queryForMatchingArgs, queryRaw, queryRaw, queryRaw, queryRaw, queryRaw, queryRawValue, refresh, registerObserver, rollBack, setAutoCommit, setConnectionSource, setObjectCache, setObjectCache, setObjectFactory, setTableConfig, startThreadConnection, unregisterObserver, update, updateBuilder, updateRaw
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
GeometryColumnsDao
public GeometryColumnsDao(ConnectionSource connectionSource, Class<GeometryColumns> dataClass) throws SQLException
Constructor, required by ORMLite- Parameters:
connectionSource- connection sourcedataClass- data class- Throws:
SQLException- upon failure
-
-
Method Detail
-
create
public static GeometryColumnsDao create(GeoPackageCore geoPackage)
Create the DAO- Parameters:
geoPackage- GeoPackage- Returns:
- dao
- Since:
- 4.0.0
-
create
public static GeometryColumnsDao create(GeoPackageCoreConnection db)
Create the DAO- Parameters:
db- database connection- Returns:
- dao
- Since:
- 4.0.0
-
getFeatureTables
public List<String> getFeatureTables() throws SQLException
Get all the feature table names- Returns:
- feature tables
- Throws:
SQLException- upon failure
-
queryForId
public GeometryColumns queryForId(TableColumnKey key) throws SQLException
- Specified by:
queryForIdin interfaceDao<GeometryColumns,TableColumnKey>- Overrides:
queryForIdin classBaseDaoImpl<GeometryColumns,TableColumnKey>- Throws:
SQLException
-
queryForEq
public List<GeometryColumns> queryForEq(String fieldName, Object value) throws SQLException
- Specified by:
queryForEqin interfaceDao<GeometryColumns,TableColumnKey>- Overrides:
queryForEqin classBaseDaoImpl<GeometryColumns,TableColumnKey>- Throws:
SQLException
-
extractId
public TableColumnKey extractId(GeometryColumns data) throws SQLException
- Specified by:
extractIdin interfaceDao<GeometryColumns,TableColumnKey>- Overrides:
extractIdin classBaseDaoImpl<GeometryColumns,TableColumnKey>- Throws:
SQLException
-
idExists
public boolean idExists(TableColumnKey id) throws SQLException
- Specified by:
idExistsin interfaceDao<GeometryColumns,TableColumnKey>- Overrides:
idExistsin classBaseDaoImpl<GeometryColumns,TableColumnKey>- Throws:
SQLException
-
queryForSameId
public GeometryColumns queryForSameId(GeometryColumns data) throws SQLException
- Specified by:
queryForSameIdin interfaceDao<GeometryColumns,TableColumnKey>- Overrides:
queryForSameIdin classBaseDaoImpl<GeometryColumns,TableColumnKey>- Throws:
SQLException
-
updateId
public int updateId(GeometryColumns data, TableColumnKey newId) throws SQLException
- Specified by:
updateIdin interfaceDao<GeometryColumns,TableColumnKey>- Overrides:
updateIdin classBaseDaoImpl<GeometryColumns,TableColumnKey>- Throws:
SQLException
-
delete
public int delete(GeometryColumns data) throws SQLException
- Specified by:
deletein interfaceDao<GeometryColumns,TableColumnKey>- Overrides:
deletein classBaseDaoImpl<GeometryColumns,TableColumnKey>- Throws:
SQLException
-
deleteById
public int deleteById(TableColumnKey id) throws SQLException
- Specified by:
deleteByIdin interfaceDao<GeometryColumns,TableColumnKey>- Overrides:
deleteByIdin classBaseDaoImpl<GeometryColumns,TableColumnKey>- Throws:
SQLException
-
deleteIds
public int deleteIds(Collection<TableColumnKey> idCollection) throws SQLException
- Specified by:
deleteIdsin interfaceDao<GeometryColumns,TableColumnKey>- Overrides:
deleteIdsin classBaseDaoImpl<GeometryColumns,TableColumnKey>- Throws:
SQLException
-
update
public int update(GeometryColumns geometryColumns) throws SQLException
Update using the complex key
- Specified by:
updatein interfaceDao<GeometryColumns,TableColumnKey>- Overrides:
updatein classBaseDaoImpl<GeometryColumns,TableColumnKey>- Throws:
SQLException
-
queryForTableName
public GeometryColumns queryForTableName(String tableName) throws SQLException
Query for the table name- Parameters:
tableName- table name- Returns:
- geometry columns
- Throws:
SQLException- upon failure
-
-