Example #1
0
  /**
   * Get the file database by the specified id.
   *
   * @param id of the file database
   * @return the file database or null if no file database is found.
   */
  public DefaultFileDatabase getFileDatabase(Long id) {
    DefaultFileDatabase db = null;
    boolean found = false;
    Iterator<DefaultFileDatabase> iter = fileDatabases.iterator();

    while (iter.hasNext() && !found) {
      DefaultFileDatabase temp = iter.next();
      if (temp.getId().equals(id)) {
        found = true;
        db = temp;
      }
    }
    return db;
  }