コード例 #1
0
  public BuckWaResponse getHolidayByYear(BuckWaRequest request) {
    if (logger.isInfoEnabled()) {
      logger.info(this.getClass().toString() + "-getHolidayByYear-");
    }
    BuckWaResponse response = new BuckWaResponse();
    try {
      String holidayId = request.get("holidayId").toString();
      List<Holiday> holidayList = holidayDao.getHolidayByYear(holidayId);
      response.addResponse("holidayList", holidayList);

    } catch (Exception ex) {
      ex.printStackTrace();
      response.setStatus(BuckWaConstants.FAIL);
      response.setErrorCode("E001");
    }
    return response;
  }
コード例 #2
0
  @Override
  public BuckWaResponse getAll() {
    if (logger.isInfoEnabled()) {
      logger.info(this.getClass().toString() + "-getAll-");
    }
    BuckWaResponse response = new BuckWaResponse();
    try {
      List<Holiday> holidayList = holidayDao.getAllHoliday();
      response.addResponse("holidayList", holidayList);

    } catch (Exception ex) {
      ex.printStackTrace();
      response.setStatus(BuckWaConstants.FAIL);
      response.setErrorCode("E001");
    }
    //		response.setSuccessCode("S001");
    return response;
  }
コード例 #3
0
  @Override
  public BuckWaResponse getById(BuckWaRequest request) {
    if (logger.isInfoEnabled()) {
      logger.info(this.getClass().toString() + "-getById-");
    }
    BuckWaResponse response = new BuckWaResponse();
    try {
      String holidayId = (String) request.get("holidayId");
      Holiday holiday = holidayDao.getHolidayById(holidayId);
      response.addResponse("holiday", holiday);

    } catch (Exception ex) {
      ex.printStackTrace();
      response.setStatus(BuckWaConstants.FAIL);
      response.setErrorCode("E001");
    }

    // Success return S001
    //		response.setSuccessCode("S001");
    return response;
  }
コード例 #4
0
  @Override
  public BuckWaResponse getByOffsetYear(BuckWaRequest request) {
    if (logger.isInfoEnabled()) {
      logger.info(this.getClass().toString() + "-getByOffset-");
    }
    BuckWaResponse response = new BuckWaResponse();
    try {
      PagingBean pagingBean = (PagingBean) request.get("pagingBean");
      PagingBean returnBean = holidayDao.getAllHolidayByOffsetYear(pagingBean);
      response.addResponse("pagingBean", returnBean);

    } catch (Exception ex) {
      ex.printStackTrace();
      response.setStatus(BuckWaConstants.FAIL);
      response.setErrorCode("E001");
    }

    // Success return S001
    //		response.setSuccessCode("S001");
    return response;
  }