title: JAVA:How to implement lazy loading of sql with join statement?
body: <p>for example,I have the sql with many join like this:</p>
  
  <pre><code>select * from TableA a left join TableB b on a.id=b.id left join TableC c on c.id=a.id where userid=123
  </code></pre>
  
  <p>Now I am trying to use java program to re-constructor the code like this(fake code).</p>
  
  <pre><code>List&lt;TableA&gt; a=sqlQuery("select * from tableA");
  List&lt;TableB&gt; a=sqlQuery("select * from tableB");
  var temp= a.Where(a.id==b.id&amp;&amp;a.userid==123);
  </code></pre>
  
  <p>I was a C# coder before,so I know EF or Linq has the lazy load mode to load context after all sql accomplished,like C#'s difference between IQueryable and ILIst, I don't know if Java can do the same thing,so anyone can help me?</p>