Class TableIndexDao
- java.lang.Object
-
- com.j256.ormlite.dao.BaseDaoImpl<T,ID>
-
- mil.nga.geopackage.db.GeoPackageDao<TableIndex,String>
-
- mil.nga.geopackage.extension.nga.index.TableIndexDao
-
- All Implemented Interfaces:
CloseableIterable<TableIndex>
,Dao<TableIndex,String>
,Iterable<TableIndex>
public class TableIndexDao extends GeoPackageDao<TableIndex,String>
Table 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 TableIndexDao(ConnectionSource connectionSource, Class<TableIndex> dataClass)
Constructor, required by ORMLite
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TableIndexDao
create(GeoPackageCoreConnection db)
Create the DAOstatic TableIndexDao
create(GeoPackageCore geoPackage)
Create the DAOint
deleteAll()
Delete all table indicesint
deleteAllCascade()
Delete all table indices, cascading to geometry indicesint
deleteByIdCascade(String id)
Delete a TableIndex by id, cascadingint
deleteCascade(PreparedQuery<TableIndex> preparedDelete)
Delete the TableIndex matching the prepared query, cascadingint
deleteCascade(Collection<TableIndex> tableIndexCollection)
Delete the collection of TableIndex, cascadingint
deleteCascade(TableIndex tableIndex)
Delete the TableIndex, cascadingint
deleteIdsCascade(Collection<String> idCollection)
Delete the TableIndex with the provided ids, cascadingvoid
deleteTable(String table)
Delete the table-
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, delete, deleteBuilder, deleteById, deleteIds, endThreadConnection, executeRaw, executeRawNoArgs, extractId, findForeignFieldType, getConnectionSource, getDataClass, getEmptyForeignCollection, getObjectCache, getRawRowMapper, getSelectStarRowMapper, getTableConfig, getTableInfo, getTableName, getWrappedIterable, getWrappedIterable, idExists, initialize, isAutoCommit, isUpdatable, iterator, iterator, iterator, iterator, mapSelectStarRow, notifyChanges, objectsEqual, objectToString, query, queryBuilder, queryForAll, queryForEq, queryForFieldValues, queryForFieldValuesArgs, queryForFirst, queryForFirst, queryForId, queryForMatching, queryForMatchingArgs, queryForSameId, queryRaw, queryRaw, queryRaw, queryRaw, queryRaw, queryRawValue, refresh, registerObserver, rollBack, setAutoCommit, setConnectionSource, setObjectCache, setObjectCache, setObjectFactory, setTableConfig, startThreadConnection, unregisterObserver, update, update, updateBuilder, updateId, 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
-
TableIndexDao
public TableIndexDao(ConnectionSource connectionSource, Class<TableIndex> dataClass) throws SQLException
Constructor, required by ORMLite- Parameters:
connectionSource
- connection sourcedataClass
- data class- Throws:
SQLException
- upon creation failure
-
-
Method Detail
-
create
public static TableIndexDao create(GeoPackageCore geoPackage)
Create the DAO- Parameters:
geoPackage
- GeoPackage- Returns:
- dao
- Since:
- 4.0.0
-
create
public static TableIndexDao create(GeoPackageCoreConnection db)
Create the DAO- Parameters:
db
- database connection- Returns:
- dao
- Since:
- 4.0.0
-
deleteCascade
public int deleteCascade(TableIndex tableIndex) throws SQLException
Delete the TableIndex, cascading- Parameters:
tableIndex
- table index- Returns:
- rows deleted
- Throws:
SQLException
- upon deletion error
-
deleteCascade
public int deleteCascade(Collection<TableIndex> tableIndexCollection) throws SQLException
Delete the collection of TableIndex, cascading- Parameters:
tableIndexCollection
- table index collection- Returns:
- rows deleted
- Throws:
SQLException
- upon deletion failure
-
deleteCascade
public int deleteCascade(PreparedQuery<TableIndex> preparedDelete) throws SQLException
Delete the TableIndex matching the prepared query, cascading- Parameters:
preparedDelete
- prepared query- Returns:
- rows deleted
- Throws:
SQLException
- upon deletion failure
-
deleteByIdCascade
public int deleteByIdCascade(String id) throws SQLException
Delete a TableIndex by id, cascading- Parameters:
id
- id- Returns:
- rows deleted
- Throws:
SQLException
- upon deletion failure
-
deleteIdsCascade
public int deleteIdsCascade(Collection<String> idCollection) throws SQLException
Delete the TableIndex with the provided ids, cascading- Parameters:
idCollection
- id collection- Returns:
- rows deleted
- Throws:
SQLException
- upon deletion failure
-
deleteTable
public void deleteTable(String table)
Delete the table- Parameters:
table
- table name
-
deleteAllCascade
public int deleteAllCascade() throws SQLException
Delete all table indices, cascading to geometry indices- Returns:
- rows deleted
- Throws:
SQLException
- upon deletion failure- Since:
- 1.1.5
-
deleteAll
public int deleteAll() throws SQLException
Delete all table indices- Returns:
- rows deleted
- Throws:
SQLException
- upon deletion failure- Since:
- 1.1.5
-
-