I know it is a rookie question but how do I get the system to print what is in personList?
private void buildPersonOptions() {
List<Person> personList = null;
try {
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
Transaction tx = session.beginTransaction();
Query q = session.createQuery("from Person");
personList = (List<Person>) q.list();
} catch (Exception e) {
e.printStackTrace();
}
personOptions = new Option[personList.size()];
int i = 0;
for (Person person : personList) {
Option opt = new Option(person.getPersonId(), person.getName());
personOptions[i++] = opt;
}
}
possibly
while(personList.iterator().hasNext()){
personList.iterator();
}
Thanks
-Steve