Class JdbcBatchItemWriterProperties
java.lang.Object
org.springframework.cloud.task.batch.autoconfigure.jdbc.JdbcBatchItemWriterProperties
@ConfigurationProperties(prefix="spring.batch.job.jdbcbatchitemwriter")
public class JdbcBatchItemWriterProperties
extends Object
Properties to configure a
JdbcBatchItemWriter
.- Since:
- 2.3
- Author:
- Glenn Renfro
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Returns the configured value of the name used to calculateExecutionContext
keys.getSql()
boolean
void
setAssertUpdates
(boolean assertUpdates) If set to true, confirms that every insert results in the update of at least one row in the database.void
The name used to calculate the key within theExecutionContext
.void
Sets the sql statement to be used to update the database.
-
Constructor Details
-
JdbcBatchItemWriterProperties
public JdbcBatchItemWriterProperties()
-
-
Method Details
-
getSql
- Returns:
- The current sql statement used to update the database.
-
setSql
Sets the sql statement to be used to update the database.- Parameters:
sql
- the sql statement to be used.
-
isAssertUpdates
public boolean isAssertUpdates()- Returns:
- if returns true then each insert will be confirmed to have at least one insert in the database.
-
setAssertUpdates
public void setAssertUpdates(boolean assertUpdates) If set to true, confirms that every insert results in the update of at least one row in the database. Defaults to True -
getName
Returns the configured value of the name used to calculateExecutionContext
keys.- Returns:
- the name
-
setName
The name used to calculate the key within theExecutionContext
.- Parameters:
name
- name of the writer instance- See Also:
-
ItemStreamSupport.setName(String)
-