Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.orm.hibernate.metaclass
Class CountByPersistentMethod

    java.lang.Object
      org.codehaus.groovy.grails.commons.metaclass.AbstractStaticMethodInvocation
          org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractStaticPersistentMethod
              org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractClausedStaticPersistentMethod
                  org.codehaus.groovy.grails.orm.hibernate.metaclass.CountByPersistentMethod

All Implemented Interfaces:
  StaticMethodInvocation

    public class CountByPersistentMethod

extends AbstractClausedStaticPersistentMethod

Dynamic method that allows counting the values of the specified property names eg. Account.countByBranch('London') // returns how many accounts are in london

Since:
  04-May-2006
Author:
  Graeme Rocher

Nested Class Summary

Nested classes/interfaces inherited from class org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractClausedStaticPersistentMethod
`AbstractClausedStaticPersistentMethod.GrailsMethodExpression`

Field Summary

Fields inherited from class org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractClausedStaticPersistentMethod
`application`

Constructor Summary
`CountByPersistentMethod(GrailsApplication application, org.hibernate.SessionFactory sessionFactory, ClassLoader classLoader)`

Method Summary
`protected Object` | `doInvokeInternalWithExpressions(Class clazz, String methodName, Object[] arguments, List expressions, String operatorInUse, groovy.lang.Closure additionalCriteria)`
`protected void` | `populateCriteriaWithExpressions(org.hibernate.Criteria crit, String operator, List expressions)`

Methods inherited from class org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractClausedStaticPersistentMethod
`doInvokeInternal`

Methods inherited from class org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractStaticPersistentMethod
`getCriteria, getHibernateTemplate, invoke, invoke`

Methods inherited from class org.codehaus.groovy.grails.commons.metaclass.AbstractStaticMethodInvocation
`getPattern, isMethodMatch, setPattern, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CountByPersistentMethod

    public CountByPersistentMethod(GrailsApplication application,
                                   org.hibernate.SessionFactory sessionFactory,
                                   ClassLoader classLoader)

Method Detail

### doInvokeInternalWithExpressions

    protected Object doInvokeInternalWithExpressions(Class clazz,
                                                     String methodName,
                                                     Object[] arguments,
                                                     List expressions,
                                                     String operatorInUse,
                                                     groovy.lang.Closure additionalCriteria)

  Specified by:
    `doInvokeInternalWithExpressions` in class `AbstractClausedStaticPersistentMethod`

### populateCriteriaWithExpressions

    protected void populateCriteriaWithExpressions(org.hibernate.Criteria crit,
                                                   String operator,
                                                   List expressions)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2005-2009 The Grails project