org.grails.datastore.gorm.finders
Class CountByFinder

java.lang.Object
  extended by org.grails.datastore.gorm.finders.AbstractFinder
      extended by org.grails.datastore.gorm.finders.DynamicFinder
          extended by org.grails.datastore.gorm.finders.CountByFinder
All Implemented Interfaces:
FinderMethod, QueryBuildingFinder

public class CountByFinder
extends DynamicFinder
implements QueryBuildingFinder

Supports counting objects. For example Book.countByTitle("The Stand")


Field Summary
 
Fields inherited from class org.grails.datastore.gorm.finders.DynamicFinder
ARGUMENT_CACHE, ARGUMENT_FETCH, ARGUMENT_IGNORE_CASE, ARGUMENT_LOCK, ARGUMENT_MAX, ARGUMENT_OFFSET, ARGUMENT_ORDER, ARGUMENT_SORT, ORDER_ASC, ORDER_DESC, pattern
 
Fields inherited from class org.grails.datastore.gorm.finders.AbstractFinder
datastore
 
Constructor Summary
CountByFinder(org.grails.datastore.mapping.core.Datastore datastore)
           
 
Method Summary
 org.grails.datastore.mapping.query.Query buildQuery(DynamicFinderInvocation invocation, org.grails.datastore.mapping.core.Session session)
          Build a query from an invocation
protected  java.lang.Object doInvokeInternal(DynamicFinderInvocation invocation)
           
protected  java.lang.Object invokeQuery(org.grails.datastore.mapping.query.Query q)
           
 
Methods inherited from class org.grails.datastore.gorm.finders.DynamicFinder
applyDetachedCriteria, configureQueryWithArguments, createFinderInvocation, findMethodExpression, getFetchMode, invoke, invoke, invoke, isMethodMatch, populateArgumentsForCriteria, registerNewMethodExpression, setPattern
 
Methods inherited from class org.grails.datastore.gorm.finders.AbstractFinder
applyAdditionalCriteria, execute, execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountByFinder

public CountByFinder(org.grails.datastore.mapping.core.Datastore datastore)
Method Detail

doInvokeInternal

protected java.lang.Object doInvokeInternal(DynamicFinderInvocation invocation)
Specified by:
doInvokeInternal in class DynamicFinder

invokeQuery

protected java.lang.Object invokeQuery(org.grails.datastore.mapping.query.Query q)

buildQuery

public org.grails.datastore.mapping.query.Query buildQuery(DynamicFinderInvocation invocation,
                                                           org.grails.datastore.mapping.core.Session session)
Description copied from interface: QueryBuildingFinder
Build a query from an invocation

Specified by:
buildQuery in interface QueryBuildingFinder
Parameters:
invocation - The invocation
session - an active session
Returns:
The query