|
||||||||||
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()
|
|
JobParameters(Map<String,JobParameter> parameters)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Date |
getDate(String key)
Typesafe Getter for the Date represented by the provided key. |
Date |
getDate(String key,
Date defaultValue)
Typesafe Getter for the Date represented by the provided key. |
double |
getDouble(String key)
Typesafe Getter for the Long represented by the provided key. |
double |
getDouble(String key,
double defaultValue)
Typesafe Getter for the Double represented by the provided key. |
long |
getLong(String key)
Typesafe Getter for the Long represented by the provided key. |
long |
getLong(String key,
long defaultValue)
Typesafe Getter for the Long represented by the provided key. |
Map<String,JobParameter> |
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. |
String |
getString(String key,
String defaultValue)
Typesafe Getter for the String represented by the provided key. |
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<String,JobParameter> parameters)
Method Detail |
---|
public long getLong(String key)
key
- The key to get a value for
Long
valuepublic long getLong(String key, long defaultValue)
key
- to return the value fordefaultValue
- to return if the value doesn't exist
public String getString(String key)
key
- The key to get a value for
String
valuepublic String getString(String key, String defaultValue)
key
- to return the value fordefaultValue
- to return if the value doesn't exist
public double getDouble(String key)
key
- The key to get a value for
Double
valuepublic double getDouble(String key, double defaultValue)
key
- to return the value fordefaultValue
- to return if the value doesn't exist
public Date getDate(String key)
key
- The key to get a value for
java.util.Date
valuepublic Date getDate(String key, Date defaultValue)
key
- to return the value fordefaultValue
- to return if the value doesn't exist
public Map<String,JobParameter> getParameters()
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 |