# CursorMapper

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1  
Summary:[Ctors](https://developer.android.com/reference/android/support/v17/leanback/database/CursorMapper#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v17/leanback/database/CursorMapper#pubmethods)\|[Protected Methods](https://developer.android.com/reference/android/support/v17/leanback/database/CursorMapper#promethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v17/leanback/database/CursorMapper#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v17/leanback/database/CursorMapper#)  

# CursorMapper

| 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


abstract
class
CursorMapper
`  
`

extends Object


``


`

|---|----------------------------------------------------|
| java.lang.Object                                      ||
| ↳ | android.support.v17.leanback.database.CursorMapper |

<br />

*** ** * ** ***

Abstract class used to convert the current[Cursor](https://developer.android.com/reference/android/database/Cursor.html)row to a single object.

## Summary

|                                                       ### Public constructors                                                        ||
|-----------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[CursorMapper](https://developer.android.com/reference/android/support/v17/leanback/database/CursorMapper#CursorMapper())`() ` |

|                                                                                                                                                                              ### Public methods                                                                                                                                                                               ||
|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` Object` | ` `[convert](https://developer.android.com/reference/android/support/v17/leanback/database/CursorMapper#convert(android.database.Cursor))`(`[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` cursor) ` Convert a[Cursor](https://developer.android.com/reference/android/database/Cursor.html)at its current position to an Object. |

|                                                                                                                                                                                   ### Protected methods                                                                                                                                                                                    ||
|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract Object` | ` `[bind](https://developer.android.com/reference/android/support/v17/leanback/database/CursorMapper#bind(android.database.Cursor))`(`[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` cursor) ` A subclass should implement this method to create a single object using binding information.                                           |
| ` abstract void`   | ` `[bindColumns](https://developer.android.com/reference/android/support/v17/leanback/database/CursorMapper#bindColumns(android.database.Cursor))`(`[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` cursor) ` Called once when the associated[Cursor](https://developer.android.com/reference/android/database/Cursor.html)is changed. |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/database/CursorMapper#)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 constructors

### CursorMapper

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

```
CursorMapper ()
```

<br />

<br />

## Public methods

### convert

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

```
Object convert (Cursor cursor)
```

Convert a[Cursor](https://developer.android.com/reference/android/database/Cursor.html)at its current position to an Object.

<br />

|        Parameters         ||
|----------|-----------------|
| `cursor` | `Cursor` <br /> |

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

## Protected methods

### bind

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

```
Object bind (Cursor cursor)
```

A subclass should implement this method to create a single object using binding information. This method is not intended to be called outside of CursorMapper.

<br />

|        Parameters         ||
|----------|-----------------|
| `cursor` | `Cursor` <br /> |

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

### bindColumns

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

```
void bindColumns (Cursor cursor)
```

Called once when the associated[Cursor](https://developer.android.com/reference/android/database/Cursor.html)is changed. A subclass should bind column indexes to column names in this method. This method is not intended to be called outside of CursorMapper.

<br />

|        Parameters         ||
|----------|-----------------|
| `cursor` | `Cursor` <br /> |

-

  ## Classes

  - [CursorMapper](https://developer.android.com/reference/android/support/v17/leanback/database/CursorMapper)