title: Have parameters in Dao methods to get entities the most efficient way for read-only access
body: <p>Allot of my use of hibernate, at least for that data that is presented on many parts of the web application, is for read-only purposes.</p>
  
  <p>I want to add some parameters to my Dao methods so I can modify the way hibernate pulls the data and how it handles transactions etc.</p>
  
  <p><strong>By 'pulls the data' I altering the locking and not having session worry about monitoring changes to the entities since I want read-only, read-uncommited (and any other performance tweaks there are?).</strong></p>
  
  <p>Example usage:
  Data on the front page of my website is displayed to the users, it is read-only, so I want to avoid any session/entity tracking that hibernate usually does.</p>
  
  <p>This is data that is read-only, will not be changed in this transaction, etc.</p>
  
  <p>What would be the most performant way to pull the data?</p>
  
  <p><strong>(the code below is c#/nhibernate, I'm implementing this in java as I learn it)</strong></p>
  
  <pre><code>public IList&lt;Article&gt; GetArticles()
  {
      return Session.CreateCriteria(typeof(Article))
                    // some where cluase
  }
  </code></pre>