List of utility methods to do Cursor Put
boolean | putToWindow(Cursor cursor, int column, CursorWindow window, int row) This method was introduced by AndroidSQLiteServer to work around the lack of Cursor#getType(int) } on Gingerbread. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { return putToWindowHoneycombAndBeyond(cursor, column, window, row); } else { return putToWindowPreHoneycomb(cursor, column, window, row); |
boolean | putToWindowHoneycombAndBeyond(Cursor cursor, int i, CursorWindow window, int position) put To Window Honeycomb And Beyond final int type = cursor.getType(i); final boolean success; switch (type) { case Cursor.FIELD_TYPE_NULL: success = window.putNull(position, i); break; case Cursor.FIELD_TYPE_INTEGER: success = window.putLong(cursor.getLong(i), position, i); ... |
boolean | putToWindowPreHoneycomb(Cursor cursor, int i, CursorWindow window, int position) This solution is consistent with how Gingerbread implemented android.database.AbstractCursor#fillWindow(int,android.database.CursorWindow) . String value = cursor.getString(i); final boolean success; if (value != null) { success = window.putString(value, position, i); } else { success = window.putNull(position, i); return success; ... |
void | cursorFillWindow(final Cursor cursor, int position, final CursorWindow window) Fills the specified cursor window by iterating over the contents of the cursor. if (position < 0 || position >= cursor.getCount()) { return; final int oldPos = cursor.getPosition(); final int numColumns = cursor.getColumnCount(); window.clear(); window.setStartPosition(position); window.setNumColumns(numColumns); ... |