@ConfigurationProperties(prefix="spring.batch.job.jdbccursoritemreader") public class JdbcCursorItemReaderProperties extends Object
Constructor and Description |
---|
JdbcCursorItemReaderProperties() |
Modifier and Type | Method and Description |
---|---|
int |
getCurrentItemCount()
Provides the index of the current item.
|
int |
getFetchSize()
Provides the number of items to return each time the cursor fetches from the
server.
|
int |
getMaxItemCount()
The maximum number of items to be read.
|
int |
getMaxRows()
Provides the maximum number of rows to read with this reader.
|
String |
getName()
Returns the configured value of the name used to calculate
ExecutionContext
keys. |
int |
getQueryTimeout()
Provides the time in milliseconds for the query to timeout.
|
String |
getSql()
Returns the SQL query to be executed.
|
boolean |
isDriverSupportsAbsolute()
Provides if the driver supports absolute positioning of a cursor.
|
boolean |
isIgnoreWarnings()
Provides if SQL warnings should be ignored.
|
boolean |
isSaveState()
Returns the configured value of if the state of the reader will be persisted.
|
boolean |
isUseSharedExtendedConnection()
Sets whether the connection used for the cursor is being used by all other
processing and is, therefore, part of the same transaction.
|
boolean |
isVerifyCursorPosition()
Indicates if the cursor's position should be validated with each item read (to
confirm that the RowMapper has not moved the cursor's location).
|
void |
setCurrentItemCount(int currentItemCount)
Index for the current item.
|
void |
setDriverSupportsAbsolute(boolean driverSupportsAbsolute)
Sets if the driver supports absolute positioning of a cursor.
|
void |
setFetchSize(int fetchSize)
Sets the number of items to return each time the cursor fetches from the server.
|
void |
setIgnoreWarnings(boolean ignoreWarnings)
Sets if SQL warnings should be ignored.
|
void |
setMaxItemCount(int maxItemCount)
Configure the max number of items to be read.
|
void |
setMaxRows(int maxRows)
Sets the maximum number of rows to be read with this reader.
|
void |
setName(String name)
The name used to calculate the key within the
ExecutionContext . |
void |
setQueryTimeout(int queryTimeout)
Sets the time in milliseconds for the query to timeout.
|
void |
setSaveState(boolean saveState)
Configure if the state of the
ItemStreamSupport should be persisted within
the ExecutionContext for restart purposes. |
void |
setSql(String sql)
Sets the SQL query to be executed.
|
void |
setUseSharedExtendedConnection(boolean useSharedExtendedConnection)
Sets whether the the connection used for the cursor is being used by all other
processing and is, therefore, part of the same transaction.
|
void |
setVerifyCursorPosition(boolean verifyCursorPosition)
Provides if the cursor's position should be validated with each item read.
|
public boolean isSaveState()
public void setSaveState(boolean saveState)
ItemStreamSupport
should be persisted within
the ExecutionContext
for restart purposes.saveState
- defaults to truepublic String getName()
ExecutionContext
keys.public void setName(String name)
ExecutionContext
. Required if
setSaveState(boolean)
is set to true.name
- name of the reader instanceItemStreamSupport.setName(String)
public int getMaxItemCount()
public void setMaxItemCount(int maxItemCount)
maxItemCount
- the max items to be readAbstractItemCountingItemStreamItemReader.setMaxItemCount(int)
public int getCurrentItemCount()
public void setCurrentItemCount(int currentItemCount)
currentItemCount
- current indexAbstractItemCountingItemStreamItemReader.setCurrentItemCount(int)
public int getFetchSize()
public void setFetchSize(int fetchSize)
fetchSize
- the number of itemsJdbcCursorItemReaderBuilder.fetchSize(int)
public int getMaxRows()
public void setMaxRows(int maxRows)
maxRows
- maximum number of itemsJdbcCursorItemReaderBuilder.maxRows(int)
public int getQueryTimeout()
public void setQueryTimeout(int queryTimeout)
queryTimeout
- millisecondsJdbcCursorItemReaderBuilder.queryTimeout(int)
public boolean isIgnoreWarnings()
public void setIgnoreWarnings(boolean ignoreWarnings)
ignoreWarnings
- indicator if the warnings should be ignoredJdbcCursorItemReaderBuilder.ignoreWarnings(boolean)
public boolean isVerifyCursorPosition()
public void setVerifyCursorPosition(boolean verifyCursorPosition)
verifyCursorPosition
- true if the position should be validatedJdbcCursorItemReaderBuilder.verifyCursorPosition(boolean)
public boolean isDriverSupportsAbsolute()
public void setDriverSupportsAbsolute(boolean driverSupportsAbsolute)
driverSupportsAbsolute
- true if the driver supports absolute positioningJdbcCursorItemReaderBuilder.driverSupportsAbsolute(boolean)
public boolean isUseSharedExtendedConnection()
public void setUseSharedExtendedConnection(boolean useSharedExtendedConnection)
useSharedExtendedConnection
- true if the connection is shared beyond this
queryJdbcCursorItemReaderBuilder.useSharedExtendedConnection(boolean)
public String getSql()
public void setSql(String sql)
sql
- the queryJdbcCursorItemReaderBuilder.sql(String)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.