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

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
                  extended by org.codehaus.groovy.grails.orm.hibernate.metaclass.FindAllByBooleanPropertyPersistentMethod
All Implemented Interfaces:
StaticMethodInvocation

public class FindAllByBooleanPropertyPersistentMethod
extends FindAllByPersistentMethod

The "findAllBy*" static persistent method. This method allows querying for instances of grails domain classes based on a boolean property and any other arbitrary properties. eg. Account.findAllActiveByHolder("Joe Blogs"); // Where class "Account" has a properties called "active" and "holder" Account.findAllActiveByHolderAndBranch("Joe Blogs", "London" ); // Where class "Account" has a properties called "active', "holder" and "branch" In both of those queries, the query will only select Account objects where active=true.

Author:
Jeff Brown

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
FindAllByBooleanPropertyPersistentMethod(GrailsApplication application, org.hibernate.SessionFactory sessionFactory, ClassLoader classLoader)
           
 
Method Summary
protected  boolean firstExpressionIsRequiredBoolean()
          Indicates if the first expression in the query is a required boolean property and as such should be ANDed to the other expressions, not ORed.
 
Methods inherited from class org.codehaus.groovy.grails.orm.hibernate.metaclass.FindAllByPersistentMethod
doInvokeInternalWithExpressions
 
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

FindAllByBooleanPropertyPersistentMethod

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

firstExpressionIsRequiredBoolean

protected boolean firstExpressionIsRequiredBoolean()
Description copied from class: FindAllByPersistentMethod
Indicates if the first expression in the query is a required boolean property and as such should be ANDed to the other expressions, not ORed.

Overrides:
firstExpressionIsRequiredBoolean in class FindAllByPersistentMethod
Returns:
true if the first expression is a required boolean property, false otherwise
See Also:
FindAllByBooleanPropertyPersistentMethod


Copyright (c) 2005-2009 The Grails project