title: How to use Hibernate Criteria objects for multiple and/or conditions
body: <p>I need to create a Hibernate criteria restriction that ors 3 Conditions.  The problem is that the last condition is acutally to conditions using the AND operator.</p>
  
  <p>My first condition:</p>
  
  <pre><code>Criterion startInRange = Restrictions.between("expectedStartCanonicDate", 
                                                 rangeStart, rangeEnd);
  </code></pre>
  
  <p>My second condition:</p>
  
  <pre><code>Criterion endInRange = Restrictions.between("expectedCompletionCanonicDate", 
                                               rangeStart, rangeEnd);
  </code></pre>
  
  <p>MY third condition needs to AND the following two conditions together:</p>
  
  <pre><code>criteria.add(Restrictions.le("expectedStartCanonicDate", rangeStart));
  criteria.add(Restrictions.ge("expectedCompletionCanonicDate", rangeEnd));
  </code></pre>
  
  <p>The restriction I want to do is condition1 or condition2 or condition3. I have found examples that get me close.  I can use a LogicalExpression to or the first two conditions together, however, I'm not sure how to <code>or</code> 3 conditions, particularly when the last condition is really two separate conditions '<code>anded</code>' together.</p>
  
  <p>Any Thoughts?
  Fred</p>