TColumn - column typeTTable - table typeTRow - row typeTResult - result typepublic abstract class UserCoreDao<TColumn extends UserColumn,TTable extends UserTable<TColumn>,TRow extends UserCoreRow<TColumn,TTable>,TResult extends UserCoreResult<TColumn,TTable,TRow>> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Projection |
projection
Projection
|
| Modifier | Constructor and Description |
|---|---|
protected |
UserCoreDao(String database,
GeoPackageCoreConnection db,
UserCoreConnection<TColumn,TTable,TRow,TResult> userDb,
TTable table)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(TColumn column)
Add a new column
|
void |
alterColumn(TColumn column)
Alter a column
|
void |
alterColumns(Collection<TColumn> columns)
Alter columns
|
abstract void |
beginTransaction()
Begin a transaction
|
String[] |
buildColumnsAs(List<TColumn> columns,
String value)
Build "columns as" values for the table columns with the specified
columns as the specified value
|
String[] |
buildColumnsAs(List<TColumn> columns,
String[] values)
Build "columns as" values for the table columns with the specified
columns as the specified values
|
String[] |
buildColumnsAs(Map<String,String> columns)
Build "columns as" values for the table column to value mapping
|
String[] |
buildColumnsAs(String[] columns,
String value)
Build "columns as" values for the table columns with the specified
columns as the specified value
|
String[] |
buildColumnsAs(String[] columns,
String[] values)
Build "columns as" values for the table columns with the specified
columns as the specified values
|
String[] |
buildColumnsAsNull(List<TColumn> columns)
Build "columns as" values for the table columns with the specified
columns as null
|
String[] |
buildColumnsAsNull(String[] columns)
Build "columns as" values for the table columns with the specified
columns as null
|
String |
buildLimit(int limit,
long offset)
Build a limit String with the limit and offset
|
String |
buildValueWhere(Set<Map.Entry<String,ColumnValue>> fields)
Build where (or selection) statement from the fields
|
String[] |
buildValueWhereArgs(Collection<ColumnValue> values)
Build where (or selection) args for the values
|
String |
buildWhere(Set<Map.Entry<String,Object>> fields)
Build where (or selection) statement from the fields
|
String |
buildWhere(String field,
ColumnValue value)
Build where (or selection) statement for a single field
|
String |
buildWhere(String field,
Object value)
Build where (or selection) statement for a single field
|
String |
buildWhere(String field,
Object value,
String operation)
Build where (or selection) statement for a single field using the
provided operation
|
String[] |
buildWhereArgs(Collection<Object> values)
Build where (or selection) args for the values
|
String[] |
buildWhereArgs(ColumnValue value)
Build where (or selection) args for the value
|
String[] |
buildWhereArgs(Object value)
Build where (or selection) args for the value
|
String[] |
buildWhereArgs(Object[] values)
Build where (or selection) args for the values
|
String |
buildWhereIn(String nestedSQL,
String where)
Build where statement for ids in the nested SQL query
|
String[] |
buildWhereInArgs(String[] nestedArgs,
String[] whereArgs)
Build where args for ids in the nested SQL query
|
String |
buildWhereLike(String field,
ColumnValue value)
Build where (or selection) LIKE statement for a single field
|
String |
buildWhereLike(String field,
Object value)
Build where (or selection) LIKE statement for a single field
|
int |
columnCount()
Get the column count
|
abstract void |
commit()
Commit changes on the connection
|
int |
count()
Get the total count
|
int |
count(String where)
Get the count
|
int |
count(String where,
String[] args)
Get the count
|
int |
countForEq(String fieldName,
ColumnValue value)
Count where the field equals the value
|
int |
countForEq(String fieldName,
Object value)
Count where the field equals the value
|
int |
countForEq(String fieldName,
Object value,
String groupBy,
String having,
String orderBy)
Count where the field equals the value
|
int |
countForFieldValues(Map<String,Object> fieldValues)
Count where all fields match their values
|
int |
countForLike(String fieldName,
ColumnValue value)
Count where the field is like the value
|
int |
countForLike(String fieldName,
Object value)
Count where the field is like the value
|
int |
countForLike(String fieldName,
Object value,
String groupBy,
String having,
String orderBy)
Count where the field equals the value
|
int |
countForValueFieldValues(Map<String,ColumnValue> fieldValues)
Count where all fields match their values
|
int |
countIn(String nestedSQL)
Get the count in the nested SQL query
|
int |
countIn(String nestedSQL,
Map<String,Object> fieldValues)
Get the count in the nested SQL query
|
int |
countIn(String nestedSQL,
String where)
Get the count in the nested SQL query
|
int |
countIn(String nestedSQL,
String[] nestedArgs)
Get the count in the nested SQL query
|
int |
countIn(String nestedSQL,
String[] nestedArgs,
Map<String,Object> fieldValues)
Get the count in the nested SQL query
|
int |
countIn(String nestedSQL,
String[] nestedArgs,
String where)
Get the count in the nested SQL query
|
int |
countIn(String nestedSQL,
String[] nestedArgs,
String where,
String[] whereArgs)
Get the count in the nested SQL query
|
int |
countIn(String nestedSQL,
String where,
String[] whereArgs)
Get the count in the nested SQL query
|
long |
create(TRow row)
Creates a new row, same as calling
insert(UserCoreRow) |
int |
delete(Map<String,Object> fieldValues)
Delete rows matching the field values
|
int |
delete(String whereClause,
String[] whereArgs)
Delete rows matching the where clause
|
int |
delete(TRow row)
Delete the row
|
int |
deleteAll()
Delete all rows
|
int |
deleteById(long id)
Delete a row by id
|
void |
dropColumn(int index)
Drop a column
|
void |
dropColumn(String columnName)
Drop a column
|
void |
dropColumn(TColumn column)
Drop a column
|
void |
dropColumnIndexes(Collection<Integer> indexes)
Drop columns
|
void |
dropColumnNames(Collection<String> columnNames)
Drop columns
|
void |
dropColumns(Collection<TColumn> columns)
Drop columns
|
void |
dropTable()
Drop the user table
|
void |
endAndBeginTransaction()
End a transaction as successful and begin a new transaction
|
void |
endTransaction()
End a transaction successfully
|
abstract void |
endTransaction(boolean successful)
End a transaction
|
void |
failTransaction()
Fail a transaction
|
abstract BoundingBox |
getBoundingBox()
Get the bounding box of the user table data
|
abstract BoundingBox |
getBoundingBox(Projection projection)
Get the bounding box of the user table data
|
String[] |
getColumnNames()
Get the table column names
|
List<TColumn> |
getColumns()
Get the table columns
|
Contents |
getContents()
Get the contents
|
String |
getDatabase()
Get the database
|
GeoPackageCoreConnection |
getDb()
Get the database connection
|
protected String |
getPkWhere(long id)
Get the primary key where clause
|
protected String[] |
getPkWhereArgs(long id)
Get the primary key where args
|
Projection |
getProjection()
Get the projection
|
TTable |
getTable()
Get the table
|
String |
getTableName()
Get the table name
|
UserCoreConnection<TColumn,TTable,TRow,TResult> |
getUserDb()
Get the user database connection
|
int |
getZoomLevel()
Get the approximate zoom level of where the bounding box of the user data
fits into the world
|
abstract long |
insert(TRow row)
Inserts a new row
|
abstract boolean |
inTransaction()
Determine if currently within a transaction
|
Integer |
max(String column,
String where,
String[] args)
Get the max result of the column
|
Integer |
min(String column,
String where,
String[] args)
Get the min result of the column
|
abstract TRow |
newRow()
Get a new empty row
|
protected abstract TResult |
prepareResult(TResult result)
Prepare the result before returning
|
BoundingBox |
projectBoundingBox(BoundingBox boundingBox,
Projection projection)
Project the provided bounding box in the declared projection to the user
DAO projection
|
TResult |
query()
Query for all rows
|
TResult |
query(String where)
Query for rows
|
TResult |
query(String[] columns)
Query for all rows
|
TResult |
query(String[] columns,
String where)
Query for rows
|
TResult |
query(String[] columns,
String[] columnsAs)
Query for all rows with "columns as" values for corresponding column
indices.
|
TResult |
query(String[] columns,
String where,
String[] whereArgs)
Query for rows
|
TResult |
query(String[] columns,
String where,
String[] whereArgs,
String groupBy,
String having,
String orderBy)
Query for rows
|
TResult |
query(String[] columns,
String where,
String[] whereArgs,
String groupBy,
String having,
String orderBy,
String limit)
Query for rows
|
TResult |
query(String where,
String[] whereArgs)
Query for rows
|
TResult |
query(String where,
String[] whereArgs,
String groupBy,
String having,
String orderBy)
Query for rows
|
TResult |
query(String where,
String[] whereArgs,
String groupBy,
String having,
String orderBy,
String limit)
Query for rows
|
TResult |
queryAs(String[] columnsAs)
Query for all rows with "columns as" values for corresponding column
indices.
|
TResult |
queryForAll()
Query for all rows
|
TResult |
queryForChunk(int limit,
long offset)
Query for id ordered rows starting at the offset and returning no more
than the limit.
|
TResult |
queryForChunk(String[] columns,
int limit,
long offset)
Query for id ordered rows starting at the offset and returning no more
than the limit.
|
TResult |
queryForChunk(String[] columns,
String orderBy,
int limit,
long offset)
Query for ordered rows starting at the offset and returning no more than
the limit.
|
TResult |
queryForChunk(String[] columns,
String where,
String[] whereArgs,
int limit,
long offset)
Query for id ordered rows starting at the offset and returning no more
than the limit.
|
TResult |
queryForChunk(String[] columns,
String where,
String[] whereArgs,
String orderBy,
int limit,
long offset)
Query for ordered rows starting at the offset and returning no more than
the limit.
|
TResult |
queryForChunk(String[] columns,
String where,
String[] whereArgs,
String groupBy,
String having,
String orderBy,
int limit,
long offset)
Query for ordered rows starting at the offset and returning no more than
the limit.
|
TResult |
queryForChunk(String orderBy,
int limit,
long offset)
Query for ordered rows starting at the offset and returning no more than
the limit.
|
TResult |
queryForChunk(String where,
String[] whereArgs,
int limit,
long offset)
Query for id ordered rows starting at the offset and returning no more
than the limit.
|
TResult |
queryForChunk(String where,
String[] whereArgs,
String orderBy,
int limit,
long offset)
Query for ordered rows starting at the offset and returning no more than
the limit.
|
TResult |
queryForChunk(String where,
String[] whereArgs,
String groupBy,
String having,
String orderBy,
int limit,
long offset)
Query for ordered rows starting at the offset and returning no more than
the limit.
|
TResult |
queryForEq(String[] columns,
String fieldName,
ColumnValue value)
Query for the row where the field equals the value
|
TResult |
queryForEq(String[] columns,
String fieldName,
Object value)
Query for the row where the field equals the value
|
TResult |
queryForEq(String[] columns,
String fieldName,
Object value,
String groupBy,
String having,
String orderBy)
Query for the row where the field equals the value
|
TResult |
queryForEq(String fieldName,
ColumnValue value)
Query for the row where the field equals the value
|
TResult |
queryForEq(String fieldName,
Object value)
Query for the row where the field equals the value
|
TResult |
queryForEq(String fieldName,
Object value,
String groupBy,
String having,
String orderBy)
Query for the row where the field equals the value
|
TResult |
queryForFieldValues(Map<String,Object> fieldValues)
Query for the row where all fields match their values
|
TResult |
queryForFieldValues(String[] columns,
Map<String,Object> fieldValues)
Query for the row where all fields match their values
|
TResult |
queryForId(long id)
Query for the row with the provided id
|
TResult |
queryForId(String[] columns,
long id)
Query for the row with the provided id
|
TRow |
queryForIdRow(long id)
Query for the row with the provided id
|
TRow |
queryForIdRow(String[] columns,
long id)
Query for the row with the provided id
|
TResult |
queryForLike(String[] columns,
String fieldName,
ColumnValue value)
Query for the row where the field is like the value
|
TResult |
queryForLike(String[] columns,
String fieldName,
Object value)
Query for the row where the field is like the value
|
TResult |
queryForLike(String[] columns,
String fieldName,
Object value,
String groupBy,
String having,
String orderBy)
Query for the row where the field equals the value
|
TResult |
queryForLike(String fieldName,
ColumnValue value)
Query for the row where the field is like the value
|
TResult |
queryForLike(String fieldName,
Object value)
Query for the row where the field is like the value
|
TResult |
queryForLike(String fieldName,
Object value,
String groupBy,
String having,
String orderBy)
Query for the row where the field equals the value
|
TResult |
queryForValueFieldValues(Map<String,ColumnValue> fieldValues)
Query for the row where all fields match their values
|
TResult |
queryForValueFieldValues(String[] columns,
Map<String,ColumnValue> fieldValues)
Query for the row where all fields match their values
|
String |
queryIdsSQL()
Query SQL for all row ids
|
String |
queryIdsSQL(String where)
Query SQL for row ids
|
TResult |
queryIn(String nestedSQL)
Query for ids in the nested SQL query
|
TResult |
queryIn(String[] columns,
String nestedSQL)
Query for ids in the nested SQL query
|
TResult |
queryIn(String[] columns,
String nestedSQL,
Map<String,Object> fieldValues)
Query for ids in the nested SQL query
|
TResult |
queryIn(String[] columns,
String nestedSQL,
String where)
Query for ids in the nested SQL query
|
TResult |
queryIn(String[] columns,
String nestedSQL,
String[] nestedArgs)
Query for ids in the nested SQL query
|
TResult |
queryIn(String[] columns,
String nestedSQL,
String[] nestedArgs,
Map<String,Object> fieldValues)
Query for ids in the nested SQL query
|
TResult |
queryIn(String[] columns,
String nestedSQL,
String[] nestedArgs,
String where)
Query for ids in the nested SQL query
|
TResult |
queryIn(String[] columns,
String nestedSQL,
String[] nestedArgs,
String where,
String[] whereArgs)
Query for ids in the nested SQL query
|
TResult |
queryIn(String[] columns,
String nestedSQL,
String where,
String[] whereArgs)
Query for ids in the nested SQL query
|
TResult |
queryIn(String nestedSQL,
Map<String,Object> fieldValues)
Query for ids in the nested SQL query
|
TResult |
queryIn(String nestedSQL,
String where)
Query for ids in the nested SQL query
|
TResult |
queryIn(String nestedSQL,
String[] nestedArgs)
Query for ids in the nested SQL query
|
TResult |
queryIn(String nestedSQL,
String[] nestedArgs,
Map<String,Object> fieldValues)
Query for ids in the nested SQL query
|
TResult |
queryIn(String nestedSQL,
String[] nestedArgs,
String where)
Query for ids in the nested SQL query
|
TResult |
queryIn(String nestedSQL,
String[] nestedArgs,
String where,
String[] whereArgs)
Query for ids in the nested SQL query
|
TResult |
queryIn(String nestedSQL,
String where,
String[] whereArgs)
Query for ids in the nested SQL query
|
List<List<Object>> |
queryResults(String sql,
String[] args)
Query for values
|
List<List<Object>> |
queryResults(String sql,
String[] args,
GeoPackageDataType[] dataTypes)
Query for values
|
List<List<Object>> |
queryResults(String sql,
String[] args,
GeoPackageDataType[] dataTypes,
Integer limit)
Query for values up to the limit
|
List<List<Object>> |
queryResults(String sql,
String[] args,
Integer limit)
Query for values
|
List<Object> |
querySingleColumnResults(String sql,
String[] args)
Query for values from the first column
|
List<Object> |
querySingleColumnResults(String sql,
String[] args,
GeoPackageDataType dataType)
Query for values from the first column
|
List<Object> |
querySingleColumnResults(String sql,
String[] args,
int column)
Query for values from a single column
|
List<Object> |
querySingleColumnResults(String sql,
String[] args,
int column,
GeoPackageDataType dataType)
Query for values from a single column
|
List<Object> |
querySingleColumnResults(String sql,
String[] args,
int column,
GeoPackageDataType dataType,
Integer limit)
Query for values from a single column up to the limit
|
List<Object> |
querySingleColumnResults(String sql,
String[] args,
int column,
Integer limit)
Query for values from a single column up to the limit
|
<T> List<T> |
querySingleColumnTypedResults(String sql,
String[] args)
Query for typed values from the first column
|
<T> List<T> |
querySingleColumnTypedResults(String sql,
String[] args,
GeoPackageDataType dataType)
Query for typed values from the first column
|
<T> List<T> |
querySingleColumnTypedResults(String sql,
String[] args,
int column)
Query for typed values from a single column
|
<T> List<T> |
querySingleColumnTypedResults(String sql,
String[] args,
int column,
GeoPackageDataType dataType)
Query for typed values from a single column
|
<T> List<T> |
querySingleColumnTypedResults(String sql,
String[] args,
int column,
GeoPackageDataType dataType,
Integer limit)
Query for typed values from a single column up to the limit
|
<T> List<T> |
querySingleColumnTypedResults(String sql,
String[] args,
int column,
Integer limit)
Query for typed values from a single column up to the limit
|
Object |
querySingleResult(String sql,
String[] args)
Query the SQL for a single result object in the first column
|
Object |
querySingleResult(String sql,
String[] args,
GeoPackageDataType dataType)
Query the SQL for a single result object in the first column with the
expected data type
|
Object |
querySingleResult(String sql,
String[] args,
int column)
Query the SQL for a single result object
|
Object |
querySingleResult(String sql,
String[] args,
int column,
GeoPackageDataType dataType)
Query the SQL for a single result object with the expected data type
|
List<Object> |
querySingleRowResults(String sql,
String[] args)
Query for string values in a single (first) row
|
List<Object> |
querySingleRowResults(String sql,
String[] args,
GeoPackageDataType[] dataTypes)
Query for values in a single (first) row
|
<T> List<T> |
querySingleRowTypedResults(String sql,
String[] args)
Query for string typed values in a single (first) row
|
<T> List<T> |
querySingleRowTypedResults(String sql,
String[] args,
GeoPackageDataType[] dataTypes)
Query for typed values in a single (first) row
|
<T> T |
querySingleTypedResult(String sql,
String[] args)
Query the SQL for a single result typed object in the first column
|
<T> T |
querySingleTypedResult(String sql,
String[] args,
GeoPackageDataType dataType)
Query the SQL for a single result typed object in the first column with
the expected data type
|
<T> T |
querySingleTypedResult(String sql,
String[] args,
int column)
Query the SQL for a single result typed object
|
<T> T |
querySingleTypedResult(String sql,
String[] args,
int column,
GeoPackageDataType dataType)
Query the SQL for a single result typed object with the expected data
type
|
String |
querySQL()
Query SQL for all rows
|
String |
querySQL(String where)
Query SQL for rows
|
String |
querySQL(String[] columns)
Query SQL for all rows
|
String |
querySQL(String[] columns,
String where)
Query SQL for rows
|
<T> List<List<T>> |
queryTypedResults(String sql,
String[] args)
Query for typed values
|
<T> List<List<T>> |
queryTypedResults(String sql,
String[] args,
GeoPackageDataType[] dataTypes)
Query for typed values
|
<T> List<List<T>> |
queryTypedResults(String sql,
String[] args,
GeoPackageDataType[] dataTypes,
Integer limit)
Query for typed values up to the limit
|
<T> List<List<T>> |
queryTypedResults(String sql,
String[] args,
Integer limit)
Query for typed values
|
TResult |
rawQuery(String sql)
Raw query
|
TResult |
rawQuery(String sql,
String[] selectionArgs)
Raw query
|
void |
renameColumn(int index,
String newColumnName)
Rename column
|
void |
renameColumn(String columnName,
String newColumnName)
Rename column
|
void |
renameColumn(TColumn column,
String newColumnName)
Rename column
|
protected void |
renameTableColumn(String columnName,
String newColumnName)
Rename a table column
|
abstract int |
update(TRow row)
Update the row
|
protected Projection projection
protected UserCoreDao(String database, GeoPackageCoreConnection db, UserCoreConnection<TColumn,TTable,TRow,TResult> userDb, TTable table)
database - database namedb - GeoPackage connectionuserDb - user connectiontable - tablepublic abstract TRow newRow()
public abstract BoundingBox getBoundingBox()
public abstract BoundingBox getBoundingBox(Projection projection)
projection - desired projectionpublic BoundingBox projectBoundingBox(BoundingBox boundingBox, Projection projection)
boundingBox - bounding boxprojection - projectionprotected abstract TResult prepareResult(TResult result)
result - resultpublic String getDatabase()
public GeoPackageCoreConnection getDb()
public UserCoreConnection<TColumn,TTable,TRow,TResult> getUserDb()
public String getTableName()
public TTable getTable()
public String[] getColumnNames()
public int columnCount()
public Contents getContents()
public Projection getProjection()
public void dropTable()
public TResult rawQuery(String sql)
sql - SQLpublic TResult rawQuery(String sql, String[] selectionArgs)
sql - SQLselectionArgs - selection argspublic TResult queryForAll()
public TResult query()
public TResult query(String[] columns)
columns - columnspublic TResult queryAs(String[] columnsAs)
columnsAs - columns as valuespublic TResult query(String[] columns, String[] columnsAs)
columns - columnscolumnsAs - columns as valuespublic String querySQL()
public String queryIdsSQL()
public String querySQL(String[] columns)
columns - columnspublic TResult queryForEq(String fieldName, Object value)
fieldName - field namevalue - valuepublic TResult queryForEq(String[] columns, String fieldName, Object value)
columns - columnsfieldName - field namevalue - valuepublic int countForEq(String fieldName, Object value)
fieldName - field namevalue - valuepublic TResult queryForEq(String fieldName, Object value, String groupBy, String having, String orderBy)
fieldName - field namevalue - valuegroupBy - group byhaving - havingorderBy - order bypublic TResult queryForEq(String[] columns, String fieldName, Object value, String groupBy, String having, String orderBy)
columns - columnsfieldName - field namevalue - valuegroupBy - group byhaving - havingorderBy - order bypublic int countForEq(String fieldName, Object value, String groupBy, String having, String orderBy)
fieldName - field namevalue - valuegroupBy - group byhaving - havingorderBy - order bypublic TResult queryForEq(String fieldName, ColumnValue value)
fieldName - field namevalue - column valuepublic TResult queryForEq(String[] columns, String fieldName, ColumnValue value)
columns - columnsfieldName - field namevalue - column valuepublic int countForEq(String fieldName, ColumnValue value)
fieldName - field namevalue - column valuepublic TResult queryForLike(String fieldName, Object value)
fieldName - field namevalue - valuepublic TResult queryForLike(String[] columns, String fieldName, Object value)
columns - columnsfieldName - field namevalue - valuepublic int countForLike(String fieldName, Object value)
fieldName - field namevalue - valuepublic TResult queryForLike(String fieldName, Object value, String groupBy, String having, String orderBy)
fieldName - field namevalue - valuegroupBy - group by statementhaving - having statementorderBy - order by statementpublic TResult queryForLike(String[] columns, String fieldName, Object value, String groupBy, String having, String orderBy)
columns - columnsfieldName - field namevalue - valuegroupBy - group by statementhaving - having statementorderBy - order by statementpublic int countForLike(String fieldName, Object value, String groupBy, String having, String orderBy)
fieldName - field namevalue - valuegroupBy - group by statementhaving - having statementorderBy - order by statementpublic TResult queryForLike(String fieldName, ColumnValue value)
fieldName - field namevalue - column valuepublic TResult queryForLike(String[] columns, String fieldName, ColumnValue value)
columns - columnsfieldName - field namevalue - column valuepublic int countForLike(String fieldName, ColumnValue value)
fieldName - field namevalue - column valuepublic TResult queryForFieldValues(Map<String,Object> fieldValues)
fieldValues - field valuespublic TResult queryForFieldValues(String[] columns, Map<String,Object> fieldValues)
columns - columnsfieldValues - field valuespublic int countForFieldValues(Map<String,Object> fieldValues)
fieldValues - field valuespublic TResult queryForValueFieldValues(Map<String,ColumnValue> fieldValues)
fieldValues - field valuespublic TResult queryForValueFieldValues(String[] columns, Map<String,ColumnValue> fieldValues)
columns - columnsfieldValues - field valuespublic int countForValueFieldValues(Map<String,ColumnValue> fieldValues)
fieldValues - field valuespublic TResult queryForId(long id)
id - idpublic TResult queryForId(String[] columns, long id)
columns - columnsid - idpublic TRow queryForIdRow(long id)
id - idpublic TRow queryForIdRow(String[] columns, long id)
columns - columnsid - idpublic TResult queryIn(String nestedSQL)
nestedSQL - nested SQLpublic TResult queryIn(String[] columns, String nestedSQL)
columns - columnsnestedSQL - nested SQLpublic int countIn(String nestedSQL)
nestedSQL - nested SQLpublic TResult queryIn(String nestedSQL, String[] nestedArgs)
nestedSQL - nested SQLnestedArgs - nested SQL argspublic TResult queryIn(String[] columns, String nestedSQL, String[] nestedArgs)
columns - columnsnestedSQL - nested SQLnestedArgs - nested SQL argspublic int countIn(String nestedSQL, String[] nestedArgs)
nestedSQL - nested SQLnestedArgs - nested SQL argspublic TResult queryIn(String nestedSQL, Map<String,Object> fieldValues)
nestedSQL - nested SQLfieldValues - field valuespublic TResult queryIn(String[] columns, String nestedSQL, Map<String,Object> fieldValues)
columns - columnsnestedSQL - nested SQLfieldValues - field valuespublic int countIn(String nestedSQL, Map<String,Object> fieldValues)
nestedSQL - nested SQLfieldValues - field valuespublic TResult queryIn(String nestedSQL, String[] nestedArgs, Map<String,Object> fieldValues)
nestedSQL - nested SQLnestedArgs - nested SQL argsfieldValues - field valuespublic TResult queryIn(String[] columns, String nestedSQL, String[] nestedArgs, Map<String,Object> fieldValues)
columns - columnsnestedSQL - nested SQLnestedArgs - nested SQL argsfieldValues - field valuespublic int countIn(String nestedSQL, String[] nestedArgs, Map<String,Object> fieldValues)
nestedSQL - nested SQLnestedArgs - nested SQL argsfieldValues - field valuespublic TResult queryIn(String nestedSQL, String[] nestedArgs, String where)
nestedSQL - nested SQLnestedArgs - nested SQL argswhere - where clausepublic TResult queryIn(String[] columns, String nestedSQL, String[] nestedArgs, String where)
columns - columnsnestedSQL - nested SQLnestedArgs - nested SQL argswhere - where clausepublic int countIn(String nestedSQL, String[] nestedArgs, String where)
nestedSQL - nested SQLnestedArgs - nested SQL argswhere - where clausepublic TResult queryIn(String nestedSQL, String where)
nestedSQL - nested SQLwhere - where clausepublic TResult queryIn(String[] columns, String nestedSQL, String where)
columns - columnsnestedSQL - nested SQLwhere - where clausepublic int countIn(String nestedSQL, String where)
nestedSQL - nested SQLwhere - where clausepublic TResult queryIn(String nestedSQL, String where, String[] whereArgs)
nestedSQL - nested SQLwhere - where clausewhereArgs - where argumentspublic TResult queryIn(String[] columns, String nestedSQL, String where, String[] whereArgs)
columns - columnsnestedSQL - nested SQLwhere - where clausewhereArgs - where argumentspublic int countIn(String nestedSQL, String where, String[] whereArgs)
nestedSQL - nested SQLwhere - where clausewhereArgs - where argumentspublic TResult queryIn(String nestedSQL, String[] nestedArgs, String where, String[] whereArgs)
nestedSQL - nested SQLnestedArgs - nested SQL argswhere - where clausewhereArgs - where argumentspublic TResult queryIn(String[] columns, String nestedSQL, String[] nestedArgs, String where, String[] whereArgs)
columns - columnsnestedSQL - nested SQLnestedArgs - nested SQL argswhere - where clausewhereArgs - where argumentspublic int countIn(String nestedSQL, String[] nestedArgs, String where, String[] whereArgs)
nestedSQL - nested SQLnestedArgs - nested SQL argswhere - where clausewhereArgs - where argumentspublic TResult query(String where)
where - where clausepublic TResult query(String[] columns, String where)
columns - columnswhere - where clausepublic TResult query(String where, String[] whereArgs)
where - where clausewhereArgs - where argumentspublic TResult query(String[] columns, String where, String[] whereArgs)
columns - columnswhere - where clausewhereArgs - where argumentspublic String querySQL(String where)
where - where clausepublic String queryIdsSQL(String where)
where - where clausepublic String querySQL(String[] columns, String where)
columns - columnswhere - where clausepublic TResult query(String where, String[] whereArgs, String groupBy, String having, String orderBy)
where - where clausewhereArgs - where argumentsgroupBy - group byhaving - havingorderBy - order bypublic TResult query(String[] columns, String where, String[] whereArgs, String groupBy, String having, String orderBy)
columns - columnswhere - where clausewhereArgs - where argumentsgroupBy - group byhaving - havingorderBy - order bypublic TResult query(String where, String[] whereArgs, String groupBy, String having, String orderBy, String limit)
where - where clausewhereArgs - where argumentsgroupBy - group byhaving - havingorderBy - order bylimit - limitpublic TResult query(String[] columns, String where, String[] whereArgs, String groupBy, String having, String orderBy, String limit)
columns - columnswhere - where clausewhereArgs - where argumentsgroupBy - group byhaving - havingorderBy - order bylimit - limitpublic TResult queryForChunk(int limit, long offset)
limit - chunk limitoffset - chunk query offsetpublic TResult queryForChunk(String[] columns, int limit, long offset)
columns - columnslimit - chunk limitoffset - chunk query offsetpublic TResult queryForChunk(String where, String[] whereArgs, int limit, long offset)
where - where clausewhereArgs - where argumentslimit - chunk limitoffset - chunk query offsetpublic TResult queryForChunk(String[] columns, String where, String[] whereArgs, int limit, long offset)
columns - columnswhere - where clausewhereArgs - where argumentslimit - chunk limitoffset - chunk query offsetpublic TResult queryForChunk(String orderBy, int limit, long offset)
orderBy - order bylimit - chunk limitoffset - chunk query offsetpublic TResult queryForChunk(String[] columns, String orderBy, int limit, long offset)
columns - columnsorderBy - order bylimit - chunk limitoffset - chunk query offsetpublic TResult queryForChunk(String where, String[] whereArgs, String orderBy, int limit, long offset)
where - where clausewhereArgs - where argumentsorderBy - order bylimit - chunk limitoffset - chunk query offsetpublic TResult queryForChunk(String[] columns, String where, String[] whereArgs, String orderBy, int limit, long offset)
columns - columnswhere - where clausewhereArgs - where argumentsorderBy - order bylimit - chunk limitoffset - chunk query offsetpublic TResult queryForChunk(String where, String[] whereArgs, String groupBy, String having, String orderBy, int limit, long offset)
where - where clausewhereArgs - where argumentsgroupBy - group byhaving - havingorderBy - order bylimit - chunk limitoffset - chunk query offsetpublic TResult queryForChunk(String[] columns, String where, String[] whereArgs, String groupBy, String having, String orderBy, int limit, long offset)
columns - columnswhere - where clausewhereArgs - where argumentsgroupBy - group byhaving - havingorderBy - order bylimit - chunk limitoffset - chunk query offsetpublic String buildLimit(int limit, long offset)
limit - limitoffset - offsetpublic abstract void beginTransaction()
public void endTransaction()
public void failTransaction()
public abstract void endTransaction(boolean successful)
successful - true if the transaction was successful, false to rollback or
not commitpublic void endAndBeginTransaction()
public abstract void commit()
public abstract boolean inTransaction()
public abstract int update(TRow row)
row - rowpublic int delete(TRow row)
row - rowpublic int deleteById(long id)
id - idpublic int delete(String whereClause, String[] whereArgs)
whereClause - where clausewhereArgs - where argumentspublic int delete(Map<String,Object> fieldValues)
fieldValues - field valuespublic int deleteAll()
public long create(TRow row)
insert(UserCoreRow)row - rowpublic abstract long insert(TRow row)
row - rowprotected String getPkWhere(long id)
id - idprotected String[] getPkWhereArgs(long id)
id - idpublic String buildWhere(Set<Map.Entry<String,Object>> fields)
fields - fieldspublic String buildValueWhere(Set<Map.Entry<String,ColumnValue>> fields)
fields - fieldspublic String buildWhere(String field, Object value)
field - field namevalue - field valuepublic String buildWhereLike(String field, Object value)
field - field namevalue - field valuepublic String buildWhere(String field, Object value, String operation)
field - fieldvalue - valueoperation - operationpublic String buildWhere(String field, ColumnValue value)
field - field namevalue - column valuepublic String buildWhereLike(String field, ColumnValue value)
field - field namevalue - column valuepublic String[] buildWhereArgs(Collection<Object> values)
values - valuespublic String[] buildWhereArgs(Object[] values)
values - valuespublic String[] buildValueWhereArgs(Collection<ColumnValue> values)
values - valuespublic String[] buildWhereArgs(Object value)
value - valuepublic String[] buildWhereArgs(ColumnValue value)
value - valuepublic String buildWhereIn(String nestedSQL, String where)
nestedSQL - nested SQLwhere - where clausepublic String[] buildWhereInArgs(String[] nestedArgs, String[] whereArgs)
nestedArgs - nested SQL argswhereArgs - where argumentspublic int count()
public int count(String where)
where - where clausepublic int count(String where, String[] args)
where - where clauseargs - where argumentspublic Integer min(String column, String where, String[] args)
column - column namewhere - where clauseargs - where arugmentspublic Integer max(String column, String where, String[] args)
column - column namewhere - where clauseargs - where argumentspublic Object querySingleResult(String sql, String[] args)
sql - sql statementargs - sql argumentspublic <T> T querySingleTypedResult(String sql, String[] args)
T - result value typesql - sql statementargs - sql argumentspublic Object querySingleResult(String sql, String[] args, GeoPackageDataType dataType)
sql - sql statementargs - sql argumentsdataType - GeoPackage data typepublic <T> T querySingleTypedResult(String sql, String[] args, GeoPackageDataType dataType)
T - result value typesql - sql statementargs - sql argumentsdataType - GeoPackage data typepublic Object querySingleResult(String sql, String[] args, int column)
sql - sql statementargs - argumentscolumn - column indexpublic <T> T querySingleTypedResult(String sql, String[] args, int column)
T - result value typesql - sql statementargs - argumentscolumn - column indexpublic Object querySingleResult(String sql, String[] args, int column, GeoPackageDataType dataType)
sql - sql statementargs - argumentscolumn - column indexdataType - GeoPackage data typepublic <T> T querySingleTypedResult(String sql, String[] args, int column, GeoPackageDataType dataType)
T - result value typesql - sql statementargs - argumentscolumn - column indexdataType - GeoPackage data typepublic List<Object> querySingleColumnResults(String sql, String[] args)
sql - sql statementargs - sql argumentspublic <T> List<T> querySingleColumnTypedResults(String sql, String[] args)
T - result value typesql - sql statementargs - sql argumentspublic List<Object> querySingleColumnResults(String sql, String[] args, GeoPackageDataType dataType)
sql - sql statementargs - argumentsdataType - GeoPackage data typepublic <T> List<T> querySingleColumnTypedResults(String sql, String[] args, GeoPackageDataType dataType)
T - result value typesql - sql statementargs - argumentsdataType - GeoPackage data typepublic List<Object> querySingleColumnResults(String sql, String[] args, int column)
sql - sql statementargs - argumentscolumn - column indexpublic <T> List<T> querySingleColumnTypedResults(String sql, String[] args, int column)
T - result value typesql - sql statementargs - argumentscolumn - column indexpublic List<Object> querySingleColumnResults(String sql, String[] args, int column, GeoPackageDataType dataType)
sql - sql statementargs - argumentscolumn - column indexdataType - GeoPackage data typepublic <T> List<T> querySingleColumnTypedResults(String sql, String[] args, int column, GeoPackageDataType dataType)
T - result value typesql - sql statementargs - argumentscolumn - column indexdataType - GeoPackage data typepublic List<Object> querySingleColumnResults(String sql, String[] args, int column, Integer limit)
sql - sql statementargs - argumentslimit - result row limitcolumn - column indexpublic <T> List<T> querySingleColumnTypedResults(String sql, String[] args, int column, Integer limit)
T - result value typesql - sql statementargs - argumentslimit - result row limitcolumn - column indexpublic List<Object> querySingleColumnResults(String sql, String[] args, int column, GeoPackageDataType dataType, Integer limit)
sql - sql statementargs - argumentscolumn - column indexdataType - GeoPackage data typelimit - result row limitpublic <T> List<T> querySingleColumnTypedResults(String sql, String[] args, int column, GeoPackageDataType dataType, Integer limit)
T - result value typesql - sql statementargs - argumentscolumn - column indexdataType - GeoPackage data typelimit - result row limitpublic List<List<Object>> queryResults(String sql, String[] args)
sql - sql statementargs - argumentspublic <T> List<List<T>> queryTypedResults(String sql, String[] args)
T - result value typesql - sql statementargs - argumentspublic List<List<Object>> queryResults(String sql, String[] args, GeoPackageDataType[] dataTypes)
sql - sql statementargs - argumentsdataTypes - column data typespublic <T> List<List<T>> queryTypedResults(String sql, String[] args, GeoPackageDataType[] dataTypes)
T - result value typesql - sql statementargs - argumentsdataTypes - column data typespublic List<Object> querySingleRowResults(String sql, String[] args)
sql - sql statementargs - argumentspublic <T> List<T> querySingleRowTypedResults(String sql, String[] args)
T - result value typesql - sql statementargs - argumentspublic List<Object> querySingleRowResults(String sql, String[] args, GeoPackageDataType[] dataTypes)
sql - sql statementargs - argumentsdataTypes - column data typespublic <T> List<T> querySingleRowTypedResults(String sql, String[] args, GeoPackageDataType[] dataTypes)
T - result value typesql - sql statementargs - argumentsdataTypes - column data typespublic List<List<Object>> queryResults(String sql, String[] args, Integer limit)
sql - sql statementargs - argumentslimit - result row limitpublic <T> List<List<T>> queryTypedResults(String sql, String[] args, Integer limit)
T - result value typesql - sql statementargs - argumentslimit - result row limitpublic List<List<Object>> queryResults(String sql, String[] args, GeoPackageDataType[] dataTypes, Integer limit)
sql - sql statementargs - argumentsdataTypes - column data typeslimit - result row limitpublic <T> List<List<T>> queryTypedResults(String sql, String[] args, GeoPackageDataType[] dataTypes, Integer limit)
T - result value typesql - sql statementargs - argumentsdataTypes - column data typeslimit - result row limitpublic int getZoomLevel()
public String[] buildColumnsAsNull(List<TColumn> columns)
columns - columns to include as nullpublic String[] buildColumnsAs(List<TColumn> columns, String value)
columns - columns to include as valuevalue - "columns as" value for specified columnspublic String[] buildColumnsAsNull(String[] columns)
columns - columns to include as nullpublic String[] buildColumnsAs(String[] columns, String value)
columns - columns to include as valuevalue - "columns as" value for specified columnspublic String[] buildColumnsAs(List<TColumn> columns, String[] values)
columns - columns to include as valuevalues - "columns as" values for specified columnspublic String[] buildColumnsAs(String[] columns, String[] values)
columns - columns to include as valuevalues - "columns as" values for specified columnspublic String[] buildColumnsAs(Map<String,String> columns)
columns - mapping between columns and valuespublic void addColumn(TColumn column)
column - new columnpublic void renameColumn(TColumn column, String newColumnName)
column - columnnewColumnName - new column namepublic void renameColumn(String columnName, String newColumnName)
columnName - column namenewColumnName - new column namepublic void renameColumn(int index,
String newColumnName)
index - column indexnewColumnName - new column nameprotected void renameTableColumn(String columnName, String newColumnName)
columnName - column namenewColumnName - new column namepublic void dropColumn(TColumn column)
column - columnpublic void dropColumn(int index)
index - column indexpublic void dropColumn(String columnName)
columnName - column namepublic void dropColumns(Collection<TColumn> columns)
columns - columnspublic void dropColumnIndexes(Collection<Integer> indexes)
indexes - column indexespublic void dropColumnNames(Collection<String> columnNames)
columnNames - column namespublic void alterColumn(TColumn column)
column - columnpublic void alterColumns(Collection<TColumn> columns)
columns - columnsCopyright © 2020 National Geospatial-Intelligence Agency. All rights reserved.