title: Can you combine controller list params with Hibernate criteria?
body: <p>I have noticed that you can pass "params" straight in to the boilerplate code below:</p>
  
  <pre><code>[fooInstanceList: Foo.list(params), fooInstanceTotal: Foo.count()]
  </code></pre>
  
  <p>Is it possible to pass "params" in as part of a Hibernate criteria for example the one below?</p>
  
  <pre><code>def c = Foo.createCriteria()
      def results = c {
          not { eq("bar","test") }
      }
  
      [fooInstanceList: results, fooInstanceTotal: results.size()]
  </code></pre>
  
  <p>I am looking to use the "max" and "offset" params so I can use it for paging for example. I would also like to use the equivalent of count that counts all non-paged results. I think results.size() would only give me paged results, instead of the desired non-paged results. How would I go about this?</p>