Exemplo n.º 1
0
  public int[] find(String[] criteria, SearchType type) {
    List<Integer> result = new ArrayList<Integer>();

    List<DatabaseRow> results = filtering.accepts(criteria, lockingFileDatabase.readAll(), type);

    for (DatabaseRow databaseRow : results) result.add(databaseRow.getId());

    return CollectionToArray.convert(result);
  }
Exemplo n.º 2
0
 public void unlock(int recordNumber, long cookie)
     throws RecordNotFoundException, SecurityException {
   lockingFileDatabase.unlock(recordNumber, cookie);
 }
Exemplo n.º 3
0
 public long lock(int recordNumber) throws RecordNotFoundException {
   return lockingFileDatabase.lock(recordNumber);
 }
Exemplo n.º 4
0
 public int create(String[] data) throws DuplicateKeyException {
   return lockingFileDatabase.create(data);
 }
Exemplo n.º 5
0
 public void delete(int recordNumber, long lockCookie)
     throws RecordNotFoundException, SecurityException {
   lockingFileDatabase.delete(recordNumber, lockCookie);
 }
Exemplo n.º 6
0
 public void update(int recordNumber, String[] data, long lockCookie)
     throws RecordNotFoundException, SecurityException {
   lockingFileDatabase.update(recordNumber, data, lockCookie);
 }
Exemplo n.º 7
0
 public String[] read(int recordNumber) throws RecordNotFoundException {
   return lockingFileDatabase.read(recordNumber);
 }