public interface
Cursor
implements CloseableClass Overview
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.| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Closes the Cursor, releasing all of its resources and making it completely invalid.
| |||||||||||
Retrieves the requested column text and stores it in the buffer provided.
| |||||||||||
This method was deprecated in API level 16. Since
requery() is deprecated, so too is this. | |||||||||||
Returns the value of the requested column as a byte array.
| |||||||||||
Return total number of columns
| |||||||||||
Returns the zero-based index for the given column name, or -1 if the column doesn't exist.
| |||||||||||
Returns the zero-based index for the given column name, or throws
IllegalArgumentException if the column doesn't exist. | |||||||||||
Returns the column name at the given zero-based column index.
| |||||||||||
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.
| |||||||||||
Returns the numbers of rows in the cursor.
| |||||||||||
Returns the value of the requested column as a double.
| |||||||||||
Returns a bundle of extra values.
| |||||||||||
Returns the value of the requested column as a float.
| |||||||||||
Returns the value of the requested column as an int.
| |||||||||||
Returns the value of the requested column as a long.
| |||||||||||
Return the URI at which notifications of changes in this Cursor's data will be delivered, as previously set by
setNotificationUri(ContentResolver, Uri). | |||||||||||
Returns the current position of the cursor in the row set.
| |||||||||||
Returns the value of the requested column as a short.
| |||||||||||
Returns the value of the requested column as a String.
| |||||||||||
Returns data type of the given column's value.
| |||||||||||
onMove() will only be called across processes if this method returns true.
| |||||||||||
Returns whether the cursor is pointing to the position after the last row.
| |||||||||||
Returns whether the cursor is pointing to the position before the first row.
| |||||||||||
return true if the cursor is closed
| |||||||||||
Returns whether the cursor is pointing to the first row.
| |||||||||||
Returns whether the cursor is pointing to the last row.
| |||||||||||
Returns
true if the value in the indicated column is null. | |||||||||||
Move the cursor by a relative amount, forward or backward, from the current position.
| |||||||||||
Move the cursor to the first row.
| |||||||||||
Move the cursor to the last row.
| |||||||||||
Move the cursor to the next row.
| |||||||||||
Move the cursor to an absolute position.
| |||||||||||
Move the cursor to the previous row.
| |||||||||||
Register an observer that is called when changes happen to the content backing this cursor.
| |||||||||||
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(). | |||||||||||
This method was deprecated in API level 11. Don't use this. Just request a new cursor, so you can do this asynchronously and update your list view once the new cursor comes back.
| |||||||||||
This is an out-of-band way for the the user of a cursor to communicate with the cursor.
| |||||||||||
Register to watch a content URI for changes.
| |||||||||||
Unregister an observer that has previously been registered with this cursor via
registerContentObserver(ContentObserver). | |||||||||||
Unregister an observer that has previously been registered with this cursor via
registerContentObserver(ContentObserver). | |||||||||||
沒有留言:
張貼留言