|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.sql.GroovyResultSetProxy
public final class GroovyResultSetProxy
GroovyResultSetProxy is used to create a proxy for GroovyResultSet. Due to the version incompatibility between java 6 and older versions methods with additional logic were moved into an extension class. When getting properties or calling methods, the runtime will try to first execute these on the extension and then on the ResultSet itself. This way it is possible to replace and add methods. To overload methods from ResultSet all methods have to be implemented on the extension class.
Constructor Summary | |
---|---|
GroovyResultSetProxy(GroovyResultSetExtension ext)
Creates a new proxy instance with a custom extension. |
|
GroovyResultSetProxy(ResultSet set)
Creates a new proxy instance. |
Method Summary | |
---|---|
GroovyResultSet |
getImpl()
Gets a proxy instance that can be used as GroovyResultSet. |
Object |
invoke(Object proxy,
Method method,
Object[] args)
Invokes a method for the GroovyResultSet. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GroovyResultSetProxy(ResultSet set)
set
- the result set to delegate toGroovyResultSetExtension
public GroovyResultSetProxy(GroovyResultSetExtension ext)
ext
- the extensionGroovyResultSetExtension
Method Detail |
---|
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
proxy
- the result setmethod
- the method name of this method will be used
to make a call on the extension. If this fails the call will be
done on the proxy insteadargs
- for the call
Throwable
ResultSet
,
InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
public GroovyResultSet getImpl()
|
Copyright © 2003-2012 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |