private void populateScreenFromData() { form.getGlobalContext().Emergency.setTrackingAreaCollection(null); TrackingConfigurationVoCollection collLocations = domain.listEDLocations(); if (collLocations == null) return; for (int i = 0; i < collLocations.size(); i++) { grdDepartmentsRow newAreaColumn = form.grdDepartments().getRows().newRow(); newAreaColumn.setcolDepartment(collLocations.get(i).getEDLocation().getName()); newAreaColumn.setcolSelect(false); newAreaColumn.setValue(collLocations.get(i)); } }
public TrackingConfigurationVoCollection listEDLocations() { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); //List only Emergency Departments hql.append(" select edloc from TrackingConfiguration as edloc left join edloc.eDLocation as loc where loc.type = " + LocationType.ANE.getId()); hql.append(" and loc.isActive =:active"); hql.append(" and loc.isRIE is null"); hql.append(" and loc.isVirtual =:virtual"); hql.append(" order by loc.name asc "); List<?> locationList = factory.find(hql.toString(), new String[]{"active", "virtual"}, new Object[]{Boolean.TRUE, Boolean.FALSE}); return TrackingConfigurationVoAssembler.createTrackingConfigurationVoCollectionFromTrackingConfiguration(locationList); }