org.codehaus.groovy.grails.orm.hibernate.metaclass
Class FindAllByPersistentMethod

java.lang.Object
  extended by org.codehaus.groovy.grails.commons.metaclass.AbstractStaticMethodInvocation
      extended by org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractStaticPersistentMethod
          extended by org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractClausedStaticPersistentMethod
              extended by org.codehaus.groovy.grails.orm.hibernate.metaclass.FindAllByPersistentMethod
All Implemented Interfaces:
StaticMethodInvocation

public class FindAllByPersistentMethod
extends AbstractClausedStaticPersistentMethod

The "findBy*" static persistent method. This method allows querying for instances of grails domain classes based on their properties. This method returns a list of all found results eg. Account.findAllByHolder("Joe Blogs"); // Where class "Account" has a property called "holder" Account.findAllByHolderAndBranch("Joe Blogs", "London" ); // Where class "Account" has a properties called "holder" and "branch"

Since:
13-Dec-2005
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
FindAllByPersistentMethod(GrailsApplication application, org.hibernate.SessionFactory sessionFactory, ClassLoader classLoader)
           
 
Method Summary
protected  Object doInvokeInternalWithExpressions(Class clazz, String methodName, Object[] arguments, List expressions, String operatorInUse)
           
 
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
getHibernateTemplate, 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

FindAllByPersistentMethod

public FindAllByPersistentMethod(GrailsApplication application,
                                 org.hibernate.SessionFactory sessionFactory,
                                 ClassLoader classLoader)
Method Detail

doInvokeInternalWithExpressions

protected Object doInvokeInternalWithExpressions(Class clazz,
                                                 String methodName,
                                                 Object[] arguments,
                                                 List expressions,
                                                 String operatorInUse)
Specified by:
doInvokeInternalWithExpressions in class AbstractClausedStaticPersistentMethod


Copyright (c) 2005-2006 The Grails project