Package mil.nga.geopackage.extension
Class ExtensionsDao
- java.lang.Object
-
- com.j256.ormlite.dao.BaseDaoImpl<T,ID>
-
- mil.nga.geopackage.db.GeoPackageDao<Extensions,Void>
-
- mil.nga.geopackage.extension.ExtensionsDao
-
- All Implemented Interfaces:
CloseableIterable<Extensions>
,Dao<Extensions,Void>
,Iterable<Extensions>
public class ExtensionsDao extends GeoPackageDao<Extensions,Void>
Extensions 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 ExtensionsDao(ConnectionSource connectionSource, Class<Extensions> dataClass)
Constructor, required by ORMLite
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExtensionsDao
create(GeoPackageCoreConnection db)
Create the DAOstatic ExtensionsDao
create(GeoPackageCore geoPackage)
Create the DAOint
delete(Extensions extensions)
int
deleteAll()
Delete all extensionsint
deleteByExtension(String extensionName)
Delete by extension nameint
deleteByExtension(String extensionName, String tableName)
Delete by extension name and table nameint
deleteByExtension(String extensionName, String tableName, String columnName)
Delete by extension name, table name, and column nameint
deleteByTableName(String tableName)
Delete by table nameList<Extensions>
queryByExtension(String extensionName)
Query by extension nameList<Extensions>
queryByExtension(String extensionName, String tableName)
Query by extension name and table nameExtensions
queryByExtension(String extensionName, String tableName, String columnName)
Query by extension name, table name, and column nameint
update(Extensions extensions)
-
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, 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, 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
-
ExtensionsDao
public ExtensionsDao(ConnectionSource connectionSource, Class<Extensions> dataClass) throws SQLException
Constructor, required by ORMLite- Parameters:
connectionSource
- connection sourcedataClass
- data class- Throws:
SQLException
- upon failure
-
-
Method Detail
-
create
public static ExtensionsDao create(GeoPackageCore geoPackage)
Create the DAO- Parameters:
geoPackage
- GeoPackage- Returns:
- dao
- Since:
- 4.0.0
-
create
public static ExtensionsDao create(GeoPackageCoreConnection db)
Create the DAO- Parameters:
db
- database connection- Returns:
- dao
- Since:
- 4.0.0
-
update
public int update(Extensions extensions) throws SQLException
Update using the unique columns
- Specified by:
update
in interfaceDao<Extensions,Void>
- Overrides:
update
in classBaseDaoImpl<Extensions,Void>
- Throws:
SQLException
-
delete
public int delete(Extensions extensions) throws SQLException
Delete using the unique columns
- Specified by:
delete
in interfaceDao<Extensions,Void>
- Overrides:
delete
in classBaseDaoImpl<Extensions,Void>
- Throws:
SQLException
-
deleteByExtension
public int deleteByExtension(String extensionName) throws SQLException
Delete by extension name- Parameters:
extensionName
- extension name- Returns:
- deleted count
- Throws:
SQLException
- upon failure
-
deleteByExtension
public int deleteByExtension(String extensionName, String tableName) throws SQLException
Delete by extension name and table name- Parameters:
extensionName
- extension nametableName
- table name- Returns:
- deleted count
- Throws:
SQLException
- upon failure
-
deleteByExtension
public int deleteByExtension(String extensionName, String tableName, String columnName) throws SQLException
Delete by extension name, table name, and column name- Parameters:
extensionName
- extension nametableName
- table namecolumnName
- column name- Returns:
- deleted count
- Throws:
SQLException
- upon failure
-
deleteByTableName
public int deleteByTableName(String tableName) throws SQLException
Delete by table name- Parameters:
tableName
- table name- Returns:
- rows deleted
- Throws:
SQLException
- upon failure- Since:
- 1.1.8
-
deleteAll
public int deleteAll() throws SQLException
Delete all extensions- Returns:
- rows deleted
- Throws:
SQLException
- upon failure- Since:
- 1.1.8
-
queryByExtension
public List<Extensions> queryByExtension(String extensionName) throws SQLException
Query by extension name- Parameters:
extensionName
- extension name- Returns:
- extensions
- Throws:
SQLException
- upon failure
-
queryByExtension
public List<Extensions> queryByExtension(String extensionName, String tableName) throws SQLException
Query by extension name and table name- Parameters:
extensionName
- extension nametableName
- table name- Returns:
- extensions
- Throws:
SQLException
- upon failure
-
queryByExtension
public Extensions queryByExtension(String extensionName, String tableName, String columnName) throws SQLException
Query by extension name, table name, and column name- Parameters:
extensionName
- extension nametableName
- table namecolumnName
- column name- Returns:
- extensions
- Throws:
SQLException
- upon failure
-
-