public HospitalAtNightCutOverPointsConfigVo getCurrentHospitalAtNightConfig(ILocation currentHospital) { if(currentHospital == null) return null; DomainFactory factory = getDomainFactory(); List<?> config = factory.find("from HospitalAtNightCutOverPointsConfig as h where h.hospital.id = :HospitalId", new String[] {"HospitalId"}, new Object[] {currentHospital.getID()}); if(config == null || config.size() == 0) return null; return HospitalAtNightCutOverPointsConfigVoAssembler.create((HospitalAtNightCutOverPointsConfig) config.get(0)); }
public HospitalAtNightCutOverPointsConfigVo getCurrentHospitalAtNightConfig(ILocation currentLocation) { if(currentLocation == null) return null; DomainFactory factory = getDomainFactory(); Location currentHospital = getHospital((Location) factory.getDomainObject(Location.class, currentLocation.getID())); if(currentHospital == null) return null; List<?> config = factory.find("from HospitalAtNightCutOverPointsConfig as h where h.hospital.id = :HospitalId", new String[] {"HospitalId"}, new Object[] {currentHospital.getId()}); if(config == null || config.size() == 0) return null; return HospitalAtNightCutOverPointsConfigVoAssembler.create((HospitalAtNightCutOverPointsConfig) config.get(0)); }