public class GlueCursorItemReader<T>
extends org.springframework.batch.item.database.JdbcCursorItemReader<T>
Bean Property - dataSource : (Çʼö) - rowMapper : (Çʼö) - queryId : (Çʼö) - queryManager : (Çʼö) - preparedStatementSetter : (¼±ÅÃ) ¿¹Á¦»ç¿ë ¿¹# 1 Âü°í : {name}-query.glue_sql Âü°í : EmpRowMapper.java import java.sql.ResultSet; import java.sql.SQLException; import org.springframework.jdbc.core.RowMapper; import sample.vo.EmpVO; public class EmpRowMapper implements RowMapper { public EmpVO mapRow(ResultSet rs,int rowNum) throws SQLException{ EmpVO emp = new EmpVO(); emp.setEmpno(rs.getString("empno")); emp.setEname(rs.getString("ename")); emp.setDeptno(rs.getString("deptno")); return emp; } } Âü°í : EmpVO.java public class EmpVO{ private String empno; private String ename; private String deptno; public String getEmpno() { return empno; } public void setEmpno( String empno ) { this.empno = empno; } public String getEname() { return ename; } public void setEname( String ename ) { this.ename = ename; } public Long getDeptno() { return deptno; } public void setDeptno( String deptno ) { this.deptno = deptno; }
Constructor and Description |
---|
GlueCursorItemReader() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
setQueryId(String queryId)
setter method for DI.
|
void |
setQueryManager(GlueQueryManager queryManager)
setter method for DI.
|
cleanupOnClose, getSql, openCursor, readCursor, setPreparedStatementSetter, setRowMapper, setSql
applyStatementSettings, doClose, doOpen, doRead, getDataSource, getExceptionTranslator, handleWarnings, initializeConnection, isUseSharedExtendedConnection, jumpToItem, setDataSource, setDriverSupportsAbsolute, setFetchSize, setIgnoreWarnings, setMaxRows, setQueryTimeout, setUseSharedExtendedConnection, setVerifyCursorPosition
close, getCurrentItemCount, isSaveState, open, read, setCurrentItemCount, setMaxItemCount, setSaveState, update
public void setQueryManager(GlueQueryManager queryManager)
queryManager
- public void setQueryId(String queryId)
queryId
- public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
afterPropertiesSet
in class org.springframework.batch.item.database.JdbcCursorItemReader<T>
Exception
Copyright © 2013–2016 POSCO ICT. All rights reserved.