Книга: Beginning Android

Making Your Own Cursors

Making Your Own Cursors

There may be circumstances in which you want to use your own Cursor subclass rather than the stock implementation provided by Android. In those cases, you can use queryWithFactory() and rawQueryWithFactory(), which take a SQLiteDatabase.CursorFactory instance as a parameter. The factory, as one might expect, is responsible for creating new cursors via its newCursor() implementation.

Finding and implementing a valid use for this facility is left as an exercise for the reader. Suffice it to say that you should not need to create your own cursor classes much, if at all, in ordinary Android development.

Оглавление книги


Генерация: 1.056. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз