org.jdbcdslog
Class StatementLoggingHandler

java.lang.Object
  extended by org.jdbcdslog.LoggingHandlerSupport
      extended by org.jdbcdslog.StatementLoggingHandlerTemplate
          extended by org.jdbcdslog.StatementLoggingHandler
All Implemented Interfaces:
InvocationHandler

public class StatementLoggingHandler
extends StatementLoggingHandlerTemplate


Field Summary
protected  StringBuilder batchStatements
           
protected static Set<String> EXECUTE_METHODS
           
 
Fields inherited from class org.jdbcdslog.LoggingHandlerSupport
target, UNWRAP_METHOD_NAME
 
Constructor Summary
StatementLoggingHandler(Statement statement)
           
 
Method Summary
protected  void appendBatchStatements(StringBuilder sb)
           
protected  void appendStatement(StringBuilder sb, Object proxy, Method method, Object[] args)
           
protected  void doAddBatch(Object proxy, Method method, Object[] args)
           
protected  Object doAfterInvoke(Object proxy, Method method, Object[] args, Object result)
           
protected  void handleException(Throwable t, Object proxy, Method method, Object[] args)
           
protected  boolean needsLogging(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class org.jdbcdslog.StatementLoggingHandlerTemplate
getLogger, getSlowQueryLogger, invoke, isAddBatch, isExecuteBatch, logAfterInvoke, logBeforeInvoke, needsSlowOperationLogging
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXECUTE_METHODS

protected static final Set<String> EXECUTE_METHODS

batchStatements

protected StringBuilder batchStatements
Constructor Detail

StatementLoggingHandler

public StatementLoggingHandler(Statement statement)
Method Detail

needsLogging

protected boolean needsLogging(Object proxy,
                               Method method,
                               Object[] args)
Overrides:
needsLogging in class StatementLoggingHandlerTemplate

appendStatement

protected void appendStatement(StringBuilder sb,
                               Object proxy,
                               Method method,
                               Object[] args)
Specified by:
appendStatement in class StatementLoggingHandlerTemplate

doAddBatch

protected void doAddBatch(Object proxy,
                          Method method,
                          Object[] args)
Specified by:
doAddBatch in class StatementLoggingHandlerTemplate

appendBatchStatements

protected void appendBatchStatements(StringBuilder sb)
Specified by:
appendBatchStatements in class StatementLoggingHandlerTemplate

doAfterInvoke

protected Object doAfterInvoke(Object proxy,
                               Method method,
                               Object[] args,
                               Object result)
Overrides:
doAfterInvoke in class StatementLoggingHandlerTemplate

handleException

protected void handleException(Throwable t,
                               Object proxy,
                               Method method,
                               Object[] args)
                        throws Throwable
Overrides:
handleException in class StatementLoggingHandlerTemplate
Throws:
Throwable


Copyright © 2014. All rights reserved.