ResultSet rs = pstmt.getResultSet();
persons = new ArrayList<>();
while (rs.next())
{
Person person = new Person();
long id = rs.getLong("personID");
person.setId(id);
person.setFirstName(rs.getString("firstName"));
person.setLastName(rs.getString("lastName"));
person.setEmailList(emailDAO.getEmailsForUser(id));
person.setPhoneList(phoneDAO.getPhonesForUser(id));
persons.add(person);
}
}
}