TColumn - TTable - TRow - TResult - public 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 mil.nga.sf.proj.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 |
|---|---|
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 |
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
|
int |
count()
Get the total count
|
int |
count(String where,
String[] args)
Get the count
|
long |
create(TRow row)
Creates a new row, same as calling
insert(UserCoreRow) |
int |
delete(String whereClause,
String[] whereArgs)
Delete rows matching the where clause
|
int |
delete(TRow row)
Delete the row
|
int |
deleteById(long id)
Delete a row by id
|
void |
dropTable()
Drop the user table
|
abstract BoundingBox |
getBoundingBox()
Get the bounding box of the user table data
|
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
|
mil.nga.sf.proj.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
|
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
|
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 |
queryForAll()
Query for all rows
|
TResult |
queryForAll(String[] columnsAs)
Query for all rows with "columns as" values for corresponding column
indices.
|
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 |
queryForId(long id)
Query for the row with the provided id
|
TRow |
queryForIdRow(long id)
Query for the row with the provided id
|
TResult |
queryForValueFieldValues(Map<String,ColumnValue> fieldValues)
Query for the row where all fields match their values
|
abstract int |
update(TRow row)
Update the row
|
protected UserCoreDao(String database, GeoPackageCoreConnection db, UserCoreConnection<TColumn,TTable,TRow,TResult> userDb, TTable table)
database - db - userDb - table - public abstract TRow newRow()
public abstract BoundingBox getBoundingBox()
protected 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 mil.nga.sf.proj.Projection getProjection()
public void dropTable()
public TResult queryForAll()
public TResult queryForAll(String[] columnsAs)
columnsAs - columns as valuespublic TResult queryForEq(String fieldName, Object value)
fieldName - value - public TResult queryForEq(String fieldName, Object value, String groupBy, String having, String orderBy)
fieldName - value - groupBy - having - orderBy - public TResult queryForEq(String fieldName, ColumnValue value)
fieldName - value - public TResult queryForFieldValues(Map<String,Object> fieldValues)
fieldValues - public TResult queryForValueFieldValues(Map<String,ColumnValue> fieldValues)
fieldValues - public TResult queryForId(long id)
id - public TRow queryForIdRow(long id)
id - public TResult query(String where, String[] whereArgs)
where - whereArgs - public TResult query(String where, String[] whereArgs, String groupBy, String having, String orderBy)
where - whereArgs - groupBy - having - orderBy - public TResult query(String where, String[] whereArgs, String groupBy, String having, String orderBy, String limit)
where - whereArgs - groupBy - having - orderBy - limit - public abstract int update(TRow row)
row - public int delete(TRow row)
row - public int deleteById(long id)
id - public int delete(String whereClause, String[] whereArgs)
whereClause - whereArgs - public long create(TRow row)
insert(UserCoreRow)row - public abstract long insert(TRow row)
row - protected String getPkWhere(long id)
id - protected String[] getPkWhereArgs(long id)
public String buildWhere(Set<Map.Entry<String,Object>> fields)
fields - public String buildValueWhere(Set<Map.Entry<String,ColumnValue>> fields)
fields - public String buildWhere(String field, Object value)
field - value - public String buildWhere(String field, Object value, String operation)
field - value - operation - public String buildWhere(String field, ColumnValue value)
field - value - public String[] buildWhereArgs(Collection<Object> values)
values - public String[] buildWhereArgs(Object[] values)
values - public String[] buildValueWhereArgs(Collection<ColumnValue> values)
values - public String[] buildWhereArgs(Object value)
value - public String[] buildWhereArgs(ColumnValue value)
value - public int count()
public int count(String where, String[] args)
where - args - public Integer min(String column, String where, String[] args)
column - where - args - public Integer max(String column, String where, String[] args)
column - where - args - public 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 columnsCopyright © 2018 National Geospatial-Intelligence Agency. All rights reserved.