Source:
public PageableResult search(RequestContext context) throws ResponseException { final String principalResultsInterpreterUuid = context.getRequest() .getParameter(REQUEST_PARAM_PRINCIPAL_RESULT_INTERPRETER); Provider principalResultsInterpreter = null; if (StringUtils.isNotBlank(principalResultsInterpreterUuid)) { principalResultsInterpreter = ((ProviderResource1_9) Context.getService(RestService.class) .getResourceBySupportedClass(Provider.class)).getByUniqueId(principalResultsInterpreterUuid); if (principalResultsInterpreter == null) { return new EmptySearchResult(); } } final String fromDateString = context.getRequest() .getParameter(REQUEST_PARAM_DATE_FROM); Date fromDate = null; if (StringUtils.isNotBlank(fromDateString)) { fromDate = (Date) ConversionUtil.convert(fromDateString, java.util.Date.class); } final String toDateString = context.getRequest() .getParameter(REQUEST_PARAM_DATE_TO); Date toDate = null; if (StringUtils.isNotBlank(toDateString)) { toDate = (Date) ConversionUtil.convert(toDateString, java.util.Date.class); } final String statusString = context.getRequest() .getParameter(REQUEST_PARAM_STATUS); RadiologyReportStatus status = null; if (StringUtils.isNotBlank(statusString)) { status = RadiologyReportStatus.valueOf(statusString); } RadiologyReportSearchCriteria.Builder radiologyReportSearchCriteriaBuilder = new RadiologyReportSearchCriteria.Builder(); if (context.getIncludeAll()) { radiologyReportSearchCriteriaBuilder = radiologyReportSearchCriteriaBuilder.includeVoided(); } RadiologyReportSearchCriteria radiologyReportSearchCriteria = radiologyReportSearchCriteriaBuilder.fromDate(fromDate) .toDate(toDate) .withPrincipalResultsInterpreter(principalResultsInterpreter) .withStatus(status) .build(); final List<RadiologyReport> result = radiologyReportService.getRadiologyReports(radiologyReportSearchCriteria); if (result.isEmpty()) { return new EmptySearchResult(); } return new NeedsPaging<RadiologyReport>(result, context); }

Target:
public PageableResult search(RequestContext context) throws ResponseException { final String principalResultsInterpreterUuid = context.getRequest() .getParameter(REQUEST_PARAM_PRINCIPAL_RESULT_INTERPRETER); Provider principalResultsInterpreter = null; if (StringUtils.isNotBlank(principalResultsInterpreterUuid)) { principalResultsInterpreter = ((ProviderResource1_9) Context.getService(RestService.class) .getResourceBySupportedClass(Provider.class)).getByUniqueId(principalResultsInterpreterUuid); if (principalResultsInterpreter == null) { return new EmptySearchResult(); } } final String fromDateString = context.getRequest() .getParameter(REQUEST_PARAM_DATE_FROM); Date fromDate = null; if (StringUtils.isNotBlank(fromDateString)) { fromDate = (Date) ConversionUtil.convert(fromDateString, java.util.Date.class); } final String toDateString = context.getRequest() .getParameter(REQUEST_PARAM_DATE_TO); Date toDate = null; if (StringUtils.isNotBlank(toDateString)) { toDate = (Date) ConversionUtil.convert(toDateString, java.util.Date.class); } final String statusString = context.getRequest() .getParameter(REQUEST_PARAM_STATUS); RadiologyReportStatus status = null; if (StringUtils.isNotBlank(statusString)) { status = RadiologyReportStatus.valueOf(statusString); } RadiologyReportSearchCriteria.Builder radiologyReportSearchCriteriaBuilder = new RadiologyReportSearchCriteria.Builder(); if (context.getIncludeAll()) { radiologyReportSearchCriteriaBuilder.includeVoided(); } RadiologyReportSearchCriteria radiologyReportSearchCriteria = radiologyReportSearchCriteriaBuilder.fromDate(fromDate) .toDate(toDate) .withPrincipalResultsInterpreter(principalResultsInterpreter) .withStatus(status) .build(); final List<RadiologyReport> result = radiologyReportService.getRadiologyReports(radiologyReportSearchCriteria); if (result.isEmpty()) { return new EmptySearchResult(); } return new NeedsPaging<RadiologyReport>(result, context); }