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

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.AbstractFindByPersistentMethod
                  extended by org.codehaus.groovy.grails.orm.hibernate.metaclass.FindByPersistentMethod
All Implemented Interfaces:
org.codehaus.groovy.grails.commons.metaclass.StaticMethodInvocation, org.grails.datastore.gorm.finders.FinderMethod
Direct Known Subclasses:
FindByBooleanPropertyPersistentMethod

public class FindByPersistentMethod
extends AbstractFindByPersistentMethod

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

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.AbstractFindByPersistentMethod
OPERATOR_AND, OPERATOR_OR, OPERATORS
 
Fields inherited from class org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractStaticPersistentMethod
application
 
Constructor Summary
FindByPersistentMethod(HibernateDatastore datastore, org.codehaus.groovy.grails.commons.GrailsApplication application, org.hibernate.SessionFactory sessionFactory, java.lang.ClassLoader classLoader)
          Constructor.
 
Method Summary
 
Methods inherited from class org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractFindByPersistentMethod
buildCriteria, doInvokeInternalWithExpressions, firstExpressionIsRequiredBoolean, getResult
 
Methods inherited from class org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractClausedStaticPersistentMethod
doInvokeInternal, doInvokeInternal, doInvokeInternal
 
Methods inherited from class org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractStaticPersistentMethod
getCriteria, getHibernateTemplate, invoke, invoke, invoke
 
Methods inherited from class org.codehaus.groovy.grails.commons.metaclass.AbstractStaticMethodInvocation
getPattern, isMethodMatch, setPattern, setPattern, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.grails.datastore.gorm.finders.FinderMethod
isMethodMatch, setPattern
 

Constructor Detail

FindByPersistentMethod

public FindByPersistentMethod(HibernateDatastore datastore,
                              org.codehaus.groovy.grails.commons.GrailsApplication application,
                              org.hibernate.SessionFactory sessionFactory,
                              java.lang.ClassLoader classLoader)
Constructor.

Parameters:
application -
sessionFactory -
classLoader -