kr.co.hit.live.dao.supporter
Class OracleSupporter
java.lang.Object
kr.co.hit.live.dao.supporter.DbmsSupporter
kr.co.hit.live.dao.supporter.OracleSupporter
public class OracleSupporter
- extends DbmsSupporter
| Fields inherited from class kr.co.hit.live.dao.supporter.DbmsSupporter |
ARRAY, BIG_DECIMAL, BINARY_STREAM, BLOB, BOOLEAN, BYTE, CHAR_STREAM, CLOB, DATE, defMap, DOUBLE, globalResultMap, INT, LONG, OBJECT, postAdviceSqls, preAdviceSqls, REAL, SCALAR, SHORT, SIMPLEINT, STRING, TIME, TIMESTAMP |
|
Method Summary |
String |
generateTopSql(String fromSql,
int topn)
첫번째 topn 개의 row 만 조회하는 SQL 문장을 생성한다. |
ColumnReader |
getDefaultColumnReader(int type,
String typeName)
|
String |
getDummyTableName()
더미 테이블 명을 반환한다. |
LiveException |
handleSqlException(SQLException sqlex)
DBMS 별로 차이 있는 SQLException을 처리하여 LiveException으로 반환한다. |
boolean |
match(Connection conn)
Connection을 통해 DbmsSupporter의 하위구현 class가 해당 Connection을 제공한 벤더의 dbms를
지원가능한지 확인한다. |
PreparedStatement |
preparePageStatement(Connection conn,
String sql,
List<Object> parameters,
int offset,
int maxCount,
Map<String,Object> args)
Dbms마다 paging용 sql과 PreparedStatement에 설정해야 하는 값도 다르다. parameters에 설정된 key:value들은 Dbms
마다 다른 parameter들의 규약이기 때문에 해당 벤더의 supporter를 구현하는 경우에는 parameters에 설정될 값들에 대해서 정의해 주어야 한다. |
void |
setCallableStatementOutParam(CallableStatement cstmt,
int idx,
SqlParameter sqlParam)
|
void |
setCallableStatementParam(CallableStatement cstmt,
int idx,
Object param)
|
void |
setPreparedStatementParam(PreparedStatement pstmt,
List<?> parameters)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ORACLE_XMLTYPE_NAME
public static final String ORACLE_XMLTYPE_NAME
- See Also:
- Constant Field Values
CURSOR
protected final ColumnReader CURSOR
XMLTYPE
protected final ColumnReader XMLTYPE
OracleSupporter
public OracleSupporter()
match
public boolean match(Connection conn)
throws SQLException
- Description copied from class:
DbmsSupporter
Connection을 통해 DbmsSupporter의 하위구현 class가 해당 Connection을 제공한 벤더의 dbms를
지원가능한지 확인한다. Connection을 통해 ResultSetMetaData를 얻어와서 판별하도록 구현한다.
- Specified by:
match in class DbmsSupporter
- Returns:
Connection에 해당하는 Dbms를 support 가능한지의 여부.
- Throws:
SQLException
getDefaultColumnReader
public ColumnReader getDefaultColumnReader(int type,
String typeName)
- Overrides:
getDefaultColumnReader in class DbmsSupporter
setPreparedStatementParam
public void setPreparedStatementParam(PreparedStatement pstmt,
List<?> parameters)
throws SQLException
- Overrides:
setPreparedStatementParam in class DbmsSupporter
- Throws:
SQLException
preparePageStatement
public PreparedStatement preparePageStatement(Connection conn,
String sql,
List<Object> parameters,
int offset,
int maxCount,
Map<String,Object> args)
throws SQLException
- Description copied from class:
DbmsSupporter
- Dbms마다 paging용 sql과 PreparedStatement에 설정해야 하는 값도 다르다. parameters에 설정된 key:value들은 Dbms
마다 다른 parameter들의 규약이기 때문에 해당 벤더의 supporter를 구현하는 경우에는 parameters에 설정될 값들에 대해서 정의해 주어야 한다.
- Specified by:
preparePageStatement in class DbmsSupporter
args - 벤더별로 다른 parameter들에 대한 정의.
- Returns:
-
- Throws:
SQLException
setCallableStatementParam
public void setCallableStatementParam(CallableStatement cstmt,
int idx,
Object param)
throws SQLException
- Overrides:
setCallableStatementParam in class DbmsSupporter
- Throws:
SQLException
setCallableStatementOutParam
public void setCallableStatementOutParam(CallableStatement cstmt,
int idx,
SqlParameter sqlParam)
throws SQLException
- Overrides:
setCallableStatementOutParam in class DbmsSupporter
- Throws:
SQLException
handleSqlException
public LiveException handleSqlException(SQLException sqlex)
- Description copied from class:
DbmsSupporter
- DBMS 별로 차이 있는 SQLException을 처리하여 LiveException으로 반환한다.
- Overrides:
handleSqlException in class DbmsSupporter
- Returns:
- LiveException
getDummyTableName
public String getDummyTableName()
- Description copied from class:
DbmsSupporter
- 더미 테이블 명을 반환한다. (예 : oracle은 "DUAL")
- Specified by:
getDummyTableName in class DbmsSupporter
- Returns:
generateTopSql
public String generateTopSql(String fromSql,
int topn)
- Description copied from class:
DbmsSupporter
- 첫번째 topn 개의 row 만 조회하는 SQL 문장을 생성한다.
- Specified by:
generateTopSql in class DbmsSupporter
- Parameters:
fromSql - 조회대상 테이블 명 또는 SQL문topn - 조회 건
- Returns:
Copyright © 2014. All Rights Reserved.