com.poscoict.glueframework.dao.jdbc
Class GlueLazyJdbcDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.jdbc.core.support.JdbcDaoSupport
          extended by org.springframework.jdbc.core.namedparam.NamedParameterJdbcDaoSupport
              extended by com.poscoict.glueframework.dao.jdbc.GlueJdbcDao
                  extended by com.poscoict.glueframework.dao.jdbc.GlueLazyJdbcDao
All Implemented Interfaces:
GlueGenericDao, GlueGenericJdbcDao, org.springframework.beans.factory.InitializingBean

public class GlueLazyJdbcDao
extends GlueJdbcDao

GlueLazyJdbcDao. µ¥ÀÌŸº£À̽º CRUD(Create, Read, Update, Delete) ¿ÀÆÛ·¹À̼ÇÀ» Ãß»óÈ­ÇÏ¿© Á¦°øÇÏ´Â Data Access Object ¿ÀºêÁ§Æ®.

 Bean Property
 
 - dataSource : (Çʼö) javax.sql.DataSource 
 
 - queryManager : (Çʼö) com.poscoict.glueframework.dao.manager.GlueQueryManager 
 
 - columnManager : (¼±ÅÃ) com.poscoict.glueframework.dao.manager.GlueColumnManager, default´Â null
 
 - fetchSize : (Çʼö) int
 
 - countQuery : (Çʼö) default´Â "select count(1) cnt from (${query})"
 
 ¿¹Á¦
 »ç¿ë ¿¹# 1
 
     <bean id="dao" class="com.poscoict.glueframework.dao.jdbc.GlueLazyJdbcDao">
         <property name="dataSource" ref="dataSource"/>
         <property name="queryManager" ref="queryManager"/>
         <property name="fetchSize" value="100"/>
         <property name="countQuery" value="select count(*) from (${query})"/>
     </bean>
 
 
     GlueGenericJdbcDao dao = ... 
     GlueCursorBasedRowSet rowSet = (GlueCursorBasedRowSet)dao.find("emp.select");
     while(rowSet.hasNext()){
         Map row = rowSet.next();
         empno = row.get("empno")
         // EmpVO row = rowSet.next();
         // empno = row.getEmpno();
     }
 


Field Summary
 
Fields inherited from class com.poscoict.glueframework.dao.jdbc.GlueJdbcDao
lobHandler, queryManager, sequence
 
Fields inherited from interface com.poscoict.glueframework.dao.jdbc.GlueGenericJdbcDao
DEFAULT_BATCH_UPDATE_SIZE, DELETE, INSERT, SELECT, UPDATE
 
Constructor Summary
GlueLazyJdbcDao()
           
 
Method Summary
protected  org.springframework.jdbc.core.JdbcTemplate createJdbcTemplate(DataSource dataSource)
           
protected
<T,P> List<T>
findByQueryDefinitionInternal(GlueQueryDefinition def, GlueParameter<P> param)
           
 void setCountQuery(String s)
           
 void setFetchSize(int fetchSize)
          setter method for DI.
 
Methods inherited from class com.poscoict.glueframework.dao.jdbc.GlueJdbcDao
batchUpdate, batchUpdate, batchUpdate, batchUpdateByQueryStatement, batchUpdateByQueryStatement, batchUpdateByQueryStatement, delete, delete, deleteByQueryStatement, deleteByQueryStatement, find, find, find, findByQueryStatement, findByQueryStatement, findForNavigationPage, findForNavigationPage, findForNavigationPageByQuery, findForNavigationPageByQuery, getBatchUpdateLimit, getColumnManager, getDatabaseProductName, getDBConnection, getQueryManager, getSequence, handleDataAccessException, insert, insert, insertByQueryStatement, insertByQueryStatement, releaseDBConnection, setBatchUpdateLimit, setColumnManager, setLobHandler, setQueryManager, setSequence, setTypeCast, update, update, updateByQueryStatement, updateByQueryStatement
 
Methods inherited from class org.springframework.jdbc.core.namedparam.NamedParameterJdbcDaoSupport
getNamedParameterJdbcTemplate, initTemplateConfig
 
Methods inherited from class org.springframework.jdbc.core.support.JdbcDaoSupport
checkDaoConfig, getConnection, getDataSource, getExceptionTranslator, getJdbcTemplate, releaseConnection, setDataSource, setJdbcTemplate
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlueLazyJdbcDao

public GlueLazyJdbcDao()
Method Detail

setCountQuery

public void setCountQuery(String s)
Parameters:
s - select count(1) cnt from (${query})

setFetchSize

public void setFetchSize(int fetchSize)
Description copied from class: GlueJdbcDao
setter method for DI.

Overrides:
setFetchSize in class GlueJdbcDao

createJdbcTemplate

protected org.springframework.jdbc.core.JdbcTemplate createJdbcTemplate(DataSource dataSource)
Overrides:
createJdbcTemplate in class GlueJdbcDao

findByQueryDefinitionInternal

protected <T,P> List<T> findByQueryDefinitionInternal(GlueQueryDefinition def,
                                                      GlueParameter<P> param)
Overrides:
findByQueryDefinitionInternal in class GlueJdbcDao
Returns:


Copyright © 2013–2018 POSCO ICT. All rights reserved.