Skip to content

Instantly share code, notes, and snippets.

@coderberry
Created October 6, 2010 16:11
Show Gist options
  • Select an option

  • Save coderberry/613587 to your computer and use it in GitHub Desktop.

Select an option

Save coderberry/613587 to your computer and use it in GitHub Desktop.
def c = Transaction.createCriteria()
def cnt = c.get {
projections {
sum("amount")
}
and {
eq("status", k)
eq("transactionType", transactionType)
ge("dateTimeProcessed", cal1.getTime())
le("dateTimeProcessed", cal2.getTime())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment