public EndpointResponse updateTransformationRule(UpdateTransformationRuleRequest request) {
    try {
      transformationRuleDao.update(request.getTransformationRule());
      return EndpointHelper.createResponse(EndpointResponse.class, request);

    } catch (Exception e) {
      return EndpointHelper.createErrorResponse(EndpointResponse.class, request, e);
    }
  }
  public ListTransformationRulesResponse listTransformationRules(EndpointRequest request) {
    try {
      ListTransformationRulesResponse r =
          EndpointHelper.createResponse(ListTransformationRulesResponse.class, request);
      r.setTransformationRules(transformationRuleDao.findAll());
      return r;

    } catch (Exception e) {
      return EndpointHelper.createErrorResponse(ListTransformationRulesResponse.class, request, e);
    }
  }
  public FindTransformationRuleResponse findTransformationRule(
      FindTransformationRuleRequest request) {
    try {
      FindTransformationRuleResponse r =
          EndpointHelper.createResponse(FindTransformationRuleResponse.class, request);
      r.setTransformationRule(transformationRuleDao.get(request.getTransformationRuleId()));
      return r;

    } catch (Exception e) {
      return EndpointHelper.createErrorResponse(FindTransformationRuleResponse.class, request, e);
    }
  }
  public CreateTransformationRuleResponse createTransformationRule(
      CreateTransformationRuleRequest request) {
    try {
      CreateTransformationRuleResponse response =
          EndpointHelper.createResponse(CreateTransformationRuleResponse.class, request);
      response.setTransformationRule(transformationRuleDao.add(request.getTransformationRule()));
      return response;

    } catch (Exception e) {
      return EndpointHelper.createErrorResponse(CreateTransformationRuleResponse.class, request, e);
    }
  }