title: How to populate a complex list with sublist from SQLite?
body: <p>I have a structure of lists that I would like to populate from database. I've already mapped all tables and insertion methods. However I don't know what is the best approach to get all those data and populate my Java Objects. I have this structure: </p>
  
  <p><code></p>
  
  <pre><code>public class DailySchedule {
      private long id;
      private List&lt;Task&gt; tasks;
      private List&lt;Plan&gt; plans;
  }
  
  public class Task {
      private long id;
      private long duration;
      private String description;
      private Date date;
  }
  
  public class Plan {
      private long id;
      private String description;
      private Date date;
      private List&lt;User&gt; users;
  }
  
  public class User {
      private long id;
      private String name;
  }
  </code></pre>
  
  <p></code></p>
  
  <p>Should I create a huge INNERJOIN and get all the data (including repeated info) and try to populate the Java Objects or I should get all the Id's from each table and perform a loop in Java(using cursor) and perform Selects by ID's and populate the tables?</p>