|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.JobParameters
public class JobParameters
Value object representing runtime parameters to a batch job. Because the parameters have no individual meaning outside of the JobParameters they are contained within, it is a value object rather than an entity. It is also extremely important that a parameters object can be reliably compared to another for equality, in order to determine if one JobParameters object equals another. Furthermore, because these parameters will need to be persisted, it is vital that the types added are restricted. This class is immutable and therefore thread-safe.
Constructor Summary | |
---|---|
JobParameters()
Default constructor. |
|
JobParameters(Map stringMap,
Map longMap,
Map doubleMap,
Map dateMap)
Create a new parameters object based upon the maps for each of the supported data types. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Date |
getDate(String key)
Typesafe Getter for the Date represented by the provided key. |
Map |
getDateParameters()
Get a map of only Date parameters |
Double |
getDouble(String key)
Typesafe Getter for the Long represented by the provided key. |
Map |
getDoubleParameters()
Get a map of only Double parameters |
Long |
getLong(String key)
Typesafe Getter for the Long represented by the provided key. |
Map |
getLongParameters()
Get a map of only Long parameters |
Map |
getParameters()
Get a map of all parameters, including string, long, and date. |
String |
getString(String key)
Typesafe Getter for the String represented by the provided key. |
Map |
getStringParameters()
Get a map of only string parameters. |
int |
hashCode()
|
boolean |
isEmpty()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JobParameters()
public JobParameters(Map stringMap, Map longMap, Map doubleMap, Map dateMap)
JobParametersBuilder
for an easier way
to create parameters.
Method Detail |
---|
public String getString(String key)
key
- The key to get a value for
String
valuepublic Long getLong(String key)
key
- The key to get a value for
Long
valuepublic Double getDouble(String key)
key
- The key to get a value for
Double
valuepublic Date getDate(String key)
key
- The key to get a value for
java.util.Date
valuepublic Map getParameters()
public Map getStringParameters()
public Map getLongParameters()
public Map getDoubleParameters()
public Map getDateParameters()
public boolean isEmpty()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |