Package mil.nga.geopackage.tiles.matrix
Class TileMatrixDao
- java.lang.Object
-
- com.j256.ormlite.dao.BaseDaoImpl<T,ID>
-
- mil.nga.geopackage.db.GeoPackageDao<TileMatrix,TileMatrixKey>
-
- mil.nga.geopackage.tiles.matrix.TileMatrixDao
-
- All Implemented Interfaces:
CloseableIterable<TileMatrix>,Dao<TileMatrix,TileMatrixKey>,Iterable<TileMatrix>
public class TileMatrixDao extends GeoPackageDao<TileMatrix,TileMatrixKey>
Tile Matrix 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 TileMatrixDao(ConnectionSource connectionSource, Class<TileMatrix> dataClass)Constructor, required by ORMLite
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TileMatrixDaocreate(GeoPackageCoreConnection db)Create the DAOstatic TileMatrixDaocreate(GeoPackageCore geoPackage)Create the DAOintdelete(TileMatrix data)intdeleteById(TileMatrixKey id)intdeleteByTableName(String table)Delete Tile Matrices for a table nameintdeleteIds(Collection<TileMatrixKey> idCollection)TileMatrixKeyextractId(TileMatrix data)booleanidExists(TileMatrixKey id)TileMatrixqueryForId(TileMatrixKey key)TileMatrixqueryForSameId(TileMatrix data)List<TileMatrix>queryForTableName(String tableName)Query tile matrices for a table nameintupdate(TileMatrix tileMatrix)intupdateId(TileMatrix data, TileMatrixKey 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, queryForEq, 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
-
TileMatrixDao
public TileMatrixDao(ConnectionSource connectionSource, Class<TileMatrix> dataClass) throws SQLException
Constructor, required by ORMLite- Parameters:
connectionSource- connection sourcedataClass- data class- Throws:
SQLException- upon failure
-
-
Method Detail
-
create
public static TileMatrixDao create(GeoPackageCore geoPackage)
Create the DAO- Parameters:
geoPackage- GeoPackage- Returns:
- dao
- Since:
- 4.0.0
-
create
public static TileMatrixDao create(GeoPackageCoreConnection db)
Create the DAO- Parameters:
db- database connection- Returns:
- dao
- Since:
- 4.0.0
-
queryForId
public TileMatrix queryForId(TileMatrixKey key) throws SQLException
- Specified by:
queryForIdin interfaceDao<TileMatrix,TileMatrixKey>- Overrides:
queryForIdin classBaseDaoImpl<TileMatrix,TileMatrixKey>- Throws:
SQLException
-
extractId
public TileMatrixKey extractId(TileMatrix data) throws SQLException
- Specified by:
extractIdin interfaceDao<TileMatrix,TileMatrixKey>- Overrides:
extractIdin classBaseDaoImpl<TileMatrix,TileMatrixKey>- Throws:
SQLException
-
idExists
public boolean idExists(TileMatrixKey id) throws SQLException
- Specified by:
idExistsin interfaceDao<TileMatrix,TileMatrixKey>- Overrides:
idExistsin classBaseDaoImpl<TileMatrix,TileMatrixKey>- Throws:
SQLException
-
queryForSameId
public TileMatrix queryForSameId(TileMatrix data) throws SQLException
- Specified by:
queryForSameIdin interfaceDao<TileMatrix,TileMatrixKey>- Overrides:
queryForSameIdin classBaseDaoImpl<TileMatrix,TileMatrixKey>- Throws:
SQLException
-
queryForTableName
public List<TileMatrix> queryForTableName(String tableName) throws SQLException
Query tile matrices for a table name- Parameters:
tableName- table name- Returns:
- tile matrices
- Throws:
SQLException- upon failure- Since:
- 6.2.0
-
updateId
public int updateId(TileMatrix data, TileMatrixKey newId) throws SQLException
- Specified by:
updateIdin interfaceDao<TileMatrix,TileMatrixKey>- Overrides:
updateIdin classBaseDaoImpl<TileMatrix,TileMatrixKey>- Throws:
SQLException
-
delete
public int delete(TileMatrix data) throws SQLException
- Specified by:
deletein interfaceDao<TileMatrix,TileMatrixKey>- Overrides:
deletein classBaseDaoImpl<TileMatrix,TileMatrixKey>- Throws:
SQLException
-
deleteById
public int deleteById(TileMatrixKey id) throws SQLException
- Specified by:
deleteByIdin interfaceDao<TileMatrix,TileMatrixKey>- Overrides:
deleteByIdin classBaseDaoImpl<TileMatrix,TileMatrixKey>- Throws:
SQLException
-
deleteIds
public int deleteIds(Collection<TileMatrixKey> idCollection) throws SQLException
- Specified by:
deleteIdsin interfaceDao<TileMatrix,TileMatrixKey>- Overrides:
deleteIdsin classBaseDaoImpl<TileMatrix,TileMatrixKey>- Throws:
SQLException
-
deleteByTableName
public int deleteByTableName(String table) throws SQLException
Delete Tile Matrices for a table name- Parameters:
table- table name- Returns:
- rows deleted
- Throws:
SQLException- upon failure- Since:
- 5.0.0
-
update
public int update(TileMatrix tileMatrix) throws SQLException
Update using the complex key
- Specified by:
updatein interfaceDao<TileMatrix,TileMatrixKey>- Overrides:
updatein classBaseDaoImpl<TileMatrix,TileMatrixKey>- Throws:
SQLException
-
-