use of gov.ca.cwds.cals.web.rest.parameter.FacilityComplaintParameterObject in project cals-api by ca-cwds.
the class ComplaintService method find.
@Override
public Response find(Serializable parametersObject) {
FacilityComplaintParameterObject parameterObject;
if (parametersObject instanceof FacilityComplaintParameterObject) {
parameterObject = (FacilityComplaintParameterObject) parametersObject;
ComplaintReportLic802 complaintReportLic802 = null;
if (StringUtils.isNumeric(parameterObject.getFacilityId())) {
complaintReportLic802 = complaintReportLic802Dao.findComplaintByFacilityIdAndComplaintId(parameterObject.getFacilityId(), parameterObject.getComplaintId());
}
if (complaintReportLic802 == null) {
throw new ExpectedException(Constants.ExpectedExceptionMessages.COMPLAINT_NOT_FOUND_BY_ID, NOT_FOUND);
} else {
return complaintMapper.entityToDTO(complaintReportLic802);
}
}
throw new IllegalStateException("FacilityComplaintParameterObject is expected here");
}
Aggregations