How can I get ALL the data from a table of my DB (mySQL) using hibernate, and store the output into List of Objects?
I'll use this List, to populate a JTable.
How can I get ALL the data from a table of my DB (mySQL) using hibernate, and store the output into List of Objects?
I'll use this List, to populate a JTable.
If you use findAll(), which should be a part of the GenericDAO, it returns everything as a List.
What about:
Query q = session.createQuery("from Foo");
List foos = q.list();
Where Foo
is an entity mapped on your table. But maybe I missed something.