Altibase.jdbc.driver

## Class AltibaseConnection

- java.lang.Object
- - Altibase.jdbc.driver.WrapperAdapter
  - - Altibase.jdbc.driver.AbstractConnection
    - - Altibase.jdbc.driver.AltibaseConnection

All Implemented Interfaces:
  java.lang.AutoCloseable, java.sql.Connection, java.sql.Wrapper

    public final class AltibaseConnection
    extends AbstractConnection

### Field Summary

Fields
`static byte` `EXPLAIN_PLAN_OFF`
`static byte` `EXPLAIN_PLAN_ON`
`static byte` `EXPLAIN_PLAN_ONLY`
`static java.lang.String` `PROP_APPLICATION_NAME`

### Fields inherited from class Altibase.jdbc.driver.AbstractConnection

`mIsClosed`

### Fields inherited from interface java.sql.Connection

`TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`void` `abort(java.util.concurrent.Executor aExecutor)`
`boolean` `canReUseResultSet()`
`protected void` `clearAsyncPrefetchStatement()` Asynchronous fetch 기능이 동작 중인 statement 를 저장한다.
`void` `clearWarnings()`
`void` `close()`
`void` `commit()`
`java.sql.Blob` `createBlob()`
`java.sql.Clob` `createClob()`
`java.sql.Statement` `createStatement()`
`java.sql.Statement` `createStatement(int aResultSetType, int aResultSetConcurrency)`
`java.sql.Statement` `createStatement(int aResultSetType, int aResultSetConcurrency, int aResultSetHoldability)`
`void` `deregisterFailoverCallback()`
`boolean` `getAllowLobNullSelect()`
`protected AltibaseStatement` `getAsyncPrefetchStatement()` Asynchronous fetch 기능이 동작 중인 statement 를 얻는다.
`boolean` `getAutoCommit()`
`boolean` `getBatchSetBytesUseLob()`
`java.lang.String` `getCatalog()`
`java.lang.String[]` `getCipherSuiteList()` PROJ-2474 가능한 ciphersuite 리스트를 돌려준다.
`java.util.Properties` `getClientInfo()`
`java.lang.String` `getClientInfo(java.lang.String aName)`
`Altibase.jdbc.driver.AltibaseFailoverServerInfo` `getCurrentFailoverServerInfo()`
`java.lang.String` `getDatabaseVersion()` 연결된 DB의 패키지 버전을 얻는다.
`java.lang.String` `getDbTimeZone()` 서버에 설정된 TimeZone을 얻는다.
`int` `getHoldability()`
`java.sql.DatabaseMetaData` `getMetaData()`
`int` `getNetworkTimeout()`
`boolean` `getProceduresReturnFunctions()`
`int` `getSessionId()`
`java.lang.String` `getSessionTimeZone()` Session에 설정된 TimeZone을 얻는다.
`int` `getTransactionIsolation()`
`int` `getTransTimeout()`
`java.util.Map` `getTypeMap()`
`java.lang.String` `getURL()`
`static java.lang.String` `getURL(java.util.Properties aProps)` DB 연결 정보가 담긴 Properties를 이용해 URL string을 얻는다.
`java.lang.String` `getUserName()`
`java.sql.SQLWarning` `getWarnings()`
`boolean` `isClientSideAutoCommit()`
`boolean` `isClosed()`
`boolean` `isReadOnly()`
`boolean` `isValid(int aTimeout)`
`java.lang.String` `nativeSQL(java.lang.String aSql)`
`void` `ping()` BUG-39149 handshake 프로토콜을 이용해 커넥션이 유효한지 체크한다.
`java.sql.CallableStatement` `prepareCall(java.lang.String aSql)`
`java.sql.CallableStatement` `prepareCall(java.lang.String aSql, int aResultSetType, int aResultSetConcurrency)`
`java.sql.CallableStatement` `prepareCall(java.lang.String aSql, int aResultSetType, int aResultSetConcurrency, int aResultSetHoldability)`
`java.sql.PreparedStatement` `prepareStatement(java.lang.String aSql)`
`java.sql.PreparedStatement` `prepareStatement(java.lang.String aSql, int aAutoGeneratedKeys)`
`java.sql.PreparedStatement` `prepareStatement(java.lang.String aSql, int[] aColumnIndexes)`
`java.sql.PreparedStatement` `prepareStatement(java.lang.String aSql, int aResultSetType, int aResultSetConcurrency)`
`java.sql.PreparedStatement` `prepareStatement(java.lang.String aSql, int aResultSetType, int aResultSetConcurrency, int aResultSetHoldability)`
`java.sql.PreparedStatement` `prepareStatement(java.lang.String aSql, java.lang.String[] aColumnNames)`
`void` `registerFailoverCallback(AltibaseFailoverCallback aFailoverCallback, java.lang.Object aAppContext)`
`void` `registerMessageCallback(AltibaseMessageCallback aMessageCallback)` DB Message 프로토콜을 처리할 콜백을 등록한다.
`void` `releaseSavepoint(java.sql.Savepoint aSavepoint)`
`void` `rollback()`
`void` `rollback(java.sql.Savepoint aSavepoint)`
`protected boolean` `setAsyncPrefetchStatement(AltibaseStatement aStatement)` Asynchronous fetch 기능이 동작 중인 statement 를 저장한다.
`void` `setAutoCommit(boolean aAutoCommit)`
`void` `setCatalog(java.lang.String aCatalog)`
`void` `setClientInfo(java.util.Properties aProperties)`
`void` `setClientInfo(java.lang.String aName, java.lang.String aValue)`
`void` `setExplainPlan(boolean aUseExplainPlan)` Deprecated. Replaced by `setExplainPlan(byte)`
`void` `setExplainPlan(byte aExplainPlanMode)` Explain Plan Mode를 설정한다.
`void` `setHoldability(int aHoldability)`
`void` `setNetworkTimeout(java.util.concurrent.Executor aExecutor, int aMilliseconds)`
`void` `setReadOnly(boolean aReadOnly)`
`java.sql.Savepoint` `setSavepoint()`
`java.sql.Savepoint` `setSavepoint(java.lang.String aName)`
`void` `setSessionTimeZone(java.lang.String aTimeZone)` Session TimeZone을 바꾼다.
`void` `setTransactionIsolation(int aLevel)`
`void` `setTransTimeout(int aTimeoutSec)`
`void` `setTypeMap(java.util.Map map)`

### Methods inherited from class Altibase.jdbc.driver.AbstractConnection

`createArrayOf, createNClob, createSQLXML, createStruct, getSchema, setSchema`

### Methods inherited from class Altibase.jdbc.driver.WrapperAdapter

`isWrapperFor, unwrap`

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

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

### Methods inherited from interface java.sql.Wrapper

`isWrapperFor, unwrap`

### Field Detail

#### EXPLAIN_PLAN_OFF

    public static final byte EXPLAIN_PLAN_OFF

See Also:
  Constant Field Values

#### EXPLAIN_PLAN_ON

    public static final byte EXPLAIN_PLAN_ON

See Also:
  Constant Field Values

#### EXPLAIN_PLAN_ONLY

    public static final byte EXPLAIN_PLAN_ONLY

See Also:
  Constant Field Values

#### PROP_APPLICATION_NAME

    public static final java.lang.String PROP_APPLICATION_NAME

See Also:
  Constant Field Values

### Method Detail

#### ping

    public void ping()
              throws java.sql.SQLException

BUG-39149 handshake 프로토콜을 이용해 커넥션이 유효한지 체크한다.

Throws:
  `java.sql.SQLException`

#### getURL

    public java.lang.String getURL()

#### getURL

    public static java.lang.String getURL(java.util.Properties aProps)

DB 연결 정보가 담긴 Properties를 이용해 URL string을 얻는다.

Parameters:
  `aProps` - DB 연결 정보가 담긴 Properties
Returns:
  URL string

#### clearWarnings

    public void clearWarnings()
                       throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### close

    public void close()
               throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getSessionId

    public int getSessionId()

#### commit

    public void commit()
                throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### createStatement

    public java.sql.Statement createStatement()
                                       throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### createStatement

    public java.sql.Statement createStatement(int aResultSetType,
                                              int aResultSetConcurrency)
                                       throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### createStatement

    public java.sql.Statement createStatement(int aResultSetType,
                                              int aResultSetConcurrency,
                                              int aResultSetHoldability)
                                       throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getAutoCommit

    public boolean getAutoCommit()
                          throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getCatalog

    public java.lang.String getCatalog()
                                throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getUserName

    public java.lang.String getUserName()
                                 throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getHoldability

    public int getHoldability()
                       throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getMetaData

    public java.sql.DatabaseMetaData getMetaData()
                                          throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getTransactionIsolation

    public int getTransactionIsolation()
                                throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getTypeMap

    public java.util.Map getTypeMap()
                             throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getWarnings

    public java.sql.SQLWarning getWarnings()
                                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### isClosed

    public boolean isClosed()
                     throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### isReadOnly

    public boolean isReadOnly()
                       throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### nativeSQL

    public java.lang.String nativeSQL(java.lang.String aSql)
                               throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### prepareCall

    public java.sql.CallableStatement prepareCall(java.lang.String aSql,
                                                  int aResultSetType,
                                                  int aResultSetConcurrency,
                                                  int aResultSetHoldability)
                                           throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### prepareCall

    public java.sql.CallableStatement prepareCall(java.lang.String aSql,
                                                  int aResultSetType,
                                                  int aResultSetConcurrency)
                                           throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### prepareCall

    public java.sql.CallableStatement prepareCall(java.lang.String aSql)
                                           throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### prepareStatement

    public java.sql.PreparedStatement prepareStatement(java.lang.String aSql,
                                                       int aResultSetType,
                                                       int aResultSetConcurrency)
                                                throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### prepareStatement

    public java.sql.PreparedStatement prepareStatement(java.lang.String aSql,
                                                       int aResultSetType,
                                                       int aResultSetConcurrency,
                                                       int aResultSetHoldability)
                                                throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### prepareStatement

    public java.sql.PreparedStatement prepareStatement(java.lang.String aSql,
                                                       int aAutoGeneratedKeys)
                                                throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### prepareStatement

    public java.sql.PreparedStatement prepareStatement(java.lang.String aSql,
                                                       int[] aColumnIndexes)
                                                throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### prepareStatement

    public java.sql.PreparedStatement prepareStatement(java.lang.String aSql,
                                                       java.lang.String[] aColumnNames)
                                                throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### prepareStatement

    public java.sql.PreparedStatement prepareStatement(java.lang.String aSql)
                                                throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### releaseSavepoint

    public void releaseSavepoint(java.sql.Savepoint aSavepoint)
                          throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### rollback

    public void rollback()
                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### rollback

    public void rollback(java.sql.Savepoint aSavepoint)
                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### setAutoCommit

    public void setAutoCommit(boolean aAutoCommit)
                       throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### setCatalog

    public void setCatalog(java.lang.String aCatalog)
                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### setHoldability

    public void setHoldability(int aHoldability)
                        throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### setReadOnly

    public void setReadOnly(boolean aReadOnly)
                     throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### setSavepoint

    public java.sql.Savepoint setSavepoint()
                                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### setSavepoint

    public java.sql.Savepoint setSavepoint(java.lang.String aName)
                                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### setTransactionIsolation

    public void setTransactionIsolation(int aLevel)
                                 throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### setTypeMap

    public void setTypeMap(java.util.Map map)
                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### isClientSideAutoCommit

    public boolean isClientSideAutoCommit()

#### getDatabaseVersion

    public java.lang.String getDatabaseVersion()
                                        throws java.sql.SQLException

연결된 DB의 패키지 버전을 얻는다.

Returns:
  연결된 DB의 패키지 버전 문자열
Throws:
  `java.sql.SQLException` - 패키지 버전 문자열을 얻는데 실패했을 경우

#### getTransTimeout

    public int getTransTimeout()
                        throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### setTransTimeout

    public void setTransTimeout(int aTimeoutSec)
                         throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getDbTimeZone

    public java.lang.String getDbTimeZone()
                                   throws java.sql.SQLException

서버에 설정된 TimeZone을 얻는다.

Returns:
  서버 TimeZone 값
Throws:
  `java.sql.SQLException` - DB TimeZone을 얻는데 실패했을 경우

#### getSessionTimeZone

    public java.lang.String getSessionTimeZone()
                                        throws java.sql.SQLException

Session에 설정된 TimeZone을 얻는다.

Returns:
  서버 TimeZone 값
Throws:
  `java.sql.SQLException` - Session TimeZone을 얻는데 실패했을 경우

#### setSessionTimeZone

    public void setSessionTimeZone(java.lang.String aTimeZone)
                            throws java.sql.SQLException

Session TimeZone을 바꾼다.

Parameters:
  `aTimeZone` - 바꿀 TimeZone 값
Throws:
  `java.sql.SQLException` - TimeZone을 바꾸는데 실패했을 경우

#### setExplainPlan

    public void setExplainPlan(byte aExplainPlanMode)
                        throws java.sql.SQLException

Explain Plan Mode를 설정한다.

Parameters:
  `aExplainPlanMode` - Explain Plan Mode. 다음 값 중 하나: `EXPLAIN_PLAN_OFF`, `EXPLAIN_PLAN_ON`, `EXPLAIN_PLAN_ONLY`
Throws:
  `java.lang.IllegalArgumentException` - Explain Plan Mode가 올바르지 않을 경우
  `java.sql.SQLException` - Explain Plan 속성 설정에 실패한 경우

#### setExplainPlan

    public void setExplainPlan(boolean aUseExplainPlan)
                        throws java.sql.SQLException

Deprecated. Replaced by `setExplainPlan(byte)`
Explain Plan을 사용할지 여부를 설정한다.

Parameters:
  `aUseExplainPlan` - ExplainPlan을 사용할지 여부
Throws:
  `java.sql.SQLException` - Explain Plan 속성 설정에 실패한 경우

#### registerFailoverCallback

    public void registerFailoverCallback(AltibaseFailoverCallback aFailoverCallback,
                                         java.lang.Object aAppContext)
                                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### deregisterFailoverCallback

    public void deregisterFailoverCallback()
                                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### registerMessageCallback

    public void registerMessageCallback(AltibaseMessageCallback aMessageCallback)
                                 throws java.sql.SQLException

DB Message 프로토콜을 처리할 콜백을 등록한다.

Parameters:
  `aMessageCallback` - 콜백 객체
Throws:
  `java.sql.SQLException`

#### getCipherSuiteList

    public java.lang.String[] getCipherSuiteList()

PROJ-2474 가능한 ciphersuite 리스트를 돌려준다.
ssl_enable이 true일때만 소켓을 통해 값을 가져오며 그외에는 null을 리턴한다.

#### setAsyncPrefetchStatement

    protected boolean setAsyncPrefetchStatement(AltibaseStatement aStatement)

Asynchronous fetch 기능이 동작 중인 statement 를 저장한다.

#### clearAsyncPrefetchStatement

    protected void clearAsyncPrefetchStatement()

Asynchronous fetch 기능이 동작 중인 statement 를 저장한다.

#### getAsyncPrefetchStatement

    protected AltibaseStatement getAsyncPrefetchStatement()

Asynchronous fetch 기능이 동작 중인 statement 를 얻는다.

#### getAllowLobNullSelect

    public boolean getAllowLobNullSelect()

#### canReUseResultSet

    public boolean canReUseResultSet()

#### isValid

    public boolean isValid(int aTimeout)
                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### abort

    public void abort(java.util.concurrent.Executor aExecutor)
               throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### setNetworkTimeout

    public void setNetworkTimeout(java.util.concurrent.Executor aExecutor,
                                  int aMilliseconds)
                           throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getNetworkTimeout

    public int getNetworkTimeout()
                          throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### setClientInfo

    public void setClientInfo(java.lang.String aName,
                              java.lang.String aValue)
                       throws java.sql.SQLClientInfoException

Throws:
  `java.sql.SQLClientInfoException`

#### setClientInfo

    public void setClientInfo(java.util.Properties aProperties)
                       throws java.sql.SQLClientInfoException

Throws:
  `java.sql.SQLClientInfoException`

#### getClientInfo

    public java.lang.String getClientInfo(java.lang.String aName)
                                   throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getClientInfo

    public java.util.Properties getClientInfo()
                                       throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getCurrentFailoverServerInfo

    public Altibase.jdbc.driver.AltibaseFailoverServerInfo getCurrentFailoverServerInfo()

#### createClob

    public java.sql.Clob createClob()

Specified by:
  `createClob` in interface `java.sql.Connection`
Overrides:
  `createClob` in class `AbstractConnection`

#### createBlob

    public java.sql.Blob createBlob()

Specified by:
  `createBlob` in interface `java.sql.Connection`
Overrides:
  `createBlob` in class `AbstractConnection`

#### getProceduresReturnFunctions

    public boolean getProceduresReturnFunctions()

#### getBatchSetBytesUseLob

    public boolean getBatchSetBytesUseLob()