Package mondrian.rolap
Class SqlStatement.MyDelegatingInvocationHandler
- java.lang.Object
-
- mondrian.util.DelegatingInvocationHandler
-
- mondrian.rolap.SqlStatement.MyDelegatingInvocationHandler
-
- All Implemented Interfaces:
InvocationHandler
- Enclosing class:
- SqlStatement
public static class SqlStatement.MyDelegatingInvocationHandler extends DelegatingInvocationHandler
Reflectively implements theResultSet
interface by routing method calls to the result set inside aSqlStatement
. When the result set is closed, so is the SqlStatement, and hence the JDBC connection and statement also.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Helper method to implementResultSet.close()
.protected Object
getTarget()
Returns the object to forward method calls to, should the derived class not implement the method.-
Methods inherited from class mondrian.util.DelegatingInvocationHandler
invoke
-
-
-
-
Method Detail
-
getTarget
protected Object getTarget() throws InvocationTargetException
Description copied from class:DelegatingInvocationHandler
Returns the object to forward method calls to, should the derived class not implement the method. Generally, this object will be a member of the derived class, supplied as a parameter to its constructor.The default implementation returns null, which will cause the
DelegatingInvocationHandler.invoke(Object, java.lang.reflect.Method, Object[])
method to throw anUnsupportedOperationException
if the derived class does not have the required method.- Overrides:
getTarget
in classDelegatingInvocationHandler
- Returns:
- object to forward method calls to
- Throws:
InvocationTargetException
- if there is an error acquiring the target
-
close
public void close() throws SQLException
Helper method to implementResultSet.close()
.- Throws:
SQLException
- on error
-
-