public TrackingAreaForTrackingVo getTrackingAreaForTracking(TrackingRefVo trackingRef) { if( trackingRef == null ) return null; DomainFactory factory = getDomainFactory(); String query = "select t2_1 from Tracking as t1_1 left join t1_1.currentArea as t2_1 where( t1_1.id = :trackingId )"; List<?> list = factory.find(query, new String[] {"trackingId"}, new Object[] {trackingRef.getID_Tracking()}); if(list == null || list.size() == 0) return null; TrackingAreaForTrackingVoCollection temp =TrackingAreaForTrackingVoAssembler.createTrackingAreaForTrackingVoCollectionFromTrackingArea(list); if( temp != null && temp.size() > 0) return temp.get(0); return null; }