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

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.ExecuteQueryPersistentMethod
All Implemented Interfaces:
StaticMethodInvocation

public class ExecuteQueryPersistentMethod
extends AbstractStaticPersistentMethod

Allows the executing of abituary HQL queries

eg. Account.executeQuery( "select distinct a.number from Account a where a.branch = ?", 'London' ) or Account.executeQuery( "select distinct a.number from Account a where a.branch = :branch", [branch:'London'] )

Since:
30-Apr-2006
Author:
Graeme Rocher, Sergey Nebolsin
See Also:
http://www.hibernate.org/hib_docs/reference/en/html/queryhql.html

Constructor Summary
ExecuteQueryPersistentMethod(org.hibernate.SessionFactory sessionFactory, ClassLoader classLoader)
           
 
Method Summary
protected  Object doInvokeInternal(Class clazz, String methodName, Object[] arguments)
           
 
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

ExecuteQueryPersistentMethod

public ExecuteQueryPersistentMethod(org.hibernate.SessionFactory sessionFactory,
                                    ClassLoader classLoader)
Method Detail

doInvokeInternal

protected Object doInvokeInternal(Class clazz,
                                  String methodName,
                                  Object[] arguments)
Specified by:
doInvokeInternal in class AbstractStaticPersistentMethod


Copyright (c) 2005-2009 The Grails project