title: Working with hibernate multiple Criteria with logical AND
body: <p>So far i've been working with only a case with 2 properties with and as logical operator so i use LogicalExpression like so</p>
  
  <pre><code>Criterion eqRef = Restrictions.eq("referenceID", referenceId);
  Criterion eqType = Restrictions.eq("verificationType", type);
  LogicalExpression and = Restrictions.and(eqRef, eqType);
  </code></pre>
  
  <p>this time along its more than 2 so i'm a bit confused.say this time i've added username property i can do the normal chaining with</p>
  
  <pre><code>session.createCriteria(this.getPersistentClass())
  .add(Restrictions.eq("referenceID", referenceId))
  .add(Restrictions.eq("verificationType", type))
  .add(Restrictions.eq("username", username))
  .list();
  </code></pre>
  
  <p>but now i don't know which kind of logical operator used between them.i'm also tempted to do this:</p>
  
  <pre><code>Criterion eqRef = Restrictions.eq("referenceID", referenceId);
  Criterion eqType = Restrictions.eq("verificationType", type);
  Criterion equsername = Restrictions.eq("username", username);
  LogicalExpression and = Restrictions.and(eqRef, eqType);
  LogicalExpression secondand = Restrictions.and(and, equsername);
  </code></pre>
  
  <p>i've see the eqAll too but i've never used it before.So do you have any idea about that?How do you do it, and thanks for reading this.</p>