|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.JobParametersBuilder
public class JobParametersBuilder
Helper class for creating JobParameters
. Useful because of all
JobParameters
are immutable, and require 3 separate maps of the three
supported types to ensure typesafety. Once created, it can be used in the
same was a java.lang.StringBuilder (except, order is irrelevant), by adding
various parameters types and creating a valid JobRuntimeParametres once
finished.
JobParameters
Constructor Summary | |
---|---|
JobParametersBuilder()
Default constructor. |
Method Summary | |
---|---|
JobParametersBuilder |
addDate(String key,
Date parameter)
Add a new Date parameter for the given key. |
JobParametersBuilder |
addDouble(String key,
Double parameter)
Add a new Double parameter for the given key. |
JobParametersBuilder |
addLong(String key,
Long parameter)
Add a new Long parameter for the given key. |
JobParametersBuilder |
addString(String key,
String parameter)
Add a new String parameter for the given key. |
JobParameters |
toJobParameters()
Conversion method that takes the current state of this builder and returns it as a JobruntimeParameters object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JobParametersBuilder()
Method Detail |
---|
public JobParametersBuilder addString(String key, String parameter)
key
- - parameter accessor.parameter
- - runtime parameter
public JobParametersBuilder addDate(String key, Date parameter)
key
- - parameter accessor.parameter
- - runtime parameter
public JobParametersBuilder addLong(String key, Long parameter)
key
- - parameter accessor.parameter
- - runtime parameter
public JobParametersBuilder addDouble(String key, Double parameter)
key
- - parameter accessor.parameter
- - runtime parameter
public JobParameters toJobParameters()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |