private Participant rebuildParticipant(int userID) throws DoesNotExistException { Participant participant = new Participant( userID, usersTable.getFirstName(userID), usersTable.getLastName(userID), usersTable.getEmail(userID)); participant.setPhoneNumber(new PhoneNumber(usersTable.getPhone(userID))); participant.setAddress( new Address( usersTable.getStreet(userID), usersTable.getCity(userID), usersTable.getState(userID), usersTable.getZipcode(userID), usersTable.getCountry(userID))); return participant; }
private User rebuildUser(int userID) throws DoesNotExistException { User user = new User( userID, usersTable.getFirstName(userID), usersTable.getLastName(userID), usersTable.getEmail(userID), usersTable.getPwd(userID)); user.setAdminPrivilege(usersTable.getLevel(userID) == 1 ? true : false); user.setEventCreationPrivilege( usersTable.getEventCreationPrivilege(userID) == 1 ? true : false); user.setPhoneNumber(new PhoneNumber(usersTable.getPhone(userID))); user.setAddress( new Address( usersTable.getStreet(userID), usersTable.getCity(userID), usersTable.getState(userID), usersTable.getZipcode(userID), usersTable.getCountry(userID))); return user; }