public EmergencyAttendanceBillingVo getAttendanceBillingByEmergencyAttendance(EmergencyAttendanceRefVo emergencyAttendanceRef) { if (emergencyAttendanceRef == null || emergencyAttendanceRef.getID_EmergencyAttendance() == null) { throw new CodingRuntimeException("Cannot get EmergencyAttendanceBillingVo on null Id for EmergencyAttendance "); } DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); hql.append("select emergeAttBilling from EmergencyAttendanceBilling as emergeAttBilling left join emergeAttBilling.emergencyAttendence as emergeAtt where (emergeAtt.id = :emergAttID) "); List<?> list = factory.find(hql.toString(), new String[] { "emergAttID" }, new Object[] { emergencyAttendanceRef.getID_EmergencyAttendance() }); if (list!=null && list.size()>0) { return EmergencyAttendanceBillingVoAssembler.create((EmergencyAttendanceBilling) list.get(0)); } return null; }
public EmergencyAttendanceBillingVo getAttendanceBillingByEmergencyAttendance(EmergencyAttendanceRefVo emergencyAttendanceRef) { if (emergencyAttendanceRef == null || emergencyAttendanceRef.getID_EmergencyAttendance() == null) { throw new CodingRuntimeException("Cannot get EmergencyAttendanceBillingVo on null Id for EmergencyAttendance "); } DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); hql.append("select emergeAttBilling from EmergencyAttendanceBilling as emergeAttBilling left join emergeAttBilling.emergencyAttendence as emergeAtt where (emergeAtt.id = :emergAttID and (emergeAtt.isRIE is null or emergeAtt.isRIE = 0)) "); //WDEV-22956 List<?> list = factory.find(hql.toString(), new String[] { "emergAttID" }, new Object[] { emergencyAttendanceRef.getID_EmergencyAttendance() }); if (list!=null && list.size()>0) { return EmergencyAttendanceBillingVoAssembler.create((EmergencyAttendanceBilling) list.get(0)); } return null; }
public EmergencyAttendanceBillingVo getAttendanceBilling(EmergencyAttendanceBillingRefVo attendanceBillingRef) { if (attendanceBillingRef == null || attendanceBillingRef.getID_EmergencyAttendanceBilling() == null) { throw new CodingRuntimeException("Cannot get EmergencyAttendanceBillingVo on null Id "); } DomainFactory factory = getDomainFactory(); EmergencyAttendanceBilling domainEmergAttBilling = (EmergencyAttendanceBilling) factory.getDomainObject(EmergencyAttendanceBilling.class, attendanceBillingRef.getID_EmergencyAttendanceBilling()); return EmergencyAttendanceBillingVoAssembler.create(domainEmergAttBilling); }
public EmergencyAttendanceBillingVo save(EmergencyAttendanceBillingVo attendanceBillingToSave) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException { if (attendanceBillingToSave == null ) { throw new CodingRuntimeException("Cannot get EmergencyAttendanceBillingVo on null Id "); } DomainFactory factory = getDomainFactory(); EmergencyAttendanceBilling domainEmergAttBilling = EmergencyAttendanceBillingVoAssembler.extractEmergencyAttendanceBilling(factory,attendanceBillingToSave); factory.save(domainEmergAttBilling); return EmergencyAttendanceBillingVoAssembler.create(domainEmergAttBilling); }