Altibase.jdbc.driver.logging

## Class StatementLoggingProxy

- java.lang.Object
- - Altibase.jdbc.driver.logging.LoggingProxy
  - - Altibase.jdbc.driver.logging.StatementLoggingProxy

All Implemented Interfaces:
  java.lang.reflect.InvocationHandler

Direct Known Subclasses:
  PreparedStmtLoggingProxy

    public class StatementLoggingProxy
    extends LoggingProxy

java.sql.Statement 인터페이스를 hooking하는 Proxy클래스

Author:
  yjpark

### Field Summary

Fields
`protected static java.lang.String` `METHOD_PREFIX_EXECUTE`

### Fields inherited from class Altibase.jdbc.driver.logging.LoggingProxy

`JDBC_LOGGER_ASYNCFETCH, JDBC_LOGGER_CM, JDBC_LOGGER_DEFAULT, JDBC_LOGGER_FAILOVER, JDBC_LOGGER_POOL, JDBC_LOGGER_ROWSET, JDBC_LOGGER_XA, METHOD_PREFIX_CLOSE, mLogger, mTarget, mTargetName`

### Constructor Summary

Constructors
Constructor and Description
`StatementLoggingProxy(java.lang.Object aTarget, java.sql.Connection aConn)`
`StatementLoggingProxy(java.lang.Object aTarget, java.lang.String aTargetName, java.sql.Connection aConn)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected java.lang.Object` `createProxyWithReturnValue(java.lang.Object aResult)` 메소드 실행결과를 이용해 필요하면 Proxy객체를 만들고 로그를 남긴다.
`java.lang.String` `getUniqueId()` Statement 같은 경우 Object의 hashcode를 unique id로 사용한다.
`void` `logSql(java.lang.reflect.Method aMethod, java.lang.Object aResult, java.lang.Object[] aArgs)` CONFIG레벨로 셋팅되었을 때 sql문을 출력한다.
`protected void` `logSqlTiming(java.lang.reflect.Method aMethod, long aStartTime)` sql문이 실행되는데 걸린 시간을 출력한다.

### Methods inherited from class Altibase.jdbc.driver.logging.LoggingProxy

`invoke, logClose, logReturnValue, makeArgStr`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### METHOD_PREFIX_EXECUTE

    protected static final java.lang.String METHOD_PREFIX_EXECUTE

See Also:
  Constant Field Values

### Constructor Detail

#### StatementLoggingProxy

    public StatementLoggingProxy(java.lang.Object aTarget,
                                 java.sql.Connection aConn)

#### StatementLoggingProxy

    public StatementLoggingProxy(java.lang.Object aTarget,
                                 java.lang.String aTargetName,
                                 java.sql.Connection aConn)

### Method Detail

#### logSql

    public void logSql(java.lang.reflect.Method aMethod,
                       java.lang.Object aResult,
                       java.lang.Object[] aArgs)

Description copied from class: `LoggingProxy`
CONFIG레벨로 셋팅되었을 때 sql문을 출력한다.

Overrides:
  `logSql` in class `LoggingProxy`

#### logSqlTiming

    protected void logSqlTiming(java.lang.reflect.Method aMethod,
                                long aStartTime)

Description copied from class: `LoggingProxy`
sql문이 실행되는데 걸린 시간을 출력한다.

Overrides:
  `logSqlTiming` in class `LoggingProxy`

#### createProxyWithReturnValue

    protected java.lang.Object createProxyWithReturnValue(java.lang.Object aResult)

Description copied from class: `LoggingProxy`
메소드 실행결과를 이용해 필요하면 Proxy객체를 만들고 로그를 남긴다.

Overrides:
  `createProxyWithReturnValue` in class `LoggingProxy`
Returns:

#### getUniqueId

    public java.lang.String getUniqueId()

Statement 같은 경우 Object의 hashcode를 unique id로 사용한다.

Overrides:
  `getUniqueId` in class `LoggingProxy`