public ReferralToSpecialtyTeamVo getReferralToSpecialty(ReferralToSpecTeamRefVo referralToSpecialtyRef) { DomainFactory factory = getDomainFactory(); if (referralToSpecialtyRef == null || referralToSpecialtyRef.getID_ReferralToSpecTeam()==null) { throw new CodingRuntimeException("Cannot get ReferralsToSpec on null Id "); } StringBuffer hql = new StringBuffer(); hql.append(" select Referral from ReferralToSpecTeam as Referral where Referral.id = :referralID"); List<?> list = factory.find(hql.toString(), new String[] { "referralID" }, new Object[] { referralToSpecialtyRef.getID_ReferralToSpecTeam() }); if (list != null && list.size() > 0) return ReferralToSpecialtyTeamVoAssembler.createReferralToSpecialtyTeamVoCollectionFromReferralToSpecTeam(list).get(0); return null; }
public ReferralToSpecialtyTeamForEventHistoryVo getReferralToSpecialty(ReferralToSpecTeamRefVo referralToSpecialty) { if(referralToSpecialty == null || referralToSpecialty.getID_ReferralToSpecTeam() == null) return null; ReferralToSpecTeam doReferral = (ReferralToSpecTeam) getDomainFactory().getDomainObject(ReferralToSpecTeam.class, referralToSpecialty.getID_ReferralToSpecTeam()); return ReferralToSpecialtyTeamForEventHistoryVoAssembler.create(doReferral); }