# Query

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-content:28.0.0-alpha1  
Summary:[Methods](https://developer.android.com/reference/android/support/content/Query#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/content/Query#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/content/Query#)  

# Query

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
Query
`  
`

extends Object


``


`

|---|-------------------------------|
| java.lang.Object                 ||
| ↳ | android.support.content.Query |

<br />

*** ** * ** ***

Encapsulates information related to calling[query(Uri, String[], Bundle, CancellationSignal)](https://developer.android.com/reference/android/content/ContentResolver.html#query(android.net.Uri, java.lang.String[], android.os.Bundle, android.os.CancellationSignal)), including the logic determining the best query method to call.

## Summary

|                                                                                         ### Public methods                                                                                         ||
|------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|
| ` boolean`                                                             | ` `[equals](https://developer.android.com/reference/android/support/content/Query#equals(java.lang.Object))`(Object obj) ` |
| ` int`                                                                 | ` `[getId](https://developer.android.com/reference/android/support/content/Query#getId())`() `                             |
| ` int`                                                                 | ` `[getLimit](https://developer.android.com/reference/android/support/content/Query#getLimit())`() `                       |
| ` int`                                                                 | ` `[getOffset](https://developer.android.com/reference/android/support/content/Query#getOffset())`() `                     |
| ` `[Uri](https://developer.android.com/reference/android/net/Uri.html) | ` `[getUri](https://developer.android.com/reference/android/support/content/Query#getUri())`() `                           |
| ` int`                                                                 | ` `[hashCode](https://developer.android.com/reference/android/support/content/Query#hashCode())`() `                       |
| ` String`                                                              | ` `[toString](https://developer.android.com/reference/android/support/content/Query#toString())`() `                       |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/content/Query#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public methods

### equals

```
boolean equals (Object obj)
```

<br />

<br />

|       Parameters       ||
|-------|-----------------|
| `obj` | `Object` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### getId

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getId ()
```

<br />

<br />

|                                      Returns                                       ||
|-------|-----------------------------------------------------------------------------|
| `int` | the id for this query. Derived from Uri as well as paging arguments. <br /> |

### getLimit

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getLimit ()
```

<br />

<br />

|         Returns          ||
|-------|-------------------|
| `int` | the limit. <br /> |

### getOffset

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getOffset ()
```

<br />

<br />

|          Returns          ||
|-------|--------------------|
| `int` | the offset. <br /> |

### getUri

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Uri getUri ()
```

<br />

<br />

|                                       Returns                                        ||
|---------------------------------------------------------------------|-----------------|
| [Uri](https://developer.android.com/reference/android/net/Uri.html) | the Uri. <br /> |

### hashCode

```
int hashCode ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### toString

```
String toString ()
```

<br />

<br />

|     Returns      ||
|----------|--------|
| `String` | <br /> |

-

  ## Annotations

  - [ContentPager.CursorDisposition](https://developer.android.com/reference/android/support/content/ContentPager.CursorDisposition)
-

  ## Interfaces

  - [ContentPager.ContentCallback](https://developer.android.com/reference/android/support/content/ContentPager.ContentCallback)
  - [ContentPager.QueryRunner](https://developer.android.com/reference/android/support/content/ContentPager.QueryRunner)
  - [ContentPager.QueryRunner.Callback](https://developer.android.com/reference/android/support/content/ContentPager.QueryRunner.Callback)
-

  ## Classes

  - [ContentPager](https://developer.android.com/reference/android/support/content/ContentPager)
  - [LoaderQueryRunner](https://developer.android.com/reference/android/support/content/LoaderQueryRunner)
  - [Query](https://developer.android.com/reference/android/support/content/Query)
  - [R](https://developer.android.com/reference/android/support/content/R)
  - [R.attr](https://developer.android.com/reference/android/support/content/R.attr)
  - [R.bool](https://developer.android.com/reference/android/support/content/R.bool)
  - [R.color](https://developer.android.com/reference/android/support/content/R.color)
  - [R.dimen](https://developer.android.com/reference/android/support/content/R.dimen)
  - [R.drawable](https://developer.android.com/reference/android/support/content/R.drawable)
  - [R.id](https://developer.android.com/reference/android/support/content/R.id)
  - [R.integer](https://developer.android.com/reference/android/support/content/R.integer)
  - [R.layout](https://developer.android.com/reference/android/support/content/R.layout)
  - [R.string](https://developer.android.com/reference/android/support/content/R.string)
  - [R.style](https://developer.android.com/reference/android/support/content/R.style)
  - [R.styleable](https://developer.android.com/reference/android/support/content/R.styleable)