com.poscoict.glueframework.batch.item
Class GlueJdbcBatchItemWriter<T>

java.lang.Object
  extended by org.springframework.batch.item.database.JdbcBatchItemWriter<T>
      extended by com.poscoict.glueframework.batch.item.GlueJdbcBatchItemWriter<T>
All Implemented Interfaces:
org.springframework.batch.item.ItemWriter<T>, org.springframework.beans.factory.InitializingBean

public class GlueJdbcBatchItemWriter<T>
extends org.springframework.batch.item.database.JdbcBatchItemWriter<T>

JdbcBatchItemWriter È®Àå.

 Bean Property
 
 - dataSource : (Çʼö)
 
 - queryId : (Çʼö) named query 
 
 - queryManager : (Çʼö)
 
 - assertUpdates : (¼±ÅÃ) 
                   default : true
 
 - namedParameterJdbcTemplate : (¼±ÅÃ)
 
 - itemPreparedStatementSetter : (¼±ÅÃ) '?' »ç¿ë½Ã Á¤ÀÇ
 
 - itemSqlParameterSourceProvider : (¼±ÅÃ) named parameters »ç¿ë½Ã Á¤ÀÇ 
 
 
 ¿¹Á¦
 »ç¿ë ¿¹# 1
 
     <bean id="itemWriter" class="com.poscoict.glueframework.batch.item.GlueJdbcBatchItemWriter">
         <property name="dataSource" ref="dataSource" />
         <property name="queryManager" ref="queryManager" />
         <property name="queryId" value="emp.insert" />
         <property name="assertUpdates" value="true" />
         <property name="itemSqlParameterSourceProvider">
             <bean class="org.springframework.batch.item.database.BeanPropertyItemSqlParameterSourceProvider" />
         </property>
     </bean>
     <bean id="dataSource" .../>
     <bean id="queryManager" class="com.poscoict.glueframework.dao.manager.GlueQueryManagerImpl">
         <property name="cacheManager" ref="cacheManager"/>
         <property name="queryLoader" ref="queryLoader"/>
     </bean>
     <bean id="cacheManager" .../>
     <bean id="queryLoader" .../>
 
 
 
 Âü°í : {name}-query.glue_sql
 
     <query id="emp.insert" desc="" isNamed="true">
         <![CDATA[
               insert into emp(empno, ename, deptno, job)
               values(:empno, :ename, :deptno, :job)
         ]]>
     </query>
 


Field Summary
 
Fields inherited from class org.springframework.batch.item.database.JdbcBatchItemWriter
logger
 
Constructor Summary
GlueJdbcBatchItemWriter()
           
 
Method Summary
 void afterPropertiesSet()
           
 void setQueryId(String queryId)
          setter method for DI.
 void setQueryManager(GlueQueryManager queryManager)
          setter method for DI.
 
Methods inherited from class org.springframework.batch.item.database.JdbcBatchItemWriter
setAssertUpdates, setDataSource, setItemPreparedStatementSetter, setItemSqlParameterSourceProvider, setJdbcTemplate, setSql, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlueJdbcBatchItemWriter

public GlueJdbcBatchItemWriter()
Method Detail

setQueryManager

public void setQueryManager(GlueQueryManager queryManager)
setter method for DI.

Parameters:
queryManager -

setQueryId

public void setQueryId(String queryId)
setter method for DI.

Parameters:
queryId -

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Overrides:
afterPropertiesSet in class org.springframework.batch.item.database.JdbcBatchItemWriter<T>


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