Groovy Documentation

org.codehaus.groovy.grails.orm.hibernate.metaclass
[Java] Class ListPersistentMethod

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.ListPersistentMethod

public class ListPersistentMethod
extends AbstractStaticPersistentMethod

The "list" persistent static method. This method lists of of the persistent instances up the maximum specified amount (if any) eg. Account.list(); // list all Account.list(max:10,offset:50,sort:"holder",order:"desc"); // list up to 10, offset by 50, sorted by holder and in descending order

Authors:
Graeme Rocher


Field Summary
 
Fields inherited from class AbstractStaticPersistentMethod
application
 
Constructor Summary
ListPersistentMethod(GrailsApplication grailsApplication, org.hibernate.SessionFactory sessionFactory, java.lang.ClassLoader classLoader)

 
Method Summary
protected java.lang.Object doInvokeInternal(java.lang.Class clazz, java.lang.String methodName, groovy.lang.Closure additionalCriteria, java.lang.Object[] arguments)

protected java.lang.Object doInvokeInternal(java.lang.Class clazz, java.lang.String methodName, grails.gorm.DetachedCriteria additionalCriteria, java.lang.Object[] arguments)

 
Methods inherited from class AbstractStaticPersistentMethod
doInvokeInternal, doInvokeInternal, getCriteria, getHibernateTemplate, invoke, invoke, invoke
 
Methods inherited from class AbstractStaticMethodInvocation
getPattern, invoke, isMethodMatch, setPattern, setPattern, toString
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Constructor Detail

ListPersistentMethod

public ListPersistentMethod(GrailsApplication grailsApplication, org.hibernate.SessionFactory sessionFactory, java.lang.ClassLoader classLoader)


 
Method Detail

doInvokeInternal

@Override
@SuppressWarnings("rawtypes")
protected java.lang.Object doInvokeInternal(java.lang.Class clazz, java.lang.String methodName, groovy.lang.Closure additionalCriteria, java.lang.Object[] arguments)


doInvokeInternal

@Override
protected Object doInvokeInternal(Class clazz, String methodName, DetachedCriteria additionalCriteria, Object[] arguments) {
protected java.lang.Object doInvokeInternal(java.lang.Class clazz, java.lang.String methodName, grails.gorm.DetachedCriteria additionalCriteria, java.lang.Object[] arguments)


 

Groovy Documentation