public String getString(final String fieldName) throws SqlJetException { return (String) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { return getBtreeDataTable().getString(getFieldSafe(fieldName)); } }); }
public InputStream getBlobAsStream(final String fieldName) throws SqlJetException { return (InputStream) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { ISqlJetMemoryPointer buffer = getBtreeDataTable().getBlob(getFieldSafe(fieldName)); return buffer != null ? new ByteArrayInputStream(SqlJetUtility.readByteBuffer(buffer)) : null; } }); }
public SqlJetValueType getFieldType(final int field) throws SqlJetException { return (SqlJetValueType) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { return btreeTable.getFieldType(field); } }); }
public boolean getBoolean(final int field) throws SqlJetException { return (Boolean) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { return btreeTable.getInteger(field) != 0; } }); }
public SqlJetValueType getFieldType(final String fieldName) throws SqlJetException { return (SqlJetValueType) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { return getBtreeDataTable().getFieldType(getFieldSafe(fieldName)); } }); }
public byte[] getBlobAsArray(final String fieldName) throws SqlJetException { return (byte[]) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { ISqlJetMemoryPointer buffer = getBtreeDataTable().getBlob(getFieldSafe(fieldName)); return buffer != null ? SqlJetUtility.readByteBuffer(buffer) : null; } }); }
public Object getValue(final String fieldName) throws SqlJetException { return db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { if (SqlJetBtreeDataTable.isFieldNameRowId(fieldName)) { return getBtreeDataTable().getRowId(); } else { return getBtreeDataTable().getValue(getFieldSafe(fieldName)); } } }); }
public int getFieldsCount() throws SqlJetException { return (Integer) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { return btreeTable.getFieldsCount(); } }); }
public long getInteger(final int field) throws SqlJetException { return (Long) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { return btreeTable.getInteger(field); } }); }
@Override public boolean goTo(final long rowId) throws SqlJetException { return (Boolean) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { SqlJetIndexScopeCursor.super.goTo(rowId); return !eof(); } }); }
public boolean goTo(final long rowId) throws SqlJetException { return (Boolean) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { final ISqlJetBtreeDataTable table = getBtreeDataTable(); return table.goToRow(rowId); } }); }
public double getFloat(final String fieldName) throws SqlJetException { return (Double) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { return getBtreeDataTable().getFloat(getFieldSafe(fieldName)); } }); }
public boolean eof() throws SqlJetException { return (Boolean) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { return btreeTable.eof(); } }); }
public boolean last() throws SqlJetException { return (Boolean) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { return btreeTable.last(); } }); }
public Object getValue(final int field) throws SqlJetException { return db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { Object value = btreeTable.getValue(field); if (value instanceof ISqlJetMemoryPointer) { return new ByteArrayInputStream(SqlJetUtility.readByteBuffer((ISqlJetMemoryPointer) value)); } return value; } }); }
public long getRowId() throws SqlJetException { return (Long) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { final ISqlJetBtreeDataTable table = getBtreeDataTable(); if (table.eof()) { throw new SqlJetException(SqlJetErrorCode.MISUSE, "Table is empty or the current record doesn't point to a data row"); } return table.getRowId(); } }); }
public Object[] getRowValues() throws SqlJetException { return (Object[]) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { Object[] values = getBtreeDataTable().getValues(); return values.clone(); } }); }
public boolean isNull(final int field) throws SqlJetException { return (Boolean) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { return btreeTable.isNull(field); } }); }
public String getString(final int field) throws SqlJetException { return (String) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { return btreeTable.getString(field); } }); }
public InputStream getBlobAsStream(final int field) throws SqlJetException { return (InputStream) db.runReadTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { ISqlJetMemoryPointer buffer = btreeTable.getBlob(field); return buffer != null ? new ByteArrayInputStream(SqlJetUtility.readByteBuffer(buffer)) : null; } }); }