Join us on the livestream at Android Dev Summit on 7-8 November 2018, starting at 10AM PDT!
added in version 1.0.0
belongs to Maven artifact androidx.leanback:leanback:1.0.0

CursorMapper

public abstract class CursorMapper
extends Object

java.lang.Object
   ↳ androidx.leanback.database.CursorMapper


Abstract class used to convert the current Cursor row to a single object.

Summary

Public constructors

CursorMapper()

Public methods

Object convert(Cursor cursor)

Convert a Cursor at its current position to an Object.

Protected methods

abstract Object bind(Cursor cursor)

A subclass should implement this method to create a single object using binding information.

abstract void bindColumns(Cursor cursor)

Called once when the associated Cursor is changed.

Inherited methods

Public constructors

CursorMapper

added in version 1.0.0
public CursorMapper ()

Public methods

convert

added in version 1.0.0
public Object convert (Cursor cursor)

Convert a Cursor at its current position to an Object.

Parameters
cursor Cursor

Returns
Object

Protected methods

bind

added in version 1.0.0
protected abstract 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.

Parameters
cursor Cursor

Returns
Object

bindColumns

added in version 1.0.0
protected abstract void bindColumns (Cursor cursor)

Called once when the associated Cursor 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.

Parameters
cursor Cursor