Package mil.nga.geopackage.db
Class GeoPackageDao<T,ID>
- java.lang.Object
- 
- com.j256.ormlite.dao.BaseDaoImpl<T,ID>
- 
- mil.nga.geopackage.db.GeoPackageDao<T,ID>
 
 
- 
- Type Parameters:
- T- The class that the code will be operating on.
- ID- The class of the ID column associated with the class. The T class does not require an ID field. The class needs an ID parameter however so you can use Void or Object to satisfy the compiler.
 - All Implemented Interfaces:
- CloseableIterable<T>,- Dao<T,ID>,- Iterable<T>
 - Direct Known Subclasses:
- ContentsDao,- ContentsIdDao,- DataColumnConstraintsDao,- DataColumnsDao,- ExtendedRelationsDao,- ExtensionsDao,- ExtTileMatrixDao,- ExtTileMatrixSetDao,- FeatureTileLinkDao,- GeometryColumnsDao,- GeometryColumnsSfSqlDao,- GeometryColumnsSqlMmDao,- GeometryIndexDao,- GriddedCoverageDao,- GriddedTileDao,- MetadataDao,- MetadataReferenceDao,- SpatialReferenceSystemDao,- SpatialReferenceSystemSfSqlDao,- SpatialReferenceSystemSqlMmDao,- StylesDao,- StylesheetsDao,- SymbolContentDao,- SymbolImagesDao,- SymbolsDao,- TableIndexDao,- TileMatrixDao,- TileMatrixSetDao,- TileMatrixTablesDao,- TileMatrixVariableWidthsDao,- TileScalingDao,- VectorTilesFieldsDao,- VectorTilesLayersDao
 
 public abstract class GeoPackageDao<T,ID> extends BaseDaoImpl<T,ID> Abstract GeoPackage DAO- Since:
- 4.0.0
- Author:
- osbornb
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface com.j256.ormlite.dao.DaoDao.CreateOrUpdateStatus, Dao.DaoObserver
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected GeoPackageCoreConnectiondbDatabase connection- 
Fields inherited from class com.j256.ormlite.dao.BaseDaoImplconnectionSource, constructor, databaseType, dataClass, lastIterator, objectFactory, statementExecutor, tableConfig, tableInfo
 
- 
 - 
Constructor SummaryConstructors Constructor Description GeoPackageDao(ConnectionSource connectionSource, Class<T> dataClass)Constructor, required by ORMLite
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <D extends GeoPackageDao<O,?>,O>
 DcreateDao(Class<O> clazz)Create a GeoPackage DAOstatic <D extends GeoPackageDao<O,?>,O>
 DcreateDao(GeoPackageCoreConnection db, DatabaseTableConfig<O> tableConfig)Create a GeoPackage DAOstatic <D extends GeoPackageDao<O,?>,O>
 DcreateDao(GeoPackageCoreConnection db, Class<O> clazz)Create a GeoPackage DAOvoiddropTable(String table)Drop the tableGeoPackageCoreConnectiongetDatabase()Get the databasebooleanisTable()Check if the DAO is backed by a tablebooleanisTableExists()booleanisTableOrView()Check if the DAO is backed by a table or a viewbooleanisView()Check if the DAO is backed by a viewvoidsetDatabase(GeoPackageCoreConnection db)Set the databasebooleantableExists(String tableName)Check if the table existsbooleantableOrViewExists(String name)Check if a table or view exists with the namevoidverifyExists()Verify the DAO is backed by a table or viewbooleanviewExists(String viewName)Check if the view exists- 
Methods inherited from class com.j256.ormlite.dao.BaseDaoImplassignEmptyForeignCollection, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.lang.IterableforEach, spliterator
 
- 
 
- 
- 
- 
Field Detail- 
dbprotected GeoPackageCoreConnection db Database connection
 
- 
 - 
Constructor Detail- 
GeoPackageDaopublic GeoPackageDao(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException Constructor, required by ORMLite- Parameters:
- connectionSource- connection source
- dataClass- data class
- Throws:
- SQLException- upon failure
 
 
- 
 - 
Method Detail- 
isTableExistspublic boolean isTableExists() throws SQLExceptionCheck if the DAO is backed by a table or a view - Specified by:
- isTableExistsin interface- Dao<T,ID>
- Overrides:
- isTableExistsin class- BaseDaoImpl<T,ID>
- Returns:
- true if a table or view exists
- Throws:
- SQLException
 
 - 
isTableOrViewpublic boolean isTableOrView() Check if the DAO is backed by a table or a view- Returns:
- true if a table or view exists
 
 - 
isTablepublic boolean isTable() Check if the DAO is backed by a table- Returns:
- true if a table exists
 
 - 
isViewpublic boolean isView() Check if the DAO is backed by a view- Returns:
- true if a view exists
 
 - 
verifyExistspublic void verifyExists() Verify the DAO is backed by a table or view- Since:
- 4.0.0
 
 - 
setDatabasepublic void setDatabase(GeoPackageCoreConnection db) Set the database- Parameters:
- db- database connection
 
 - 
getDatabasepublic GeoPackageCoreConnection getDatabase() Get the database- Returns:
- database connection
 
 - 
dropTablepublic void dropTable(String table) Drop the table- Parameters:
- table- table name
 
 - 
tableExistspublic boolean tableExists(String tableName) Check if the table exists- Parameters:
- tableName- table name
- Returns:
- true if exists
 
 - 
viewExistspublic boolean viewExists(String viewName) Check if the view exists- Parameters:
- viewName- view name
- Returns:
- true if exists
 
 - 
tableOrViewExistspublic boolean tableOrViewExists(String name) Check if a table or view exists with the name- Parameters:
- name- table or view name
- Returns:
- true if exists
 
 - 
createDaopublic <D extends GeoPackageDao<O,?>,O> D createDao(Class<O> clazz) Create a GeoPackage DAO- Type Parameters:
- D- DAO type
- O- DAO object type
- Parameters:
- clazz- DAO class type
- Returns:
- GeoPackage DAO
 
 - 
createDaopublic static <D extends GeoPackageDao<O,?>,O> D createDao(GeoPackageCoreConnection db, Class<O> clazz) Create a GeoPackage DAO- Type Parameters:
- D- DAO type
- O- DAO object type
- Parameters:
- db- database connection
- clazz- DAO class type
- Returns:
- GeoPackage DAO
 
 - 
createDaopublic static <D extends GeoPackageDao<O,?>,O> D createDao(GeoPackageCoreConnection db, DatabaseTableConfig<O> tableConfig) throws SQLException Create a GeoPackage DAO- Type Parameters:
- D- DAO type
- O- DAO object type
- Parameters:
- db- database connection
- tableConfig- table config
- Returns:
- GeoPackage DAO
- Throws:
- SQLException- upon error
- Since:
- 4.0.0
 
 
- 
 
-