Package mil.nga.geopackage.user
Class UserDao<TColumn extends UserColumn,TTable extends UserTable<TColumn>,TRow extends UserRow<TColumn,TTable>,TResult extends UserResultSet<TColumn,TTable,TRow>>
- java.lang.Object
-
- mil.nga.geopackage.user.UserCoreDao<TColumn,TTable,TRow,TResult>
-
- mil.nga.geopackage.user.UserDao<TColumn,TTable,TRow,TResult>
-
- Type Parameters:
TColumn
- column typeTTable
- table typeTRow
- row typeTResult
- result type
- Direct Known Subclasses:
AttributesDao
,FeatureDao
,TileDao
,UserCustomDao
public abstract class UserDao<TColumn extends UserColumn,TTable extends UserTable<TColumn>,TRow extends UserRow<TColumn,TTable>,TResult extends UserResultSet<TColumn,TTable,TRow>> extends UserCoreDao<TColumn,TTable,TRow,TResult>
Abstract User DAO for reading user tables- Author:
- osbornb
-
-
Field Summary
-
Fields inherited from class mil.nga.geopackage.user.UserCoreDao
projection
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UserDao(String database, GeoPackageConnection db, UserConnection<TColumn,TTable,TRow,TResult> userDb, TTable table)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginTransaction()
void
commit()
void
endTransaction(boolean successful)
Connection
getConnection()
Get the database connectionGeoPackageConnection
getDb()
long
insert(ContentValues values)
Inserts a new rowlong
insert(TRow row)
long
insertOrThrow(ContentValues values)
Inserts a new rowboolean
inTransaction()
protected TResult
prepareResult(TResult result)
int
update(ContentValues values, String whereClause, String[] whereArgs)
Update all rows matching the where clause with the provided valuesint
update(TRow row)
-
Methods inherited from class mil.nga.geopackage.user.UserCoreDao
addColumn, alterColumn, alterColumns, buildColumnsAs, buildColumnsAs, buildColumnsAs, buildColumnsAs, buildColumnsAs, buildColumnsAsNull, buildColumnsAsNull, buildLimit, buildValueWhere, buildValueWhereArgs, buildWhere, buildWhere, buildWhere, buildWhere, buildWhere, buildWhere, buildWhere, buildWhere, buildWhere, buildWhere, buildWhere, buildWhere, buildWhereArgs, buildWhereArgs, buildWhereArgs, buildWhereArgs, buildWhereArgs, buildWhereArgs, buildWhereArgs, buildWhereArgs, buildWhereArgs, buildWhereArgs, buildWhereArgs, buildWhereArgs, buildWhereIn, buildWhereInArgs, buildWhereLike, buildWhereLike, buildWhereNull, columnCount, count, count, count, count, count, count, count, count, countColumn, countColumnIn, countColumnIn, countForEq, countForEq, countForEq, countForEq, countForEq, countForEq, countForEq, countForEq, countForEq, countForFieldValues, countForFieldValues, countForFieldValues, countForLike, countForLike, countForLike, countForLike, countForLike, countForLike, countForLike, countForLike, countForLike, countForValueFieldValues, countForValueFieldValues, countForValueFieldValues, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, countIn, create, createDao, delete, delete, delete, deleteAll, deleteById, dropColumn, dropColumn, dropColumn, dropColumnIndexes, dropColumnNames, dropColumns, dropTable, endAndBeginTransaction, endTransaction, failTransaction, getBoundingBox, getBoundingBox, getColumnNames, getColumns, getContents, getDatabase, getPkColumn, getPkColumnIndex, getPkColumnName, getPkWhere, getPkWhereArgs, getProjection, getTable, getTableName, getUserDb, getXRange, getXRange, getYRange, getYRange, getZoomLevel, hasPkColumn, isPkModifiable, isValueValidation, max, max, min, min, newRow, projectBoundingBox, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, queryAs, queryAs, queryForAll, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForChunk, queryForEq, queryForEq, queryForEq, queryForEq, queryForEq, queryForEq, queryForEq, queryForEq, queryForEq, queryForEq, queryForEq, queryForEq, queryForFieldValues, queryForFieldValues, queryForFieldValues, queryForFieldValues, queryForId, queryForId, queryForId, queryForId, queryForIdRow, queryForIdRow, queryForIdRow, queryForIdRow, queryForLike, queryForLike, queryForLike, queryForLike, queryForLike, queryForLike, queryForLike, queryForLike, queryForLike, queryForLike, queryForLike, queryForLike, queryForValueFieldValues, queryForValueFieldValues, queryForValueFieldValues, queryForValueFieldValues, queryIdsSQL, queryIdsSQL, queryIdsSQL, queryIdsSQL, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryIn, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunk, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryInForChunkWhere, queryResults, queryResults, queryResults, queryResults, querySingleColumnResults, querySingleColumnResults, querySingleColumnResults, querySingleColumnResults, querySingleColumnResults, querySingleColumnResults, querySingleColumnTypedResults, querySingleColumnTypedResults, querySingleColumnTypedResults, querySingleColumnTypedResults, querySingleColumnTypedResults, querySingleColumnTypedResults, querySingleResult, querySingleResult, querySingleResult, querySingleResult, querySingleRowResults, querySingleRowResults, querySingleRowTypedResults, querySingleRowTypedResults, querySingleTypedResult, querySingleTypedResult, querySingleTypedResult, querySingleTypedResult, querySQL, querySQL, querySQL, querySQL, querySQL, querySQL, querySQL, querySQL, queryTypedResults, queryTypedResults, queryTypedResults, queryTypedResults, rawQuery, rawQuery, rawQuery, renameColumn, renameColumn, renameColumn, renameTableColumn, setPkModifiable, setValueValidation
-
-
-
-
Constructor Detail
-
UserDao
protected UserDao(String database, GeoPackageConnection db, UserConnection<TColumn,TTable,TRow,TResult> userDb, TTable table)
Constructor- Parameters:
database
- databasedb
- GeoPackage connectionuserDb
- user connectiontable
- table
-
-
Method Detail
-
getDb
public GeoPackageConnection getDb()
-
getConnection
public Connection getConnection()
Get the database connection- Returns:
- connection
-
prepareResult
protected TResult prepareResult(TResult result)
- Specified by:
prepareResult
in classUserCoreDao<TColumn extends UserColumn,TTable extends UserTable<TColumn>,TRow extends UserRow<TColumn,TTable>,TResult extends UserResultSet<TColumn,TTable,TRow>>
-
beginTransaction
public void beginTransaction()
- Specified by:
beginTransaction
in classUserCoreDao<TColumn extends UserColumn,TTable extends UserTable<TColumn>,TRow extends UserRow<TColumn,TTable>,TResult extends UserResultSet<TColumn,TTable,TRow>>
-
endTransaction
public void endTransaction(boolean successful)
- Specified by:
endTransaction
in classUserCoreDao<TColumn extends UserColumn,TTable extends UserTable<TColumn>,TRow extends UserRow<TColumn,TTable>,TResult extends UserResultSet<TColumn,TTable,TRow>>
-
commit
public void commit()
-
inTransaction
public boolean inTransaction()
- Specified by:
inTransaction
in classUserCoreDao<TColumn extends UserColumn,TTable extends UserTable<TColumn>,TRow extends UserRow<TColumn,TTable>,TResult extends UserResultSet<TColumn,TTable,TRow>>
-
update
public int update(TRow row)
-
update
public int update(ContentValues values, String whereClause, String[] whereArgs)
Update all rows matching the where clause with the provided values- Parameters:
values
- content valueswhereClause
- where clausewhereArgs
- where arguments- Returns:
- updated count
-
insert
public long insert(TRow row)
-
insert
public long insert(ContentValues values)
Inserts a new row- Parameters:
values
- content values- Returns:
- row id, -1 on error
-
insertOrThrow
public long insertOrThrow(ContentValues values)
Inserts a new row- Parameters:
values
- content values- Returns:
- row id
-
-