public TrackingForTrackingStatusVo getTracking(TrackingRefVo tracking) { DomainFactory factory = getDomainFactory(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); if (tracking == null || !tracking.getID_TrackingIsNotNull()) { throw new CodingRuntimeException("Cannot get Tracking on null TrackingId "); } StringBuffer hql = new StringBuffer(); hql.append(" select Tracking from Tracking as Tracking where Tracking.id = :trackingID"); markers.add("trackingID"); values.add(tracking.getID_Tracking()); return TrackingForTrackingStatusVoAssembler.createTrackingForTrackingStatusVoCollectionFromTracking(factory.find(hql.toString(), markers, values)).get(0); }
public void saveTracking(ims.emergency.vo.TrackingForTrackingStatusVo trackingToSave) throws ims.domain.exceptions.StaleObjectException { if (trackingToSave == null) throw new CodingRuntimeException("Cannot save null TrackingForTrackingStatusVo "); if (!trackingToSave.isValidated()) throw new DomainRuntimeException("TrackingForTrackingStatusVo Not Validated."); DomainFactory factory = getDomainFactory(); Tracking domainTrackingStatus = TrackingForTrackingStatusVoAssembler.extractTracking(factory, trackingToSave); factory.save(domainTrackingStatus); }