java.lang.Object | ||
↳ | android.os.Handler | |
↳ | android.content.AsyncQueryHandler |
A helper class to help make handling asynchronous ContentResolver
queries easier.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AsyncQueryHandler.WorkerArgs | |||||||||||
AsyncQueryHandler.WorkerHandler |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Attempts to cancel operation that has not already started.
| |||||||||||
Subclasses must implement this to receive messages.
| |||||||||||
This method begins an asynchronous delete.
| |||||||||||
This method begins an asynchronous insert.
| |||||||||||
This method begins an asynchronous query.
| |||||||||||
This method begins an asynchronous update.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called when an asynchronous delete is completed.
| |||||||||||
Called when an asynchronous insert is completed.
| |||||||||||
Called when an asynchronous query is completed.
| |||||||||||
Called when an asynchronous update is completed.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.os.Handler
| |||||||||||
From class
java.lang.Object
|
Attempts to cancel operation that has not already started. Note that there is no guarantee that the operation will be canceled. They still may result in a call to on[Query/Insert/Update/Delete]Complete after this call has completed.
token | The token representing the operation to be canceled. If multiple operations have the same token they will all be canceled. |
---|
Subclasses must implement this to receive messages.
This method begins an asynchronous delete. When the delete operation is
done onDeleteComplete(int, Object, int)
is called.
token | A token passed into onDeleteComplete(int, Object, int) to identify
the delete operation. |
---|---|
cookie | An object that gets passed into onDeleteComplete(int, Object, int) |
uri | the Uri passed to the delete operation. |
selection | the where clause. |
This method begins an asynchronous insert. When the insert operation is
done onInsertComplete(int, Object, Uri)
is called.
token | A token passed into onInsertComplete(int, Object, Uri) to identify
the insert operation. |
---|---|
cookie | An object that gets passed into onInsertComplete(int, Object, Uri) |
uri | the Uri passed to the insert operation. |
initialValues | the ContentValues parameter passed to the insert operation. |
This method begins an asynchronous query. When the query is done
onQueryComplete(int, Object, Cursor)
is called.
token | A token passed into onQueryComplete(int, Object, Cursor) to identify
the query. |
---|---|
cookie | An object that gets passed into onQueryComplete(int, Object, Cursor) |
uri | The URI, using the content:// scheme, for the content to retrieve. |
projection | A list of which columns to return. Passing null will return all columns, which is discouraged to prevent reading data from storage that isn't going to be used. |
selection | A filter declaring which rows to return, formatted as an SQL WHERE clause (excluding the WHERE itself). Passing null will return all rows for the given URI. |
selectionArgs | You may include ?s in selection, which will be replaced by the values from selectionArgs, in the order that they appear in the selection. The values will be bound as Strings. |
orderBy | How to order the rows, formatted as an SQL ORDER BY clause (excluding the ORDER BY itself). Passing null will use the default sort order, which may be unordered. |
This method begins an asynchronous update. When the update operation is
done onUpdateComplete(int, Object, int)
is called.
token | A token passed into onUpdateComplete(int, Object, int) to identify
the update operation. |
---|---|
cookie | An object that gets passed into onUpdateComplete(int, Object, int) |
uri | the Uri passed to the update operation. |
values | the ContentValues parameter passed to the update operation. |
Called when an asynchronous delete is completed.
token | the token to identify the query, passed in from
startDelete(int, Object, Uri, String, String[]) . |
---|---|
cookie | the cookie object that's passed in from
startDelete(int, Object, Uri, String, String[]) . |
result | the result returned from the delete operation |
Called when an asynchronous insert is completed.
token | the token to identify the query, passed in from
startInsert(int, Object, Uri, ContentValues) . |
---|---|
cookie | the cookie object that's passed in from
startInsert(int, Object, Uri, ContentValues) . |
uri | the uri returned from the insert operation. |
Called when an asynchronous query is completed.
token | the token to identify the query, passed in from
startQuery(int, Object, Uri, String[], String, String[], String) . |
---|---|
cookie | the cookie object passed in from startQuery(int, Object, Uri, String[], String, String[], String) . |
cursor | The cursor holding the results from the query. |
Called when an asynchronous update is completed.
token | the token to identify the query, passed in from
startUpdate(int, Object, Uri, ContentValues, String, String[]) . |
---|---|
cookie | the cookie object that's passed in from
startUpdate(int, Object, Uri, ContentValues, String, String[]) . |
result | the result returned from the update operation |