public class StoredProcedureItemReaderBuilder<T>
extends java.lang.Object
StoredProcedureItemReader
.StoredProcedureItemReader
Modifier and Type | Field and Description |
---|---|
static int |
VALUE_NOT_SET |
Constructor and Description |
---|
StoredProcedureItemReaderBuilder() |
Modifier and Type | Method and Description |
---|---|
StoredProcedureItemReader<T> |
build()
Validates configuration and builds a new reader instance
|
StoredProcedureItemReaderBuilder<T> |
currentItemCount(int currentItemCount)
Index for the current item.
|
StoredProcedureItemReaderBuilder<T> |
dataSource(javax.sql.DataSource dataSource)
The
DataSource to read from |
StoredProcedureItemReaderBuilder<T> |
driverSupportsAbsolute(boolean driverSupportsAbsolute)
Indicates if the JDBC driver supports setting the absolute row on the
ResultSet . |
StoredProcedureItemReaderBuilder<T> |
fetchSize(int fetchSize)
A hint to the driver as to how many rows to return with each fetch.
|
StoredProcedureItemReaderBuilder<T> |
function()
Indicates the stored procedure is a function
|
StoredProcedureItemReaderBuilder<T> |
ignoreWarnings(boolean ignoreWarnings)
Indicates if SQL warnings should be ignored or if an exception should be thrown.
|
StoredProcedureItemReaderBuilder<T> |
maxItemCount(int maxItemCount)
Configure the max number of items to be read.
|
StoredProcedureItemReaderBuilder<T> |
maxRows(int maxRows)
The max number of rows the
ResultSet can contain |
StoredProcedureItemReaderBuilder<T> |
name(java.lang.String name)
The name used to calculate the key within the
ExecutionContext . |
StoredProcedureItemReaderBuilder<T> |
parameters(org.springframework.jdbc.core.SqlParameter[] parameters)
SQL parameters to be set when executing the stored procedure
|
StoredProcedureItemReaderBuilder<T> |
preparedStatementSetter(org.springframework.jdbc.core.PreparedStatementSetter preparedStatementSetter)
Configures the provided
PreparedStatementSetter to be used to populate any
arguments in the SQL query to be executed for the reader. |
StoredProcedureItemReaderBuilder<T> |
procedureName(java.lang.String procedureName)
The name of the stored procedure to execute
|
StoredProcedureItemReaderBuilder<T> |
queryTimeout(int queryTimeout)
The time in milliseconds for the query to timeout
|
StoredProcedureItemReaderBuilder<T> |
refCursorPosition(int refCursorPosition)
The parameter position of the REF CURSOR.
|
StoredProcedureItemReaderBuilder<T> |
rowMapper(org.springframework.jdbc.core.RowMapper<T> rowMapper)
The
RowMapper used to map the results of the cursor to each item. |
StoredProcedureItemReaderBuilder<T> |
saveState(boolean saveState)
Configure if the state of the
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes. |
StoredProcedureItemReaderBuilder<T> |
useSharedExtendedConnection(boolean useSharedExtendedConnection)
Indicates that the connection used for the cursor is being used by all other
processing, therefor part of the same transaction.
|
StoredProcedureItemReaderBuilder<T> |
verifyCursorPosition(boolean verifyCursorPosition)
Indicates if the reader should verify the current position of the
ResultSet after being passed to the RowMapper . |
public static final int VALUE_NOT_SET
public StoredProcedureItemReaderBuilder<T> saveState(boolean saveState)
ItemStreamSupport
should be persisted within the ExecutionContext
for restart purposes.saveState
- defaults to truepublic StoredProcedureItemReaderBuilder<T> name(java.lang.String name)
ExecutionContext
. Required if
saveState(boolean)
is set to true.name
- name of the reader instanceItemStreamSupport.setName(String)
public StoredProcedureItemReaderBuilder<T> maxItemCount(int maxItemCount)
maxItemCount
- the max items to be readAbstractItemCountingItemStreamItemReader.setMaxItemCount(int)
public StoredProcedureItemReaderBuilder<T> currentItemCount(int currentItemCount)
currentItemCount
- current indexAbstractItemCountingItemStreamItemReader.setCurrentItemCount(int)
public StoredProcedureItemReaderBuilder<T> dataSource(javax.sql.DataSource dataSource)
DataSource
to read fromdataSource
- a relational data baseAbstractCursorItemReader.setDataSource(DataSource)
public StoredProcedureItemReaderBuilder<T> fetchSize(int fetchSize)
fetchSize
- the hintAbstractCursorItemReader.setFetchSize(int)
public StoredProcedureItemReaderBuilder<T> maxRows(int maxRows)
ResultSet
can containmaxRows
- the maxAbstractCursorItemReader.setMaxRows(int)
public StoredProcedureItemReaderBuilder<T> queryTimeout(int queryTimeout)
queryTimeout
- timeoutAbstractCursorItemReader.setQueryTimeout(int)
public StoredProcedureItemReaderBuilder<T> ignoreWarnings(boolean ignoreWarnings)
ignoreWarnings
- indicator. Defaults to trueAbstractCursorItemReader.setIgnoreWarnings(boolean)
public StoredProcedureItemReaderBuilder<T> verifyCursorPosition(boolean verifyCursorPosition)
ResultSet
after being passed to the RowMapper
. Defaults
to true.verifyCursorPosition
- indicatorAbstractCursorItemReader.setVerifyCursorPosition(boolean)
public StoredProcedureItemReaderBuilder<T> driverSupportsAbsolute(boolean driverSupportsAbsolute)
ResultSet
.driverSupportsAbsolute
- indicatorAbstractCursorItemReader.setDriverSupportsAbsolute(boolean)
public StoredProcedureItemReaderBuilder<T> useSharedExtendedConnection(boolean useSharedExtendedConnection)
useSharedExtendedConnection
- indicatorAbstractCursorItemReader.setUseSharedExtendedConnection(boolean)
public StoredProcedureItemReaderBuilder<T> preparedStatementSetter(org.springframework.jdbc.core.PreparedStatementSetter preparedStatementSetter)
PreparedStatementSetter
to be used to populate any
arguments in the SQL query to be executed for the reader.preparedStatementSetter
- setterStoredProcedureItemReader.setPreparedStatementSetter(PreparedStatementSetter)
public StoredProcedureItemReaderBuilder<T> rowMapper(org.springframework.jdbc.core.RowMapper<T> rowMapper)
RowMapper
used to map the results of the cursor to each item.rowMapper
- RowMapper
StoredProcedureItemReader.setRowMapper(RowMapper)
public StoredProcedureItemReaderBuilder<T> procedureName(java.lang.String procedureName)
procedureName
- name of the procedureStoredProcedureItemReader.setProcedureName(String)
public StoredProcedureItemReaderBuilder<T> parameters(org.springframework.jdbc.core.SqlParameter[] parameters)
parameters
- parameters to be setStoredProcedureItemReader.setParameters(SqlParameter[])
public StoredProcedureItemReaderBuilder<T> function()
StoredProcedureItemReader.setFunction(boolean)
public StoredProcedureItemReaderBuilder<T> refCursorPosition(int refCursorPosition)
refCursorPosition
- the parameter positionStoredProcedureItemReader.setRefCursorPosition(int)
public StoredProcedureItemReader<T> build()
StoredProcedureItemReader