Ejemplo n.º 1
0
  /** Increments the record number key at the given slot. */
  private void bumpRecordNumber(int i) {

    DatabaseEntry entry = new DatabaseEntry(keys[i]);
    DbCompat.setRecordNumber(entry, DbCompat.getRecordNumber(entry) + 1);
    keys[i] = entry.getData();
  }
Ejemplo n.º 2
0
 /**
  * Utility method for use by bindings to translate a record number integer to a entry buffer.
  *
  * @param recordNumber the record number.
  * @param entry the entry buffer to hold the record number.
  */
 public static void recordNumberToEntry(long recordNumber, DatabaseEntry entry) {
   entry.setData(new byte[4], 0, 4);
   DbCompat.setRecordNumber(entry, (int) recordNumber);
 }