createCriteria and list syntax in Grails-Groovy
i im trying to understand the groovy-grails language 

im checking the createCriteria method [here][1]


  [1]: http://grails.org/doc/1.3.7/ref/Domain%20Classes/createCriteria.html

This statement declares a HibernateCriteriaBuilder object

    def c = Account.createCriteria()

and then it calls

    def results = c.list {
     like("holderFirstName", "Fred%")
     and {
        between("balance", 500, 1000)
        eq("branch", "London")
     }
    }

However, from the api, the HibernateCriteriaBuilder doesnt have any list() method. Do i miss something?


Also, can someone explain to me the more complicated **syntax** of the following:
    
    def results = c.list (max: 10, offset: 10) {
       like("holderFirstName", "Fred%")
    }

Is it a list method that takes two arguments and a closure??
createCriteria and list syntax in Grails-Groovy
===

i im trying to understand the groovy-grails language 

im checking the createCriteria method [here][1]


  [1]: http://grails.org/doc/1.3.7/ref/Domain%20Classes/createCriteria.html

This statement declares a HibernateCriteriaBuilder object

    def c = Account.createCriteria()

and then it calls

    def results = c.list {
     like("holderFirstName", "Fred%")
     and {
        between("balance", 500, 1000)
        eq("branch", "London")
     }
    }

However, from the api, the HibernateCriteriaBuilder doesnt have any list() method. Do i miss something?


Also, can someone explain to me the more complicated **syntax** of the following:
    
    def results = c.list (max: 10, offset: 10) {
       like("holderFirstName", "Fred%")
    }

Is it a list method that takes two arguments and a closure??