title: java - map database tables into class
body: <p>When retrieving data from the database in Java, how can I get a instance of an class for each database row dynamically? </p>
  
  <p>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. </p>
  
  <p>Is there a class/default method to do this in Java?</p>