FileDocCategorySizeDatePackage
CursorMapper.javaAPI DocAndroid 5.1 API1664Thu Mar 12 22:22:56 GMT 2015android.support.v17.leanback.database

CursorMapper

public abstract class CursorMapper extends Object
Abstract class used to convert the current {@link Cursor} row to a single object.

Fields Summary
private android.database.Cursor
mCursor
Constructors Summary
Methods Summary
protected abstract java.lang.Objectbind(android.database.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.

protected abstract voidbindColumns(android.database.Cursor cursor)
Called once when the associated {@link 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.

public java.lang.Objectconvert(android.database.Cursor cursor)
Convert a {@link Cursor} at its current position to an Object.

        if (cursor != mCursor) {
            mCursor = cursor;
            bindColumns(mCursor);
        }
        return bind(mCursor);