public TrackingWithPartialAdmissionVo getTrackingWithEDPartialAdmission(TrackingRefVo trackRef) { if(trackRef == null || trackRef.getID_Tracking() == null) throw new CodingRuntimeException("Cannot get Tracking record on null Tracking Id."); DomainFactory factory = getDomainFactory(); Tracking doTracking = (Tracking) factory.getDomainObject(Tracking.class, trackRef.getID_Tracking()); return TrackingWithPartialAdmissionVoAssembler.create(doTracking); }
public TrackingWithPartialAdmissionVo cancelCurrentPartialAdmission(TrackingWithPartialAdmissionVo trWithPartialAdmission, EDPartialAdmissionVo partialAdmission) throws StaleObjectException, UniqueKeyViolationException { if(trWithPartialAdmission == null || partialAdmission== null) throw new CodingRuntimeException("Cannot save a null tracking record."); if(!trWithPartialAdmission.isValidated() || !trWithPartialAdmission.isValidated()) throw new CodingRuntimeException("tracking record is not validated."); DomainFactory factory = getDomainFactory(); EDPartialAdmission doPartialAdmission = EDPartialAdmissionVoAssembler.extractEDPartialAdmission(factory, partialAdmission); factory.save(doPartialAdmission); Tracking doTracking = TrackingWithPartialAdmissionVoAssembler.extractTracking(factory, trWithPartialAdmission); factory.save(doTracking); EDPartialAdmissionDialog dom = (EDPartialAdmissionDialog) getDomainImpl(EDPartialAdmissionDialogImpl.class); try { dom.triggerCancelPartialAdmission(trWithPartialAdmission.getAttendance(), trWithPartialAdmission.getCurrentPartialAdmission()); } catch (DomainInterfaceException e) { e.printStackTrace(); } return TrackingWithPartialAdmissionVoAssembler.create(doTracking); }
public TrackingWithPartialAdmissionVo getTrackingWithEDPartialAdmission(TrackingRefVo trackingRef) { if(trackingRef == null || trackingRef.getID_Tracking() == null) throw new CodingRuntimeException("Cannot get Tracking record on null Tracking Id."); DomainFactory factory = getDomainFactory(); Tracking doTracking = (Tracking) factory.getDomainObject(Tracking.class, trackingRef.getID_Tracking()); return TrackingWithPartialAdmissionVoAssembler.create(doTracking); }