When retrieving data from the database in Java, how can I get a instance of an class for each database row dynamically?
Example: I've got two tables (Table1: id, name, Table2: id, name, age) and two classes with the same properties. For every row in Table1 I want an List-item (or something related) for this row.
Is there a class/default method to do this in Java?