public Boolean isModeOfArrivalAmbulance(ModeOfArrival arrivalMode) { if (arrivalMode == null) return false; if (ModeOfArrival.AMBULANCE.equals(arrivalMode)) return true; String hql = "SELECT COUNT(amb.id) FROM AmbulanceArrivalsConfig AS amb LEFT JOIN amb.ambulanceArrivals AS ambArr LEFT JOIN ambArr.instance AS ambArrInst WHERE ambArrInst.id = :MODE_OF_ARRIVAL"; long count = getDomainFactory().countWithHQL(hql, new String[] {"MODE_OF_ARRIVAL"}, new Object[] {arrivalMode.getID()}); if (count > 0) return true; return false; }
public Boolean isAmbulanceArrival(ModeOfArrival arrivalMode) { if (arrivalMode == null) return false; if (ModeOfArrival.AMBULANCE.equals(arrivalMode)) return true; String hql = "SELECT COUNT(amb.id) FROM AmbulanceArrivalsConfig AS amb LEFT JOIN amb.ambulanceArrivals AS ambArr LEFT JOIN ambArr.instance AS ambArrInst WHERE ambArrInst.id = :MODE_OF_ARRIVAL"; long count = getDomainFactory().countWithHQL(hql, new String[] {"MODE_OF_ARRIVAL"}, new Object[] {arrivalMode.getID()}); if (count > 0) return true; return false; }
protected void onCmbModeOfArrivalValueChanged() throws PresentationLogicException { if (!ModeOfArrival.AMBULANCE.equals(form.cmbModeOfArrival().getValue())) { form.txtAmbulanceJobNo().setValue(null); } updateControlState(); }
protected void onCmbModeOfArrivalValueChanged() throws PresentationLogicException { if (!ModeOfArrival.AMBULANCE.equals(form.cmbModeOfArrival().getValue()) && !domain.isModeOfArrivalAmbulance(form.cmbModeOfArrival().getValue())) { form.dtimAmbulanceArrivalTime().setValue(null); form.txtAmbulanceJobNo().setValue(null); form.getLocalContext().setAmbulanceDetails(null); } updateControlState(); }