nl.knowledgeplaza.util.jdbc
Class CallableStatement

java.lang.Object
  extended by nl.knowledgeplaza.util.jdbc.PreparedStatement
      extended by nl.knowledgeplaza.util.jdbc.CallableStatement
All Implemented Interfaces:
InvocationHandler

public class CallableStatement
extends PreparedStatement

This is for logging SQL statements to log4j. Use the wrap method in Connection to wrap a connection object and that is it.

Version:
$Revision: 1.3 $

Field Summary
static String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
 
Constructor Summary
protected CallableStatement(CallableStatement callableStatement)
           
 
Method Summary
 CallableStatement getCallableStatement()
          returns the original object for handling driver specific functions
 String getMyPrefix()
           
 Object invoke(Object proxy, Method method, Object[] args)
           
static CallableStatement wrapCallableStatement(CallableStatement callableStatement, String sql, Connection connection)
           
 
Methods inherited from class nl.knowledgeplaza.util.jdbc.PreparedStatement
getConnection, getPreparedStatement, getSql, setConnection, setSql, wrapPreparedStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCECODE_VERSION

public static final String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values
Constructor Detail

CallableStatement

protected CallableStatement(CallableStatement callableStatement)
Method Detail

getCallableStatement

public CallableStatement getCallableStatement()
returns the original object for handling driver specific functions


wrapCallableStatement

public static CallableStatement wrapCallableStatement(CallableStatement callableStatement,
                                                      String sql,
                                                      Connection connection)
Parameters:
callableStatement -
Returns:

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Overrides:
invoke in class PreparedStatement
Throws:
Throwable

getMyPrefix

public String getMyPrefix()
Overrides:
getMyPrefix in class PreparedStatement


Copyright © 2011 KnowledgePlaza. All Rights Reserved.