public TrackingConfigurationForTrackingVo getTrackingConfig(ILocation edLocation) { if(edLocation == null) throw new CodingRuntimeException("Cannot get Tracking configuration for a null EDLocation Id."); DomainFactory factory = getDomainFactory(); String query = "select tr from TrackingConfiguration as tr left join tr.eDLocation as loc where loc.id = :Loc and tr.isActive = 1"; List<?> listConfig = factory.find(query, new String[] {"Loc"}, new Object[] {edLocation.getID()}); if(listConfig != null && listConfig.size() > 0) { return TrackingConfigurationForTrackingVoAssembler.create((TrackingConfiguration) listConfig.get(0)); } return null; }