public MemberDTO getMember(String Id) { Member m = new Member(); DBFacadeInterface db = DBFacade.getInstance(); db.beginTransaction(); m = db.get(Member.class, Id); db.commitTransaction(); return DTOMapper.getMapper().map(m, MemberDTO.class); }
public List<MemberDTO> getMember(String fname, String lname, String birthday) { DBFacade db = DBFacade.getInstance(); db.beginTransaction(); Set<Member> memberSet = db.getPersonByName(fname, lname, birthday); db.commitTransaction(); List<MemberDTO> memberList = new LinkedList<>(); for (Member member : memberSet) { memberList.add(DTOMapper.getMapper().map(member, MemberDTO.class)); } return memberList; }