public ims.emergency.vo.TrackingAreaShortVoCollection listTrackingAreas(ims.framework.interfaces.ILocation edLoc) { if( edLoc == null) throw new CodingRuntimeException("Cannot list Tracking Area for a null EDLocation Id."); DomainFactory factory = getDomainFactory(); String query = "select ta from TrackingConfiguration as trc left join trc.areas as ta where ta.eDLocation.id = :EDLocationId and ta.status.id = :ActiveStatus and ta.isRegistrationArea = 0 order by index(ta)";//order by upper(ta.areaDisplayName)"; List<?> list = factory.find(query, new String[] {"EDLocationId", "ActiveStatus"}, new Object[] {edLoc.getID(), PreActiveActiveInactiveStatus.ACTIVE.getID()}); if( list != null && list.size() > 0) return TrackingAreaShortVoAssembler.createTrackingAreaShortVoCollectionFromTrackingArea(list); return null; }
public ims.emergency.vo.TrackingAreaShortVoCollection listTrackingAreas(LocationRefVo edLoc) { if (edLoc == null || edLoc.getID_Location() == null) return null; DomainFactory factory = getDomainFactory(); String query = "select ta from TrackingConfiguration as trc left join trc.areas as ta where ta.eDLocation.id = :EDLocationId and ta.status.id = :ActiveStatus and ta.isRegistrationArea = 0 order by index(ta)";//order by upper(ta.areaDisplayName)"; List<?> list = factory.find(query, new String[] {"EDLocationId", "ActiveStatus"}, new Object[] {edLoc.getID_Location(), PreActiveActiveInactiveStatus.ACTIVE.getID()}); if( list != null && list.size() > 0) return TrackingAreaShortVoAssembler.createTrackingAreaShortVoCollectionFromTrackingArea(list); return null; }
public TrackingAreaShortVo getTrackingArea(TrackingAreaRefVo trackingAreaRef) { if(trackingAreaRef == null || trackingAreaRef.getID_TrackingArea() == null) throw new CodingRuntimeException("Cannot get TrackingArea record on null TrackingArea Id."); DomainFactory factory = getDomainFactory(); TrackingArea doTrackingArea = (TrackingArea) factory.getDomainObject(TrackingArea.class, trackingAreaRef.getID_TrackingArea()); return TrackingAreaShortVoAssembler.create(doTrackingArea); }
public TrackingAreaShortVoCollection listTrackingAreas(ILocation edloc) { if( edloc == null) throw new CodingRuntimeException("Cannot list Tracking Area for a null EDLocation Id."); DomainFactory factory = getDomainFactory(); String query = "select ta from TrackingConfiguration as trc left join trc.areas as ta where ta.eDLocation.id = :EDLocationId and ta.status.id = :ActiveStatus and ta.isRegistrationArea = 0 order by index(ta)";//order by upper(ta.areaDisplayName)"; List<?> list = factory.find(query, new String[] {"EDLocationId", "ActiveStatus"}, new Object[] {edloc.getID(), PreActiveActiveInactiveStatus.ACTIVE.getID()}); if( list != null && list.size() > 0) return TrackingAreaShortVoAssembler.createTrackingAreaShortVoCollectionFromTrackingArea(list); return null; }