org.codehaus.groovy.grails.orm.hibernate.metaclass
Class GetPersistentMethod
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.GetPersistentMethod
- All Implemented Interfaces:
- StaticMethodInvocation
public class GetPersistentMethod
- extends AbstractStaticPersistentMethod
The "get" static persistent method for Grails domain classes. This method
takes an id and returns the instance
eg. Account.get(2)
Or an HQL query and tries to retrieve a unique result (note an exception is thrown if the result is not unique)
eg. Account.get("from Account as a where a.id=2)
- Author:
- Graeme Rocher
METHOD_SIGNATURE
public static final String METHOD_SIGNATURE
- See Also:
- Constant Field Values
GetPersistentMethod
public GetPersistentMethod(GrailsApplication application,
org.hibernate.SessionFactory sessionFactory,
ClassLoader classLoader)
doInvokeInternal
protected Object doInvokeInternal(Class clazz,
String methodName,
Object[] arguments)
- Specified by:
doInvokeInternal
in class AbstractStaticPersistentMethod
Copyright (c) 2005-2006 The Grails project