Package mil.nga.geopackage.user
Class UserCursor<TColumn extends UserColumn,TTable extends UserTable<TColumn>,TRow extends UserRow<TColumn,TTable>>   
java.lang.Object
android.database.CursorWrapper
mil.nga.geopackage.db.CursorResult
mil.nga.geopackage.user.UserCursor<TColumn,TTable,TRow>  
- Type Parameters:
- TColumn- column type
- TTable- table type
- TRow- row type
- All Implemented Interfaces:
- android.database.Cursor,- Closeable,- AutoCloseable,- Iterable<TRow>,- Result,- UserCoreResult<TColumn,- TTable, - TRow> 
- Direct Known Subclasses:
- AttributesCursor,- FeatureCursor,- TileCursor,- UserCustomCursor
public abstract class UserCursor<TColumn extends UserColumn,TTable extends UserTable<TColumn>,TRow extends UserRow<TColumn,TTable>>   
extends CursorResult
implements UserCoreResult<TColumn,TTable,TRow>  
Abstract User Cursor
- 
Field SummaryFields inherited from interface android.database.CursorFIELD_TYPE_BLOB, FIELD_TYPE_FLOAT, FIELD_TYPE_INTEGER, FIELD_TYPE_NULL, FIELD_TYPE_STRING
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedUserCursor(TTable table, android.database.Cursor cursor) ConstructorprotectedUserCursor(TTable table, String[] columns, android.database.Cursor cursor) ConstructorprotectedUserCursor(TTable table, UserColumns<TColumn> columns, android.database.Cursor cursor) Constructor
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()protected abstract UserInvalidCursor<TColumn, TTable, TRow, ? extends UserCursor<TColumn, TTable, TRow>, ? extends UserDao<TColumn, TTable, TRow, ? extends UserCursor<TColumn, TTable, TRow>>> createInvalidCursor(UserDao dao, UserCursor cursor, List<Integer> invalidPositions, List<TColumn> blobColumns) Create an invalid cursorprotected voidenableInvalidRequery(UserDao<TColumn, TTable, TRow, ? extends UserCursor<TColumn, TTable, TRow>> dao) Enable requery attempt of invalid rows after iterating through original query rows.intgetCount()longgetId()Get the invalid positions found when retrieving rowsgetQuery()Get the user querygetRow()String[]getSql()getTable()getValue(int index) getValue(int index, GeoPackageDataType dataType) booleanDetermine if invalid positions were found when retrieving rows or if all are invalid (null)ids()booleanGet the cursor SQLite connection origination as bindings or standarditerator()booleanstatic voidreadBlobValue(UserDao dao, UserCoreResult result, UserRow row, UserColumn column) Read the blob column value in chunksvoidsetColumns(UserColumns<TColumn> columns) Set the columnsvoidSet the user queryvoidSet the tablevoidsetUseBindings(boolean useBindings) Set the cursor SQLite connection origination as bindings or standardMethods inherited from class mil.nga.geopackage.db.CursorResultwasNullMethods inherited from class android.database.CursorWrappercopyStringToBuffer, deactivate, getBlob, getColumnCount, getColumnIndex, getColumnIndexOrThrow, getColumnName, getColumnNames, getDouble, getExtras, getFloat, getInt, getLong, getNotificationUri, getNotificationUris, getPosition, getShort, getString, getType, getWantsAllOnMoveCalls, getWrappedCursor, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isNull, move, moveToFirst, moveToLast, moveToPosition, moveToPrevious, registerContentObserver, registerDataSetObserver, requery, respond, setExtras, setNotificationUri, setNotificationUris, unregisterContentObserver, unregisterDataSetObserverMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface mil.nga.geopackage.db.ResultgetBlob, getColumnCount, getColumnIndex, getDouble, getFloat, getInt, getLong, getPosition, getShort, getString, getType, moveToFirst, moveToPosition, wasNullMethods inherited from interface mil.nga.geopackage.user.UserCoreResultgetRow
- 
Constructor Details- 
UserCursorConstructor- Parameters:
- table- table
- cursor- cursor
 
- 
UserCursorConstructor- Parameters:
- table- table
- columns- columns
- cursor- cursor
- Since:
- 3.5.0
 
- 
UserCursorConstructor- Parameters:
- table- table
- columns- columns
- cursor- cursor
- Since:
- 3.5.0
 
 
- 
- 
Method Details- 
getValue
- 
getValue- Specified by:
- getValuein interface- Result
- Specified by:
- getValuein interface- UserCoreResult<TColumn extends UserColumn,- TTable extends UserTable<TColumn>, - TRow extends UserRow<TColumn, - TTable>> 
- Overrides:
- getValuein class- CursorResult
 
- 
getValue
- 
getIdpublic long getId()
- 
setTableSet the table- Parameters:
- table- table
- Since:
- 3.2.0
 
- 
getTable
- 
getTableName- Specified by:
- getTableNamein interface- UserCoreResult<TColumn extends UserColumn,- TTable extends UserTable<TColumn>, - TRow extends UserRow<TColumn, - TTable>> 
 
- 
setColumnsSet the columns- Parameters:
- columns- columns
- Since:
- 3.5.0
 
- 
getColumns- Specified by:
- getColumnsin interface- UserCoreResult<TColumn extends UserColumn,- TTable extends UserTable<TColumn>, - TRow extends UserRow<TColumn, - TTable>> 
 
- 
getInvalidPositionsGet the invalid positions found when retrieving rows- Returns:
- invalid positions, empty if none, null if all invalid
- Since:
- 2.0.0
 
- 
hasInvalidPositionspublic boolean hasInvalidPositions()Determine if invalid positions were found when retrieving rows or if all are invalid (null)- Returns:
- true if invalid positions
- Since:
- 2.0.0
 
- 
getCountpublic int getCount()
- 
moveToNextpublic boolean moveToNext()- Specified by:
- moveToNextin interface- android.database.Cursor
- Specified by:
- moveToNextin interface- Result
- Overrides:
- moveToNextin class- android.database.CursorWrapper
 
- 
getRow
- 
getValue- Specified by:
- getValuein interface- Result
- Overrides:
- getValuein class- CursorResult
 
- 
closepublic void close()
- 
setQuerySet the user query- Parameters:
- query- user query
- Since:
- 2.0.0
 
- 
getQueryGet the user query- Returns:
- user query
- Since:
- 2.0.0
 
- 
setUseBindingspublic void setUseBindings(boolean useBindings) Set the cursor SQLite connection origination as bindings or standard- Parameters:
- useBindings- true if bindings connection, false if standard
- Since:
- 6.2.1
 
- 
isUseBindingspublic boolean isUseBindings()Get the cursor SQLite connection origination as bindings or standard- Returns:
- true if bindings connection, false if standard
- Since:
- 6.2.1
 
- 
enableInvalidRequeryprotected void enableInvalidRequery(UserDao<TColumn, TTable, TRow, ? extends UserCursor<TColumn, TTable, TRow>> dao) Enable requery attempt of invalid rows after iterating through original query rows. Only supported formoveToNext()andgetRow()usage.- Parameters:
- dao- data access object used to perform requery
- Since:
- 2.0.0
 
- 
createInvalidCursorprotected abstract UserInvalidCursor<TColumn,TTable, createInvalidCursorTRow, ? extends UserCursor<TColumn, TTable, TRow>, ? extends UserDao<TColumn, TTable, TRow, ? extends UserCursor<TColumn, TTable, TRow>>> (UserDao dao, UserCursor cursor, List<Integer> invalidPositions, List<TColumn> blobColumns) Create an invalid cursor- Parameters:
- dao- data access object
- cursor- user cursor
- invalidPositions- invalid positions
- blobColumns- blob columns
- Returns:
- invalid cursor
 
- 
readBlobValuepublic static void readBlobValue(UserDao dao, UserCoreResult result, UserRow row, UserColumn column) Read the blob column value in chunks- Parameters:
- dao- user dao
- result- user core result
- row- user row
- column- user blob column
 
- 
iterator- Specified by:
- iteratorin interface- Iterable<TColumn extends UserColumn>
 
- 
getSql
- 
getSelectionArgs- Specified by:
- getSelectionArgsin interface- UserCoreResult<TColumn extends UserColumn,- TTable extends UserTable<TColumn>, - TRow extends UserRow<TColumn, - TTable>> 
 
- 
ids
 
-