Package mil.nga.geopackage.user
Class UserConnection<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.UserCoreConnection<TColumn,TTable,TRow,TResult>
-
- mil.nga.geopackage.user.UserConnection<TColumn,TTable,TRow,TResult>
-
- Type Parameters:
TColumn
- column typeTTable
- table typeTRow
- row typeTResult
- result type
- Direct Known Subclasses:
AttributesConnection
,FeatureConnection
,TileConnection
,UserCustomConnection
public abstract class UserConnection<TColumn extends UserColumn,TTable extends UserTable<TColumn>,TRow extends UserRow<TColumn,TTable>,TResult extends UserResultSet<TColumn,TTable,TRow>> extends UserCoreConnection<TColumn,TTable,TRow,TResult>
GeoPackage Connection used to define common functionality within different connection types- Author:
- osbornb
-
-
Field Summary
Fields Modifier and Type Field Description protected Connection
connection
Connectionprotected TTable
table
Table
-
Constructor Summary
Constructors Modifier Constructor Description protected
UserConnection(GeoPackageConnection database)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TResult
createResult(String[] columns, ResultSet resultSet, String sql, String[] selectionArgs)
Create a result by wrapping the ResultSetprotected TResult
createResult(ResultSet resultSet, String sql, String[] selectionArgs)
Create a result by wrapping the ResultSetTTable
getTable()
Get the tableTResult
query(boolean distinct, String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy)
TResult
query(boolean distinct, String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
TResult
query(boolean distinct, String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy)
TResult
query(boolean distinct, String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
TResult
query(String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy)
TResult
query(String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
TResult
query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy)
TResult
query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
String
querySQL(boolean distinct, String table, String[] columns, String[] columnsAs, String selection, String groupBy, String having, String orderBy)
String
querySQL(boolean distinct, String table, String[] columns, String[] columnsAs, String selection, String groupBy, String having, String orderBy, String limit)
String
querySQL(boolean distinct, String table, String[] columns, String selection, String groupBy, String having, String orderBy)
String
querySQL(boolean distinct, String table, String[] columns, String selection, String groupBy, String having, String orderBy, String limit)
String
querySQL(String table, String[] columns, String[] columnsAs, String selection, String groupBy, String having, String orderBy)
String
querySQL(String table, String[] columns, String[] columnsAs, String selection, String groupBy, String having, String orderBy, String limit)
String
querySQL(String table, String[] columns, String selection, String groupBy, String having, String orderBy)
String
querySQL(String table, String[] columns, String selection, String groupBy, String having, String orderBy, String limit)
TResult
rawQuery(String sql, String[] selectionArgs)
TResult
rawQuery(String sql, String[] columns, String[] selectionArgs)
void
setTable(TTable table)
Set the table
-
-
-
Field Detail
-
connection
protected final Connection connection
Connection
-
-
Constructor Detail
-
UserConnection
protected UserConnection(GeoPackageConnection database)
Constructor- Parameters:
database
- GeoPackage connection
-
-
Method Detail
-
getTable
public TTable getTable()
Get the table- Returns:
- table
-
setTable
public void setTable(TTable table)
Set the table- Parameters:
table
- table
-
createResult
protected TResult createResult(ResultSet resultSet, String sql, String[] selectionArgs)
Create a result by wrapping the ResultSet- Parameters:
resultSet
- result setsql
- SQL statementselectionArgs
- selection arguments- Returns:
- result
- Since:
- 4.0.0
-
createResult
protected abstract TResult createResult(String[] columns, ResultSet resultSet, String sql, String[] selectionArgs)
Create a result by wrapping the ResultSet- Parameters:
columns
- columnsresultSet
- result setsql
- SQL statementselectionArgs
- selection arguments- Returns:
- result
- Since:
- 4.0.0
-
query
public TResult query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy)
-
query
public TResult query(boolean distinct, String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy)
-
query
public TResult query(String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy)
-
query
public TResult query(boolean distinct, String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy)
-
query
public TResult query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
-
query
public TResult query(boolean distinct, String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
-
query
public TResult query(String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
-
query
public TResult query(boolean distinct, String table, String[] columns, String[] columnsAs, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
-
querySQL
public String querySQL(String table, String[] columns, String selection, String groupBy, String having, String orderBy)
-
querySQL
public String querySQL(boolean distinct, String table, String[] columns, String selection, String groupBy, String having, String orderBy)
-
querySQL
public String querySQL(String table, String[] columns, String[] columnsAs, String selection, String groupBy, String having, String orderBy)
-
querySQL
public String querySQL(boolean distinct, String table, String[] columns, String[] columnsAs, String selection, String groupBy, String having, String orderBy)
-
querySQL
public String querySQL(String table, String[] columns, String selection, String groupBy, String having, String orderBy, String limit)
-
querySQL
public String querySQL(boolean distinct, String table, String[] columns, String selection, String groupBy, String having, String orderBy, String limit)
-
querySQL
public String querySQL(String table, String[] columns, String[] columnsAs, String selection, String groupBy, String having, String orderBy, String limit)
-
-