Пример #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);
  }
Пример #2
0
 public void unlock(int recordNumber, long cookie)
     throws RecordNotFoundException, SecurityException {
   lockingFileDatabase.unlock(recordNumber, cookie);
 }
Пример #3
0
 public long lock(int recordNumber) throws RecordNotFoundException {
   return lockingFileDatabase.lock(recordNumber);
 }
Пример #4
0
 public int create(String[] data) throws DuplicateKeyException {
   return lockingFileDatabase.create(data);
 }
Пример #5
0
 public void delete(int recordNumber, long lockCookie)
     throws RecordNotFoundException, SecurityException {
   lockingFileDatabase.delete(recordNumber, lockCookie);
 }
Пример #6
0
 public void update(int recordNumber, String[] data, long lockCookie)
     throws RecordNotFoundException, SecurityException {
   lockingFileDatabase.update(recordNumber, data, lockCookie);
 }
Пример #7
0
 public String[] read(int recordNumber) throws RecordNotFoundException {
   return lockingFileDatabase.read(recordNumber);
 }