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

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

public class PostgreSQLSupporter
extends DbmsSupporter


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
PostgreSQLSupporter()
           
 
Method Summary
 String generateTopSql(String fromSql, int topn)
          첫번째 topn 개의 row 만 조회하는 SQL 문장을 생성한다.
 ColumnReader getDefaultColumnReader(int type, String typeName)
           
 String getDummyTableName()
          더미 테이블 명을 반환한다.
 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)
          페이지 단위 조회를 위한 SQL 문장을 생성한다.
 
Methods inherited from class kr.co.hit.live.dao.supporter.DbmsSupporter
executePostAdviceSql, executePreAdviceSql, getColumnReader, 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

PostgreSQLSupporter

public PostgreSQLSupporter()
Method Detail

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

preparePageStatement

public PreparedStatement preparePageStatement(Connection conn,
                                              String sql,
                                              List<Object> parameters,
                                              int offset,
                                              int maxCount,
                                              Map<String,Object> args)
                                       throws SQLException
페이지 단위 조회를 위한 SQL 문장을 생성한다.

Specified by:
preparePageStatement in class DbmsSupporter
Parameters:
conn -
sql - SQL 원문장
parameters - 원 SQL 문장에 bind될 파라메터 리스트
offset - 건너뛸 건수
maxCount - 최대 조회 건수
args - 벤더별로 다른 parameter들에 대한 정의.
Returns:
Throws:
SQLException

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.