Пример #1
0
 private ResourcesBL() {
   super();
   try {
     dal = ResourcesDAL.getInstance();
   } catch (SQLException e) {
     Logger.log(LOG_LEVEL.ERROR, e);
   }
 }
Пример #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;
  }
Пример #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;
  }