Beispiel #1
0
 private ResourcesBL() {
   super();
   try {
     dal = ResourcesDAL.getInstance();
   } catch (SQLException e) {
     Logger.log(LOG_LEVEL.ERROR, e);
   }
 }
Beispiel #2
0
  public List<Resource> getAllRootResources() {
    List<Resource> rootResources = new ArrayList<>();
    try {
      rootResources = this.dal.fetchOnlyRootResources();
    } catch (SQLException e) {
      Logger.log(LOG_LEVEL.ERROR, e);
    }

    return rootResources;
  }
Beispiel #3
0
  @Override
  public STATUS_CODE validate(Resource bo) {
    try {
      if (!this.dal.exists(bo)) {
        return STATUS_CODE.OK;
      }
    } catch (SQLException e) {
      Logger.log(LOG_LEVEL.WARNING, e);

      return STATUS_CODE.FAIL;
    }
    return STATUS_CODE.ALREADY_EXISTS;
  }