org.codehaus.groovy.grails.orm.hibernate.metaclass
Class FindByPersistentMethod
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.FindByPersistentMethod
- All Implemented Interfaces:
- StaticMethodInvocation
public class FindByPersistentMethod
- extends AbstractClausedStaticPersistentMethod
The "findBy*" static persistent method. This method allows querying for
instances of grails domain classes based on their properties. This method returns the first result of the query
eg.
Account.findByHolder("Joe Blogs"); // Where class "Account" has a property called "holder"
Account.findByHolderAndBranch("Joe Blogs", "London" ); // Where class "Account" has a properties called "holder" and "branch"
- Since:
- 31-Aug-2005
- Author:
- Graeme Rocher
FindByPersistentMethod
public FindByPersistentMethod(GrailsApplication application,
org.hibernate.SessionFactory sessionFactory,
ClassLoader classLoader)
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