public class AltibaseStatement extends WrapperAdapter implements java.sql.Statement
| Modifier and Type | Class and Description |
|---|---|
protected class |
AltibaseStatement.ExecuteResultManager |
| Modifier and Type | Field and Description |
|---|---|
static int |
BYTES_PER_CHAR |
protected static long[] |
EMPTY_LARGE_BATCH_RESULT |
protected boolean |
mBatchSetBytesUseLob |
protected AltibaseConnection |
mConnection |
protected short |
mCurrentResultIndex |
protected AltibaseResultSet |
mCurrentResultSet |
protected boolean |
mEscapeProcessing |
protected AltibaseStatement.ExecuteResultManager |
mExecuteResultMgr |
protected CmExecutionResult |
mExecutionResult |
protected CmFetchResult |
mFetchResult |
protected int |
mFetchSize |
protected boolean |
mForceClobBind |
protected boolean |
mIsClosed |
protected boolean |
mIsDeferred |
protected int |
mMaxFieldSize |
protected long |
mMaxRows |
protected CmPrepareResult |
mPrepareResult |
protected java.util.List<Column> |
mPrepareResultColumns |
protected java.lang.String |
mQstr |
protected java.util.List<java.sql.ResultSet> |
mResultSetList |
protected boolean |
mResultSetReturned |
protected boolean |
mReUseResultSet |
protected int |
mStmtCID |
protected int |
mTargetResultSetConcurrency |
protected int |
mTargetResultSetType |
protected java.sql.SQLWarning |
mWarning |
| Modifier and Type | Method and Description |
|---|---|
void |
addBatch(java.lang.String aSql) |
protected void |
afterExecution() |
void |
cancel() |
protected void |
clearAllResults() |
void |
clearBatch() |
void |
clearWarnings() |
void |
close() |
void |
closeOnCompletion() |
protected static AltibaseStatement |
createInternalStatement(AltibaseConnection sConnection)
Internal statement 생성한다.
|
protected void |
createProtocolContext() |
protected int |
downgradeFetchSize(int aRows)
Dynamic Array에서 허용할 수 있는 최대 범위로 fetchSize를 보정한다.
|
boolean |
execute(java.lang.String aSql) |
boolean |
execute(java.lang.String aSql,
int aAutoGeneratedKeys) |
boolean |
execute(java.lang.String aSql,
int[] aColumnIndexes) |
boolean |
execute(java.lang.String aSql,
java.lang.String[] aColumnNames) |
int[] |
executeBatch() |
long[] |
executeLargeBatch() |
long |
executeLargeUpdate(java.lang.String aSql) |
java.sql.ResultSet |
executeQuery(java.lang.String aSql) |
int |
executeUpdate(java.lang.String aSql) |
int |
executeUpdate(java.lang.String aSql,
int aAutoGeneratedKeys) |
int |
executeUpdate(java.lang.String aSql,
int[] aColumnIndexes) |
int |
executeUpdate(java.lang.String aSql,
java.lang.String[] aColumnNames) |
java.sql.Connection |
getConnection() |
java.lang.String |
getExplainPlan()
Plan text를 얻는다.
|
int |
getFetchDirection() |
int |
getFetchSize() |
java.sql.ResultSet |
getGeneratedKeys() |
long |
getLargeMaxRows() |
long |
getLargeUpdateCount() |
protected static int |
getMaxFetchSize()
최대 fetch size 를 반환한다.
|
int |
getMaxFieldSize() |
int |
getMaxRows() |
boolean |
getMoreResults() |
boolean |
getMoreResults(int current) |
protected CmProtocolContextDirExec |
getProtocolContext() |
int |
getQueryTimeout() |
java.sql.ResultSet |
getResultSet() |
int |
getResultSetConcurrency() |
int |
getResultSetHoldability() |
int |
getResultSetType() |
protected java.lang.String |
getSql() |
int |
getUpdateCount() |
java.sql.SQLWarning |
getWarnings() |
protected void |
incCurrentResultSetIndex() |
protected boolean |
isAsyncPrefetch()
비동기적으로 fetch 를 수행하고 있는 statement 여부인지 확인한다.
|
boolean |
isClosed()
Statement가 닫혔는지 확인한다.
|
boolean |
isCloseOnCompletion() |
protected boolean |
isInternalStatement()
Internal statement 여부를 확인하다.
|
protected boolean |
isPingSQL(java.lang.String aSql)
sql이 validation check용 ping 쿼리인지 여부를 정규 표현식을 이용해 판별한다.
|
boolean |
isPoolable() |
protected void |
pingAndCreateLightweightResultSet()
내부적으로 ping메소드를 호출한 다음 정상적일 경우 SELECT 1의 결과에 해당하는 row를 수동으로 생성한 후 반환한다.
|
protected java.lang.String |
procDowngradeAndGetTargetSql(java.lang.String aOrgQstr)
Downgrade가 필요하면 처리하고, 실제 사용할 변환된 쿼리문을 얻는다.
|
protected java.sql.ResultSet |
processExecutionQueryResult(java.lang.String aSql) |
protected boolean |
processExecutionResult() |
void |
setCursorName(java.lang.String aName) |
void |
setEscapeProcessing(boolean aEnable) |
void |
setFetchDirection(int aDirection) |
void |
setFetchSize(int aRows) |
void |
setLargeMaxRows(long aMax) |
void |
setMaxFieldSize(int aMax) |
void |
setMaxRows(int aMax) |
void |
setPoolable(boolean aPoolable) |
void |
setQueryTimeout(int aSeconds) |
void |
setSql(java.lang.String aSql) |
protected int |
toInt(long aUpdateCount) |
protected int[] |
toIntBatchUpdateCounts(long[] aLongUpdateCounts) |
java.lang.String |
toString() |
isWrapperFor, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final int BYTES_PER_CHAR
protected AltibaseConnection mConnection
protected boolean mEscapeProcessing
protected AltibaseStatement.ExecuteResultManager mExecuteResultMgr
protected short mCurrentResultIndex
protected AltibaseResultSet mCurrentResultSet
protected java.util.List<java.sql.ResultSet> mResultSetList
protected boolean mIsClosed
protected java.sql.SQLWarning mWarning
protected int mFetchSize
protected int mMaxFieldSize
protected long mMaxRows
protected CmPrepareResult mPrepareResult
protected java.util.List<Column> mPrepareResultColumns
protected CmExecutionResult mExecutionResult
protected CmFetchResult mFetchResult
protected int mStmtCID
protected boolean mIsDeferred
protected boolean mForceClobBind
protected boolean mBatchSetBytesUseLob
protected java.lang.String mQstr
protected boolean mReUseResultSet
protected boolean mResultSetReturned
protected int mTargetResultSetType
protected int mTargetResultSetConcurrency
protected static final long[] EMPTY_LARGE_BATCH_RESULT
protected java.lang.String getSql()
public void setSql(java.lang.String aSql)
protected void createProtocolContext()
protected CmProtocolContextDirExec getProtocolContext()
protected void afterExecution()
throws java.sql.SQLException
java.sql.SQLExceptionprotected void clearAllResults()
throws java.sql.SQLException
java.sql.SQLExceptionprotected boolean processExecutionResult()
throws java.sql.SQLException
java.sql.SQLExceptionprotected java.sql.ResultSet processExecutionQueryResult(java.lang.String aSql)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void addBatch(java.lang.String aSql)
throws java.sql.SQLException
addBatch in interface java.sql.Statementjava.sql.SQLExceptionpublic void cancel()
throws java.sql.SQLException
cancel in interface java.sql.Statementjava.sql.SQLExceptionpublic void clearBatch()
throws java.sql.SQLException
clearBatch in interface java.sql.Statementjava.sql.SQLExceptionpublic void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Statementjava.sql.SQLExceptionpublic void close()
throws java.sql.SQLException
close in interface java.lang.AutoCloseableclose in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean execute(java.lang.String aSql,
int aAutoGeneratedKeys)
throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean execute(java.lang.String aSql,
int[] aColumnIndexes)
throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean execute(java.lang.String aSql,
java.lang.String[] aColumnNames)
throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean execute(java.lang.String aSql)
throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLExceptionpublic int[] executeBatch()
throws java.sql.SQLException
executeBatch in interface java.sql.Statementjava.sql.SQLExceptionpublic long[] executeLargeBatch()
throws java.sql.SQLException
executeLargeBatch in interface java.sql.Statementjava.sql.SQLExceptionpublic java.sql.ResultSet executeQuery(java.lang.String aSql)
throws java.sql.SQLException
executeQuery in interface java.sql.Statementjava.sql.SQLExceptionprotected void pingAndCreateLightweightResultSet()
throws java.sql.SQLException
java.sql.SQLException - Column객체에 setValue를 수행했을때 에러가 발생한 경우.protected boolean isPingSQL(java.lang.String aSql)
aSql - 쿼리 스트링public int executeUpdate(java.lang.String aSql,
int aAutoGeneratedKeys)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLExceptionpublic int executeUpdate(java.lang.String aSql,
int[] aColumnIndexes)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLExceptionpublic int executeUpdate(java.lang.String aSql,
java.lang.String[] aColumnNames)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLExceptionpublic int executeUpdate(java.lang.String aSql)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLExceptionpublic java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface java.sql.Statementjava.sql.SQLExceptionpublic int getFetchDirection()
throws java.sql.SQLException
getFetchDirection in interface java.sql.Statementjava.sql.SQLExceptionpublic int getFetchSize()
throws java.sql.SQLException
getFetchSize in interface java.sql.Statementjava.sql.SQLExceptionpublic java.sql.ResultSet getGeneratedKeys()
throws java.sql.SQLException
getGeneratedKeys in interface java.sql.Statementjava.sql.SQLExceptionpublic int getMaxFieldSize()
throws java.sql.SQLException
getMaxFieldSize in interface java.sql.Statementjava.sql.SQLExceptionpublic int getMaxRows()
throws java.sql.SQLException
getMaxRows in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean getMoreResults()
throws java.sql.SQLException
getMoreResults in interface java.sql.Statementjava.sql.SQLExceptionprotected void incCurrentResultSetIndex()
public boolean getMoreResults(int current)
throws java.sql.SQLException
getMoreResults in interface java.sql.Statementjava.sql.SQLExceptionpublic int getQueryTimeout()
throws java.sql.SQLException
getQueryTimeout in interface java.sql.Statementjava.sql.SQLExceptionpublic java.sql.ResultSet getResultSet()
throws java.sql.SQLException
getResultSet in interface java.sql.Statementjava.sql.SQLExceptionpublic int getResultSetConcurrency()
throws java.sql.SQLException
getResultSetConcurrency in interface java.sql.Statementjava.sql.SQLExceptionpublic int getResultSetHoldability()
throws java.sql.SQLException
getResultSetHoldability in interface java.sql.Statementjava.sql.SQLExceptionpublic int getResultSetType()
throws java.sql.SQLException
getResultSetType in interface java.sql.Statementjava.sql.SQLExceptionpublic int getUpdateCount()
throws java.sql.SQLException
getUpdateCount in interface java.sql.Statementjava.sql.SQLExceptionpublic java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean isClosed()
throws java.sql.SQLException
isClosed in interface java.sql.Statementjava.sql.SQLExceptionpublic void setCursorName(java.lang.String aName)
throws java.sql.SQLException
setCursorName in interface java.sql.Statementjava.sql.SQLExceptionpublic void setEscapeProcessing(boolean aEnable)
throws java.sql.SQLException
setEscapeProcessing in interface java.sql.Statementjava.sql.SQLExceptionpublic void setFetchDirection(int aDirection)
throws java.sql.SQLException
setFetchDirection in interface java.sql.Statementjava.sql.SQLExceptionpublic void setFetchSize(int aRows)
throws java.sql.SQLException
setFetchSize in interface java.sql.Statementjava.sql.SQLExceptionprotected int downgradeFetchSize(int aRows)
aRows - fetchSizeprotected static int getMaxFetchSize()
public void setMaxFieldSize(int aMax)
throws java.sql.SQLException
setMaxFieldSize in interface java.sql.Statementjava.sql.SQLExceptionpublic void setMaxRows(int aMax)
throws java.sql.SQLException
setMaxRows in interface java.sql.Statementjava.sql.SQLExceptionpublic void setQueryTimeout(int aSeconds)
throws java.sql.SQLException
setQueryTimeout in interface java.sql.Statementjava.sql.SQLExceptionpublic java.lang.String getExplainPlan()
throws java.sql.SQLException
java.sql.SQLException - Plan text 요청이나 결과를 얻는데 실패했을 때protected final java.lang.String procDowngradeAndGetTargetSql(java.lang.String aOrgQstr)
throws java.sql.SQLException
만약 Downgrade나 쿼리 변환이 필요 없다면 조용히 넘어가고 원본 쿼리문을 반환한다.
aOrgQstr - 원본 쿼리문java.sql.SQLException - Downgrade 여부 확인 또는 Downgrade에 실패한 경우protected boolean isAsyncPrefetch()
protected static AltibaseStatement createInternalStatement(AltibaseConnection sConnection) throws java.sql.SQLException
java.sql.SQLExceptionprotected boolean isInternalStatement()
public java.lang.String toString()
toString in class java.lang.Objectpublic void closeOnCompletion()
throws java.sql.SQLException
closeOnCompletion in interface java.sql.Statementjava.sql.SQLExceptionpublic boolean isCloseOnCompletion()
throws java.sql.SQLException
isCloseOnCompletion in interface java.sql.Statementjava.sql.SQLExceptionpublic long executeLargeUpdate(java.lang.String aSql)
throws java.sql.SQLException
executeLargeUpdate in interface java.sql.Statementjava.sql.SQLExceptionpublic long getLargeUpdateCount()
throws java.sql.SQLException
getLargeUpdateCount in interface java.sql.Statementjava.sql.SQLExceptionpublic long getLargeMaxRows()
throws java.sql.SQLException
getLargeMaxRows in interface java.sql.Statementjava.sql.SQLExceptionpublic void setLargeMaxRows(long aMax)
throws java.sql.SQLException
setLargeMaxRows in interface java.sql.Statementjava.sql.SQLExceptionpublic void setPoolable(boolean aPoolable)
setPoolable in interface java.sql.Statementpublic boolean isPoolable()
isPoolable in interface java.sql.Statementprotected int[] toIntBatchUpdateCounts(long[] aLongUpdateCounts)
protected int toInt(long aUpdateCount)