Methods Summary |
---|
public boolean | deleteRow()
return false;
|
public void | fillWindow(int position, android.database.CursorWindow window)
if (position < 0 || position > getCount()) {
return;
}
window.acquireReference();
try {
int oldpos = mPos;
mPos = position - 1;
window.clear();
window.setStartPosition(position);
int columnNum = getColumnCount();
window.setNumColumns(columnNum);
while (moveToNext() && window.allocRow()) {
for (int i = 0; i < columnNum; i++) {
final Object data = mRows[mPos].get(i);
if (data != null) {
if (data instanceof byte[]) {
byte[] field = (byte[]) data;
if (!window.putBlob(field, mPos, i)) {
window.freeLastRow();
break;
}
} else {
String field = data.toString();
if (!window.putString(field, mPos, i)) {
window.freeLastRow();
break;
}
}
} else {
if (!window.putNull(mPos, i)) {
window.freeLastRow();
break;
}
}
}
}
mPos = oldpos;
} catch (IllegalStateException e){
// simply ignore it
} finally {
window.releaseReference();
}
|
public byte[] | getBlob(int columnIndex)
return (byte[]) mRows[mPos].get(columnIndex);
|
public java.lang.String[] | getColumnNames()
return mColumnNames;
|
public int | getCount()
return mRows.length;
|
public double | getDouble(int columnIndex)
Number num = (Number) mRows[mPos].get(columnIndex);
return num.doubleValue();
|
public float | getFloat(int columnIndex)
Number num = (Number) mRows[mPos].get(columnIndex);
return num.floatValue();
|
public int | getInt(int columnIndex)
Number num = (Number) mRows[mPos].get(columnIndex);
return num.intValue();
|
public long | getLong(int columnIndex)
Number num = (Number) mRows[mPos].get(columnIndex);
return num.longValue();
|
public short | getShort(int columnIndex)
Number num = (Number) mRows[mPos].get(columnIndex);
return num.shortValue();
|
public java.lang.String | getString(int columnIndex)
Object cell = mRows[mPos].get(columnIndex);
return (cell == null) ? null : cell.toString();
|
public boolean | isNull(int columnIndex)
return mRows[mPos].get(columnIndex) == null;
|