Sdílet prostřednictvím


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")]
public interface ICursor : IDisposable, Java.Interop.IJavaPeerable, Java.IO.ICloseable
[<Android.Runtime.Register("android/database/Cursor", "", "Android.Database.ICursorInvoker")>]
type ICursor = interface
    interface ICloseable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

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

Cursor implementations are not required to be synchronized so code using a Cursor from multiple threads should perform its own synchronization when using the Cursor.

Implementations should subclass AbstractCursor.

Java documentation for android.database.Cursor.

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

Return total number of columns

Count

Returns the numbers of rows in the cursor.

Extras

Returns a bundle of extra values.

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
IsAfterLast

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

IsBeforeFirst

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

IsClosed

return true if the cursor is closed

IsFirst

Returns whether the cursor is pointing to the first row.

IsLast

Returns whether the cursor is pointing to the last row.

JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
NotificationUri

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

PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)
Position

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

WantsAllOnMoveCalls

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

Methods

Close()

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

CopyStringToBuffer(Int32, CharArrayBuffer)

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

Deactivate()
Obsolete.

Deactivates the Cursor, making all calls on it fail until #requery is called.

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
GetBlob(Int32)

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

GetColumnIndex(String)

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

GetColumnIndexOrThrow(String)

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

GetColumnName(Int32)

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

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)

Returns the value of the requested column as a double.

GetFloat(Int32)

Returns the value of the requested column as a float.

GetInt(Int32)

Returns the value of the requested column as an int.

GetLong(Int32)

Returns the value of the requested column as a long.

GetShort(Int32)

Returns the value of the requested column as a short.

GetString(Int32)

Returns the value of the requested column as a String.

GetType(Int32)

Returns data type of the given column's value.

IsNull(Int32)

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

Move(Int32)

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

MoveToFirst()

Move the cursor to the first row.

MoveToLast()

Move the cursor to the last row.

MoveToNext()

Move the cursor to the next row.

MoveToPosition(Int32)

Move the cursor to an absolute position.

MoveToPrevious()

Move the cursor to the previous row.

RegisterContentObserver(ContentObserver)

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

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()
Obsolete.

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

Respond(Bundle)

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

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetNotificationUri(ContentResolver, Uri)

Register to watch a content URI for changes.

SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterContentObserver(ContentObserver)

Unregister an observer that has previously been registered with this cursor via #registerContentObserver.

UnregisterDataSetObserver(DataSetObserver)

Unregister an observer that has previously been registered with this cursor via #registerContentObserver.

UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to