类 JdbcCursorItemReader<T>
- java.lang.Object
- org.springframework.batch.item.ItemStreamSupport
- org.springframework.batch.item.support.AbstractItemStreamItemReader<T>
- org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader<T>
- org.springframework.batch.item.database.AbstractCursorItemReader<T>
- org.springframework.batch.item.database.JdbcCursorItemReader<T>
- 所有已实现的接口:
ItemReader<T>,ItemStream,ItemStreamReader<T>,org.springframework.beans.factory.InitializingBean
public class JdbcCursorItemReader<T> extends AbstractCursorItemReader<T>
Simple item reader implementation that opens a JDBC cursor and continually retrieves the next row in the ResultSet.
The statement used to open the cursor is created with the 'READ_ONLY' option since a non read-only cursor may unnecessarily lock tables or rows. It is also opened with 'TYPE_FORWARD_ONLY' option. By default the cursor will be opened using a separate connection which means that it will not participate in any transactions created as part of the step processing.
Each call to
AbstractItemCountingItemStreamItemReader.read()will call the provided RowMapper, passing in the ResultSet.- 作者:
- Lucas Ward, Peter Zozom, Robert Kasanicky, Thomas Risberg