@Override
  public ProcedureResponse fetchAllProcedures(FetchAllRequest request) {
    ProcedureResponse response = new ProcedureResponse();

    try {
      InternalResultsResponse<Procedure> internalResponse = getProcedureBAC().fetchAllProcedures();
      ResponseHandler.populateResponse(
          response, internalResponse, DEFAULT_ERROR_MSG, request.getRequestContext());
    } catch (Exception ex) {
      ResponseHandler.handleException(
          LOG,
          response,
          ex,
          DEFAULT_EXCEPTION_MSG,
          new Object[] {CLASS_NAME},
          request.getRequestContext());
    }

    return response;
  }
  @Override
  public ProcedureResponse refreshProcedures(RefreshRequest request) {
    // This method is demo code only. Do not view this as a QAT Global Standard.
    ProcedureResponse response = new ProcedureResponse();

    try {
      InternalResultsResponse<Procedure> internalResponse =
          getProcedureBAC().refreshProcedures(request);
      ResponseHandler.populateResponse(
          response, internalResponse, DEFAULT_ERROR_MSG, request.getRequestContext());
    } catch (Exception ex) {
      ResponseHandler.handleException(
          LOG,
          response,
          ex,
          DEFAULT_EXCEPTION_MSG,
          new Object[] {CLASS_NAME},
          request.getRequestContext());
    }

    return response;
  }
  /*
   * (non-Javadoc)
   * @see com.qat.samples.sysmgmt.dapi.impl.IProcedureWS#fetchProcedureById(com.qat.samples.sysmgmt.model.request.
   * FetchByIdRequest)
   */
  @Override
  public ProcedureResponse fetchProcedureById(FetchByIdRequest request) {
    ProcedureResponse response = new ProcedureResponse();

    try {
      InternalResultsResponse<Procedure> internalResponse =
          new InternalResultsResponse<Procedure>();

      internalResponse = getProcedureBAC().fetchProcedureById(request);
      // Handle the processing for all previous methods regardless of them failing or succeeding.
      ResponseHandler.handleOperationStatusAndMessages(response, internalResponse, true);
    } catch (Exception ex) {
      ResponseHandler.handleException(
          LOG,
          response,
          ex,
          DEFAULT_EXCEPTION_MSG,
          new Object[] {CLASS_NAME},
          request.getRequestContext());
    }

    return response;
  }