public TrackingAttendanceStatusForEventHistoryVoCollection getTrackingAttendanceStatuses(CareContextRefVo careContextRef) { if (careContextRef == null || careContextRef.getID_CareContext() == null) { throw new CodingRuntimeException("Cannot get TrackingAttendanceStatusForEventHistoryVoCollection on null Id for CareContext "); } DomainFactory factory = getDomainFactory(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); StringBuffer hql = new StringBuffer(); hql.append(" select attendanceStatus from TrackingAttendanceStatus as attendanceStatus left join attendanceStatus.attendance as contextID where contextID.id = :contextID"); markers.add("contextID"); values.add(careContextRef.getID_CareContext()); return TrackingAttendanceStatusForEventHistoryVoAssembler.createTrackingAttendanceStatusForEventHistoryVoCollectionFromTrackingAttendanceStatus(factory.find(hql.toString(), markers, values)); }
public TrackingAttendanceStatusForEventHistoryVoCollection listTrackingAttendanceStatuses(CareContextRefVo careContextRef) { if (careContextRef == null || careContextRef.getID_CareContext() == null) { throw new CodingRuntimeException("Cannot get TrackingAttendanceStatusForEventHistoryVoCollection on null Id for CareContext "); } DomainFactory factory = getDomainFactory(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); StringBuffer hql = new StringBuffer(); hql.append(" select attendanceStatus from TrackingAttendanceStatus as attendanceStatus left join attendanceStatus.attendance as contextID where contextID.id = :contextID order by attendanceStatus.systemInformation.creationDateTime desc"); markers.add("contextID"); values.add(careContextRef.getID_CareContext()); return TrackingAttendanceStatusForEventHistoryVoAssembler.createTrackingAttendanceStatusForEventHistoryVoCollectionFromTrackingAttendanceStatus(factory.find(hql.toString(), markers, values)); }
public ims.emergency.vo.TrackingAttendanceStatusForEventHistoryVo getStatus(ims.emergency.vo.TrackingAttendanceStatusRefVo statusRef) { if(statusRef == null || statusRef.getID_TrackingAttendanceStatus() == null) return null; TrackingAttendanceStatus doStatus = (TrackingAttendanceStatus) getDomainFactory().getDomainObject(TrackingAttendanceStatus.class, statusRef.getID_TrackingAttendanceStatus()); return TrackingAttendanceStatusForEventHistoryVoAssembler.create(doStatus); }
public ims.emergency.vo.TrackingAttendanceStatusForEventHistoryVo save(ims.emergency.vo.TrackingAttendanceStatusForEventHistoryVo status) throws ims.domain.exceptions.StaleObjectException { if(status == null) throw new CodingRuntimeException("Cannot save a null TrackingAttendanceStatusForEventHistoryVo."); if(!status.isValidated()) throw new CodingRuntimeException("TrackingAttendanceStatusForEventHistoryVo is not validated."); DomainFactory factory = getDomainFactory(); TrackingAttendanceStatus doStatus = TrackingAttendanceStatusForEventHistoryVoAssembler.extractTrackingAttendanceStatus(factory, status); factory.save(doStatus); return TrackingAttendanceStatusForEventHistoryVoAssembler.create(doStatus); }