Package mil.nga.geopackage.db
Class GeoPackageCursorFactory
java.lang.Object
mil.nga.geopackage.db.GeoPackageCursorFactory
- All Implemented Interfaces:
SQLiteDatabase.CursorFactory
GeoPackage Cursor Factory. Used when connecting to a GeoPackage database.
Registers cursor wrappers for GeoPackage data tables to wrap the cursors
returned from queries.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.sqlite.database.sqlite.SQLiteDatabase.CursorFactory
Get the SQLite Android Bindings cursor factoryboolean
Is debug log queries enablednewCursor
(SQLiteDatabase db, SQLiteCursorDriver driver, String editTable, SQLiteQuery query) void
registerTable
(String tableName, GeoPackageCursorWrapper cursorWrapper) Register a cursor wrapper for the provided table name.void
setDebugLogQueries
(boolean debugLogQueries) Set the debug log queries flagwrapCursor
(Cursor cursor, String editTable) Wrap the cursor
-
Constructor Details
-
GeoPackageCursorFactory
public GeoPackageCursorFactory()Constructor
-
-
Method Details
-
isDebugLogQueries
public boolean isDebugLogQueries()Is debug log queries enabled- Returns:
- true if queries are logged at the debug level
- Since:
- 3.4.0
-
setDebugLogQueries
public void setDebugLogQueries(boolean debugLogQueries) Set the debug log queries flag- Parameters:
debugLogQueries
- true to debug log queries- Since:
- 3.4.0
-
registerTable
Register a cursor wrapper for the provided table name. Database queries will wrap the returned cursor- Parameters:
tableName
- table namecursorWrapper
- cursor wrapper
-
newCursor
public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver driver, String editTable, SQLiteQuery query) - Specified by:
newCursor
in interfaceSQLiteDatabase.CursorFactory
-
wrapCursor
Wrap the cursor- Parameters:
cursor
- cursoreditTable
- edit table- Returns:
- cursor
- Since:
- 3.4.0
-
getBindingsCursorFactory
public org.sqlite.database.sqlite.SQLiteDatabase.CursorFactory getBindingsCursorFactory()Get the SQLite Android Bindings cursor factory- Returns:
- bindings cursor factory
- Since:
- 3.4.0
-