public ChartRequestedVo getChartRequestedByEmergencyAttendance(EmergencyAttendanceRefVo emergencyAttendanceRef) { if (emergencyAttendanceRef == null || emergencyAttendanceRef.getID_EmergencyAttendance() == null) { throw new CodingRuntimeException("Cannot get ChartRequestedVo on null Id for EmergencyAttendance "); } DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); hql.append("select chartReq from ChartRequested as chartReq left join chartReq.emergencyAttendence as emergeAtt where (emergeAtt.id = :emergAttID) "); List<?> list = factory.find(hql.toString(), new String[] { "emergAttID" }, new Object[] { emergencyAttendanceRef.getID_EmergencyAttendance() }); if (list!=null && list.size()>0) { return ChartRequestedVoAssembler.create((ChartRequested) list.get(0)); } return null; }
public ChartRequestedVo getChartRequestedByEmergencyAttendance(EmergencyAttendanceRefVo emergencyAttendanceRef) { if (emergencyAttendanceRef == null || emergencyAttendanceRef.getID_EmergencyAttendance() == null) { throw new CodingRuntimeException("Cannot get ChartRequestedVo on null Id for EmergencyAttendance "); } DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); hql.append("select chartReq from ChartRequested as chartReq left join chartReq.emergencyAttendence as emergeAtt where (emergeAtt.id = :emergAttID and (emergeAtt.isRIE is null or emergeAtt.isRIE = 0) ) "); //WDEV-22956 List<?> list = factory.find(hql.toString(), new String[] { "emergAttID" }, new Object[] { emergencyAttendanceRef.getID_EmergencyAttendance() }); if (list!=null && list.size()>0) { return ChartRequestedVoAssembler.create((ChartRequested) list.get(0)); } return null; }
public ims.emergency.vo.ChartRequestedVo getChartRequested(ims.core.admin.vo.ChartRequestedRefVo chartRequestedRef) { if (chartRequestedRef == null || chartRequestedRef.getID_ChartRequested() == null) { throw new CodingRuntimeException("Cannot get ChartRequestedVo on null Id "); } DomainFactory factory = getDomainFactory(); ChartRequested domainChartRequested = (ChartRequested) factory.getDomainObject(ChartRequested.class, chartRequestedRef.getID_ChartRequested()); return ChartRequestedVoAssembler.create(domainChartRequested); }
public ims.emergency.vo.ChartRequestedVo save(ims.emergency.vo.ChartRequestedVo chartRequestedToSave) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException { if (chartRequestedToSave == null ) { throw new CodingRuntimeException("Cannot get ChartRequestedVo on null Id "); } DomainFactory factory = getDomainFactory(); ChartRequested domainChartRequested = ChartRequestedVoAssembler.extractChartRequested(factory,chartRequestedToSave); factory.save(domainChartRequested); return ChartRequestedVoAssembler.create(domainChartRequested); }