ICursor ICursor Interface

Definition

This interface provides random read-write access to the result set returned by a database query.

[Android.Runtime.Register("android/database/Cursor", "", "Android.Database.ICursorInvoker", ApiSince=1)]
public interface ICursor : IDisposable, Java.IO.ICloseable
type ICursor = interface
    interface ICloseable
    interface IJavaObject
    interface IDisposable
Derived
Attributes
Implements

Remarks

Android platform documentation

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Properties

ColumnCount ColumnCount

Return total number of columns

Count Count

Returns the numbers of rows in the cursor.

Extras Extras

Returns a bundle of extra values.

Handle Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
IsAfterLast IsAfterLast

Returns whether the cursor is pointing to the position after the last row.

IsBeforeFirst IsBeforeFirst

Returns whether the cursor is pointing to the position before the first row.

IsClosed IsClosed

return true if the cursor is closed

IsFirst IsFirst

Returns whether the cursor is pointing to the first row.

IsLast IsLast

Returns whether the cursor is pointing to the last row.

NotificationUri NotificationUri

Return the URI at which notifications of changes in this Cursor's data will be delivered, as previously set by SetNotificationUri(ContentResolver, Uri).

Position Position

Returns the current position of the cursor in the row set.

WantsAllOnMoveCalls WantsAllOnMoveCalls

onMove() will only be called across processes if this method returns true.

Methods

Close() Close()

Closes the Cursor, releasing all of its resources and making it completely invalid.

CopyStringToBuffer(Int32, CharArrayBuffer) CopyStringToBuffer(Int32, CharArrayBuffer)

Retrieves the requested column text and stores it in the buffer provided.

Deactivate() Deactivate()

Deactivates the Cursor, making all calls on it fail until Requery() is called.

GetBlob(Int32) GetBlob(Int32)

Returns the value of the requested column as a byte array.

GetColumnIndex(String) GetColumnIndex(String)

Returns the zero-based index for the given column name, or -1 if the column doesn't exist.

GetColumnIndexOrThrow(String) GetColumnIndexOrThrow(String)

Returns the zero-based index for the given column name, or throws IllegalArgumentException if the column doesn't exist.

GetColumnName(Int32) GetColumnName(Int32)

Returns the column name at the given zero-based column index.

GetColumnNames() GetColumnNames()

Returns a string array holding the names of all of the columns in the result set in the order in which they were listed in the result.

GetDouble(Int32) GetDouble(Int32)

Returns the value of the requested column as a double.

GetFloat(Int32) GetFloat(Int32)

Returns the value of the requested column as a float.

GetInt(Int32) GetInt(Int32)

Returns the value of the requested column as an int.

GetLong(Int32) GetLong(Int32)

Returns the value of the requested column as a long.

GetShort(Int32) GetShort(Int32)

Returns the value of the requested column as a short.

GetString(Int32) GetString(Int32)

Returns the value of the requested column as a String.

GetType(Int32) GetType(Int32)

Returns data type of the given column's value.

IsNull(Int32) IsNull(Int32)

Returns true if the value in the indicated column is null.

Move(Int32) Move(Int32)

Move the cursor by a relative amount, forward or backward, from the current position.

MoveToFirst() MoveToFirst()

Move the cursor to the first row.

MoveToLast() MoveToLast()

Move the cursor to the last row.

MoveToNext() MoveToNext()

Move the cursor to the next row.

MoveToPosition(Int32) MoveToPosition(Int32)

Move the cursor to an absolute position.

MoveToPrevious() MoveToPrevious()

Move the cursor to the previous row.

RegisterContentObserver(ContentObserver) RegisterContentObserver(ContentObserver)

Register an observer that is called when changes happen to the content backing this cursor.

RegisterDataSetObserver(DataSetObserver) RegisterDataSetObserver(DataSetObserver)

Register an observer that is called when changes happen to the contents of the this cursors data set, for example, when the data set is changed via Requery(), Deactivate(), or Close().

Requery() Requery()

Performs the query that created the cursor again, refreshing its contents.

Respond(Bundle) Respond(Bundle)

This is an out-of-band way for the the user of a cursor to communicate with the cursor.

SetNotificationUri(ContentResolver, Uri) SetNotificationUri(ContentResolver, Uri)

Register to watch a content URI for changes.

UnregisterContentObserver(ContentObserver) UnregisterContentObserver(ContentObserver)

Unregister an observer that has previously been registered with this cursor via RegisterContentObserver(ContentObserver).

UnregisterDataSetObserver(DataSetObserver) UnregisterDataSetObserver(DataSetObserver)

Unregister an observer that has previously been registered with this cursor via RegisterContentObserver(ContentObserver).

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Applies to