if (!window.putNull(getPosition(), i)) { window.freeLastRow(); break;
/** * Put the value in given window. If the value type is other than Long, * String, byte[] or Double, the NULL will be filled. * * @return true if succeeded. */ private boolean putValue(CursorWindow window, Object value, int pos, int column) { if (value == null) { return window.putNull(pos, column); } else if (value instanceof Long) { return window.putLong((Long) value, pos, column); } else if (value instanceof String) { return window.putString((String) value, pos, column); } else if (value instanceof byte[] && ((byte[]) value).length > 0) { return window.putBlob((byte[]) value, pos, column); } else if (value instanceof Double) { return window.putDouble((Double) value, pos, column); } else { return window.putNull(pos, column); } }
switch (getCursorType(cursor, i)) { case FIELD_TYPE_NULL: current.putNull(rowIndex, i); break; case FIELD_TYPE_BLOB:
Object val = row.get(builder.columns[columnIndex]); if (val == null) { current.putNull(rowIndex, columnIndex); } else if (val instanceof String) { current.putString((String) val, rowIndex, columnIndex);
switch (type) { case Cursor.FIELD_TYPE_NULL: success = window.putNull(position, i); break; final byte[] value = cursor.getBlob(i); success = value != null ? window.putBlob(value, position, i) : window.putNull(position, i); break; final String value = cursor.getString(i); success = value != null ? window.putString(value, position, i) : window.putNull(position, i); break;
if (!window.putNull(mPos, i)) { window.freeLastRow(); break;
destination.putNull(i, j);
destination.putNull(i, j);