(Quick Reference)
list
Purpose
Lists all of the instances of the domain class.
Examples
// list everything
def results = Book.list()
// list 10 results
def results = Book.list(max:10)
// list 10 results, offset by 100
def results = Book.list(max:10, offset:100)
// list 10 results, offset by 100, orderd by title in descending order
def results = Book.list(max:10, offset:100, sort:"-title")
Description
Parameters:
max
- The maximum number to list
offset
- The offset from the first result to list from
sort
- The property name to sort by