Class GeometryIndexDao
- java.lang.Object
-
- com.j256.ormlite.dao.BaseDaoImpl<T,ID>
-
- mil.nga.geopackage.db.GeoPackageDao<GeometryIndex,GeometryIndexKey>
-
- mil.nga.geopackage.extension.nga.index.GeometryIndexDao
-
- All Implemented Interfaces:
CloseableIterable<GeometryIndex>,Dao<GeometryIndex,GeometryIndexKey>,Iterable<GeometryIndex>
public class GeometryIndexDao extends GeoPackageDao<GeometryIndex,GeometryIndexKey>
Geometry Index Data Access Object- Since:
- 1.1.0
- 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 GeometryIndexDao(ConnectionSource connectionSource, Class<GeometryIndex> dataClass)Constructor, required by ORMLite
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeometryIndexDaocreate(GeoPackageCoreConnection db)Create the DAOstatic GeometryIndexDaocreate(GeoPackageCore geoPackage)Create the DAOintdelete(GeometryIndex data)intdeleteAll()Delete all geometry indicesintdeleteById(GeometryIndexKey id)intdeleteIds(Collection<GeometryIndexKey> idCollection)GeometryIndexKeyextractId(GeometryIndex data)booleanidExists(GeometryIndexKey id)GeometryIndexpopulate(TableIndex tableIndex, long geomId, GeometryEnvelope envelope)Populate a new geometry index from an envelopeGeometryIndexqueryForId(GeometryIndexKey key)GeometryIndexqueryForSameId(GeometryIndex data)List<GeometryIndex>queryForTableName(String tableName)Query by table nameintupdate(GeometryIndex geometryIndex)Update using the complex keyintupdateId(GeometryIndex data, GeometryIndexKey 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, 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
-
GeometryIndexDao
public GeometryIndexDao(ConnectionSource connectionSource, Class<GeometryIndex> dataClass) throws SQLException
Constructor, required by ORMLite- Parameters:
connectionSource- connection sourcedataClass- data class- Throws:
SQLException- upon creation failure
-
-
Method Detail
-
create
public static GeometryIndexDao create(GeoPackageCore geoPackage)
Create the DAO- Parameters:
geoPackage- GeoPackage- Returns:
- dao
- Since:
- 4.0.0
-
create
public static GeometryIndexDao create(GeoPackageCoreConnection db)
Create the DAO- Parameters:
db- database connection- Returns:
- dao
- Since:
- 4.0.0
-
queryForId
public GeometryIndex queryForId(GeometryIndexKey key) throws SQLException
- Specified by:
queryForIdin interfaceDao<GeometryIndex,GeometryIndexKey>- Overrides:
queryForIdin classBaseDaoImpl<GeometryIndex,GeometryIndexKey>- Throws:
SQLException
-
extractId
public GeometryIndexKey extractId(GeometryIndex data) throws SQLException
- Specified by:
extractIdin interfaceDao<GeometryIndex,GeometryIndexKey>- Overrides:
extractIdin classBaseDaoImpl<GeometryIndex,GeometryIndexKey>- Throws:
SQLException
-
idExists
public boolean idExists(GeometryIndexKey id) throws SQLException
- Specified by:
idExistsin interfaceDao<GeometryIndex,GeometryIndexKey>- Overrides:
idExistsin classBaseDaoImpl<GeometryIndex,GeometryIndexKey>- Throws:
SQLException
-
queryForSameId
public GeometryIndex queryForSameId(GeometryIndex data) throws SQLException
- Specified by:
queryForSameIdin interfaceDao<GeometryIndex,GeometryIndexKey>- Overrides:
queryForSameIdin classBaseDaoImpl<GeometryIndex,GeometryIndexKey>- Throws:
SQLException
-
updateId
public int updateId(GeometryIndex data, GeometryIndexKey newId) throws SQLException
- Specified by:
updateIdin interfaceDao<GeometryIndex,GeometryIndexKey>- Overrides:
updateIdin classBaseDaoImpl<GeometryIndex,GeometryIndexKey>- Throws:
SQLException
-
delete
public int delete(GeometryIndex data) throws SQLException
- Specified by:
deletein interfaceDao<GeometryIndex,GeometryIndexKey>- Overrides:
deletein classBaseDaoImpl<GeometryIndex,GeometryIndexKey>- Throws:
SQLException
-
deleteById
public int deleteById(GeometryIndexKey id) throws SQLException
- Specified by:
deleteByIdin interfaceDao<GeometryIndex,GeometryIndexKey>- Overrides:
deleteByIdin classBaseDaoImpl<GeometryIndex,GeometryIndexKey>- Throws:
SQLException
-
deleteIds
public int deleteIds(Collection<GeometryIndexKey> idCollection) throws SQLException
- Specified by:
deleteIdsin interfaceDao<GeometryIndex,GeometryIndexKey>- Overrides:
deleteIdsin classBaseDaoImpl<GeometryIndex,GeometryIndexKey>- Throws:
SQLException
-
update
public int update(GeometryIndex geometryIndex) throws SQLException
Update using the complex key- Specified by:
updatein interfaceDao<GeometryIndex,GeometryIndexKey>- Overrides:
updatein classBaseDaoImpl<GeometryIndex,GeometryIndexKey>- Throws:
SQLException
-
queryForTableName
public List<GeometryIndex> queryForTableName(String tableName)
Query by table name- Parameters:
tableName- table name- Returns:
- geometry indices
-
populate
public GeometryIndex populate(TableIndex tableIndex, long geomId, GeometryEnvelope envelope)
Populate a new geometry index from an envelope- Parameters:
tableIndex- table indexgeomId- geometry idenvelope- geometry envelope- Returns:
- geometry index
-
deleteAll
public int deleteAll() throws SQLExceptionDelete all geometry indices- Returns:
- rows deleted
- Throws:
SQLException- upon deletion failure- Since:
- 1.1.5
-
-