private void initializeTimers() { form.getTimers().getAreaCountRefrresh().setEnabled(true); ILocation currentLocation = engine.getCurrentLocation(); if(currentLocation == null) return; TrackingConfigurationForTrackingVo areaCountRefreshRate = domain.getTrackingConfig(currentLocation); if(areaCountRefreshRate != null && areaCountRefreshRate.getAreaCountRefreshRate() != null) { form.getTimers().getAreaCountRefrresh().setInterval(areaCountRefreshRate.getAreaCountRefreshRate()); } //form.getTimers().getPatientRefresh().setEnabled(false); }
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; }