public UserEmailAccountVo getEmailAppUser(Integer appUserId) { if (appUserId == null) throw new CodingRuntimeException("Mandatory Argument - Application User Id"); DomainFactory factory = getDomainFactory(); String hql = "select u1_1 from UserEmailAccount as u1_1 left join u1_1.appUser as a1_1 where (u1_1.appUser.id = :appUserId)"; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); markers.add("appUserId"); values.add(appUserId); List UserEmailAcountList = factory.find(hql, markers, values); if (UserEmailAcountList != null && UserEmailAcountList.size() > 0) { UserEmailAccountVo voUserEmail = UserEmailAccountVoAssembler.createUserEmailAccountVoCollectionFromUserEmailAccount(UserEmailAcountList).get(0); return voUserEmail; } return null; }
public UserEmailAccountVo getEmailData(AppUserRefVo appUser) { IMSCriteria imsc=new IMSCriteria (AppUser.class,getDomainFactory()); imsc.equal("id", appUser.getID_AppUser()); List users = imsc.find(); if (users.size()>0) { AppUser user= (AppUser) users.get(0); return UserEmailAccountVoAssembler.create(user.getEmailAccount()); } else return null; }
public UserEmailAccountVo getEmailAppUser(Integer appUserId) { DomainFactory factory = getDomainFactory(); return UserEmailAccountVoAssembler.create((UserEmailAccount)factory.getDomainObject(UserEmailAccount.class, appUserId)); }