kr.co.hit.live.dao.supporter
Class DerbySupporter

java.lang.Object
  extended by kr.co.hit.live.dao.supporter.DbmsSupporter
      extended by kr.co.hit.live.dao.supporter.DerbySupporter

public class DerbySupporter
extends DbmsSupporter

Derby에서 지원해야 할 jdbc기능을 정의한다. Connection instance를 통해 자신이 알맞은 instance인지 판단하며,

Since:
5.0
Version:
$Revision: 1.1 $ $Date: 2009/12/30 08:20:21 $
Author:
최승일

Field Summary
 
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
 
Constructor Summary
DerbySupporter()
           
 
Method Summary
 String generateTopSql(String fromSql, int topn)
          첫번째 topn 개의 row 만 조회하는 SQL 문장을 생성한다.
 String getDummyTableName()
          더미 테이블 명을 반환한다.
 boolean match(Connection conn)
           Connection instance를 통해 자신이 알맞은 Dbms의 supporter인지 판단한다.
 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에 설정될 값들에 대해서 정의해 주어야 한다.
 
Methods inherited from class kr.co.hit.live.dao.supporter.DbmsSupporter
executePostAdviceSql, executePreAdviceSql, getColumnReader, getDefaultColumnReader, getDefintionValue, getInstance, getVendorName, handleSqlException, prepareStatement, setCallableStatementOutParam, setCallableStatementParam, setDefaultCallableStatementOutParam, setDefaultCallableStatementParam, setDefaultPreparedStatementParam, setPreparedStatementParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DerbySupporter

public DerbySupporter()
Method Detail

match

public boolean match(Connection conn)
              throws SQLException

Connection instance를 통해 자신이 알맞은 Dbms의 supporter인지 판단한다.

Specified by:
match in class DbmsSupporter
Returns:
Connection에 해당하는 Dbms를 support 가능한지의 여부.
Throws:
SQLException

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:

getDummyTableName

public String getDummyTableName()
Description copied from class: DbmsSupporter
더미 테이블 명을 반환한다. (예 : oracle은 "DUAL")

Specified by:
getDummyTableName in class DbmsSupporter
Returns:

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


Copyright © 2014. All Rights Reserved.