Package 

Class SQLiteCursor

  • All Implemented Interfaces:
    android.database.Cursor , java.io.Closeable , java.lang.AutoCloseable

    
    public class SQLiteCursor
    extends AbstractWindowedCursor
                        

    A Cursor implementation that exposes results from a query on a SQLiteDatabase. SQLiteCursor is not internally synchronized so code using a SQLiteCursor from multiple threads should perform its own synchronization when using the SQLiteCursor.

    • Method Summary

      Modifier and Type Method Description
      SQLiteDatabase getDatabase() Get the database that this cursor is associated with.
      boolean onMove(int oldPosition, int newPosition) This function is called every time the cursor is successfully scrolledto a new position, giving the subclass a chance to update any state itmay have.
      int getCount()
      static int cursorPickFillWindowStartPosition(int cursorPosition, int cursorWindowCapacity)
      int getColumnIndex(String columnName)
      Array<String> getColumnNames()
      void deactivate()
      void close()
      boolean requery()
      void setWindow(CursorWindow window) Sets a new cursor window for the cursor to use.
      void setSelectionArguments(Array<String> selectionArgs) Changes the selection arguments.
      • Methods inherited from class io.requery.android.database.AbstractWindowedCursor

        copyStringToBuffer, getBlob, getDouble, getFloat, getInt, getLong, getShort, getString, getType, getWindow, hasWindow, isNull
      • Methods inherited from class io.requery.android.database.AbstractCursor

        getBlob, getColumnCount, getColumnIndexOrThrow, getColumnName, getDouble, getExtras, getFloat, getInt, getLong, getNotificationUri, getPosition, getShort, getString, getType, getWantsAllOnMoveCalls, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isNull, move, moveToFirst, moveToLast, moveToNext, moveToPosition, moveToPrevious, registerContentObserver, registerDataSetObserver, respond, setExtras, setNotificationUri, unregisterContentObserver, unregisterDataSetObserver
      • Methods inherited from class android.database.Cursor

        close, copyStringToBuffer, deactivate, getBlob, getColumnCount, getColumnIndex, getColumnIndexOrThrow, getColumnName, getColumnNames, getCount, getDouble, getExtras, getFloat, getInt, getLong, getNotificationUri, getNotificationUris, getPosition, getShort, getString, getType, getWantsAllOnMoveCalls, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isNull, move, moveToFirst, moveToLast, moveToNext, moveToPosition, moveToPrevious, registerContentObserver, registerDataSetObserver, requery, respond, setExtras, setNotificationUri, setNotificationUris, unregisterContentObserver, unregisterDataSetObserver
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • onMove

         boolean onMove(int oldPosition, int newPosition)

        This function is called every time the cursor is successfully scrolledto a new position, giving the subclass a chance to update any state itmay have. If it returns false the move function will also do so and thecursor will scroll to the beforeFirst position.

        This function should be called by methods such as moveToPosition,so it will typically not be called from outside of the cursor class itself.

        Parameters:
        oldPosition - The position that we're moving from.
        newPosition - The position that we're moving to.
      • setWindow

         void setWindow(CursorWindow window)

        Sets a new cursor window for the cursor to use.

        The cursor takes ownership of the provided cursor window; the cursor windowwill be closed when the cursor is closed or when the cursor adopts a newcursor window.

        If the cursor previously had a cursor window, then it is closed when thenew cursor window is assigned.

        Parameters:
        window - The new cursor window, typically a remote cursor window.
      • setSelectionArguments

         void setSelectionArguments(Array<String> selectionArgs)

        Changes the selection arguments. The new values take effect after a call to requery().