title: Using Reference VS getReference multiple calls to the same object
body: <p>Simply I want to ask which is better of the following cases:</p>
  
  <pre><code>import com.x.x.x.Document;
  .
  .
  Document doc=user.getDoc();
  MyFile file=Converter.getFile(doc.getFile());
  MyTheme theme=Converter.getTheme(doc.getTheme());
  </code></pre>
  
  <p>OR </p>
  
  <pre><code>MyFile file=Converter.getFile(user.getDoc().getFile());
  MyTheme theme=Converter.getTheme(user.getDoc().getTheme());
  </code></pre>
  
  <p>Since first case requires importing <code>Document</code> second doesn't and at the same time second requires multiple calls to <code>getDoc()</code> first doesn't so which is better Readability &amp; functionality </p>