title: Dynamic JPA 2.0 query using Criteria API
body: <p>I am a bit stucked constructing a dynamic query using the CriteriaBuilder of JPA 2.0.</p>
  
  <p>I have quite a common use case I guess: User supplies a arbitrary amount of search parameters X to be and / or concatenated: like : </p>
  
  <pre><code>select e from Foo where (name = X1 or name = X2 .. or name = Xn )
  </code></pre>
  
  <p>The Method or of CriteriaBuilder is not dynamic:</p>
  
  <p>Predicate or(Predicate... restrictions) </p>
  
  <p>Ideas? Samples?</p>