added in version 27.1.0
belongs to Maven artifact com.android.support:support-content:28.0.0-alpha1
belongs to Maven artifact com.android.support:support-content:28.0.0-alpha1
ContentPager.QueryRunner
public
static
interface
ContentPager.QueryRunner
android.support.content.ContentPager.QueryRunner |
![]() |
Implementations of this interface provide the mechanism for execution of queries off the UI thread.
Summary
Nested classes | |
---|---|
interface |
ContentPager.QueryRunner.Callback
Callback that receives a cursor once a query as been executed on the Runner. |
Public methods | |
---|---|
abstract
void
|
cancel(Query query)
Attempt to cancel a (presumably) running query. |
abstract
boolean
|
isRunning(Query query)
|
abstract
void
|
query(Query query, ContentPager.QueryRunner.Callback callback)
Execute a query. |
Public methods
cancel
added in version 27.1.0
void cancel (Query query)
Attempt to cancel a (presumably) running query.
Parameters | |
---|---|
query |
Query : The query in question.
|
isRunning
added in version 27.1.0
boolean isRunning (Query query)
Parameters | |
---|---|
query |
Query : The query in question. |
Returns | |
---|---|
boolean |
true if the query is already running. |
query
added in version 27.1.0
void query (Query query, ContentPager.QueryRunner.Callback callback)
Execute a query.
Parameters | |
---|---|
query |
Query : The query that will be run. This value should be handed
back to the callback when ready to run in the background. |
callback |
ContentPager.QueryRunner.Callback : The callback that should be called to both execute
the query (in the background) and to receive the results
(in the foreground).
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ContentPager.QueryRunner\n\nadded in [version 27.1.0](/topic/libraries/support-library/revisions) \nbelongs to Maven artifact com.android.support:support-content:28.0.0-alpha1 \nSummary: [Nested Classes](#nestedclasses) \\| [Methods](#pubmethods) \\| [\\[Expand All\\]](#) \n\nContentPager.QueryRunner\n========================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\nstatic\n\n\ninterface\nContentPager.QueryRunner\n`\n\n\n`\n\n\n`\n\n|--------------------------------------------------|\n| android.support.content.ContentPager.QueryRunner |\n\n|---|---|\n| Known Indirect Subclasses [LoaderQueryRunner](/reference/android/support/content/LoaderQueryRunner) |---------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [LoaderQueryRunner](/reference/android/support/content/LoaderQueryRunner) | A [ContentPager.QueryRunner](/reference/android/support/content/ContentPager.QueryRunner) that executes queries using a [LoaderManager](https://developer.android.com/reference/android/app/LoaderManager.html). | ||\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nImplementations of this interface provide the mechanism\nfor execution of queries off the UI thread.\n\nSummary\n-------\n\n| ### Nested classes ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` interface` | [ContentPager.QueryRunner.Callback](/reference/android/support/content/ContentPager.QueryRunner.Callback) Callback that receives a cursor once a query as been executed on the Runner. |\n\n| ### Public methods ||\n|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[cancel](/reference/android/support/content/ContentPager.QueryRunner#cancel(android.support.content.Query))`(`[Query](/reference/android/support/content/Query)` query) ` Attempt to cancel a (presumably) running query. |\n| ` abstract boolean` | ` `[isRunning](/reference/android/support/content/ContentPager.QueryRunner#isRunning(android.support.content.Query))`(`[Query](/reference/android/support/content/Query)` query) ` |\n| ` abstract void` | ` `[query](/reference/android/support/content/ContentPager.QueryRunner#query(android.support.content.Query, android.support.content.ContentPager.QueryRunner.Callback))`(`[Query](/reference/android/support/content/Query)` query, `[ContentPager.QueryRunner.Callback](/reference/android/support/content/ContentPager.QueryRunner.Callback)` callback) ` Execute a query. |\n\nPublic methods\n--------------\n\n### cancel\n\nadded in [version 27.1.0](/topic/libraries/support-library/revisions) \n\n```\nvoid cancel (Query query)\n```\n\nAttempt to cancel a (presumably) running query.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|----------------------------------------|\n| `query` | `Query`: The query in question. \u003cbr /\u003e |\n\n### isRunning\n\nadded in [version 27.1.0](/topic/libraries/support-library/revisions) \n\n```\nboolean isRunning (Query query)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|----------------------------------------|\n| `query` | `Query`: The query in question. \u003cbr /\u003e |\n\n| Returns ||\n|-----------|----------------------------------------------|\n| `boolean` | true if the query is already running. \u003cbr /\u003e |\n\n### query\n\nadded in [version 27.1.0](/topic/libraries/support-library/revisions) \n\n```\nvoid query (Query query, \n ContentPager.QueryRunner.Callback callback)\n```\n\nExecute a query.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `query` | `Query`: The query that will be run. This value should be handed back to the callback when ready to run in the background. \u003cbr /\u003e |\n| `callback` | `ContentPager.QueryRunner.Callback`: The callback that should be called to both execute the query (in the background) and to receive the results (in the foreground). \u003cbr /\u003e |\n\n-\n\n Annotations\n -----------\n\n - [ContentPager.CursorDisposition](/reference/android/support/content/ContentPager.CursorDisposition)\n-\n\n Interfaces\n ----------\n\n - [ContentPager.ContentCallback](/reference/android/support/content/ContentPager.ContentCallback)\n - [ContentPager.QueryRunner](/reference/android/support/content/ContentPager.QueryRunner)\n - [ContentPager.QueryRunner.Callback](/reference/android/support/content/ContentPager.QueryRunner.Callback)\n-\n\n Classes\n -------\n\n - [ContentPager](/reference/android/support/content/ContentPager)\n - [LoaderQueryRunner](/reference/android/support/content/LoaderQueryRunner)\n - [Query](/reference/android/support/content/Query)\n - [R](/reference/android/support/content/R)\n - [R.attr](/reference/android/support/content/R.attr)\n - [R.bool](/reference/android/support/content/R.bool)\n - [R.color](/reference/android/support/content/R.color)\n - [R.dimen](/reference/android/support/content/R.dimen)\n - [R.drawable](/reference/android/support/content/R.drawable)\n - [R.id](/reference/android/support/content/R.id)\n - [R.integer](/reference/android/support/content/R.integer)\n - [R.layout](/reference/android/support/content/R.layout)\n - [R.string](/reference/android/support/content/R.string)\n - [R.style](/reference/android/support/content/R.style)\n - [R.styleable](/reference/android/support/content/R.styleable)"]]