|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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(java.util.Map<java.lang.String,JobParameter> parameters)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.util.Date |
getDate(java.lang.String key)
Typesafe Getter for the Date represented by the provided key. |
java.util.Date |
getDate(java.lang.String key,
java.util.Date defaultValue)
Typesafe Getter for the Date represented by the provided key. |
double |
getDouble(java.lang.String key)
Typesafe Getter for the Long represented by the provided key. |
double |
getDouble(java.lang.String key,
double defaultValue)
Typesafe Getter for the Double represented by the provided key. |
long |
getLong(java.lang.String key)
Typesafe Getter for the Long represented by the provided key. |
long |
getLong(java.lang.String key,
long defaultValue)
Typesafe Getter for the Long represented by the provided key. |
java.util.Map<java.lang.String,JobParameter> |
getParameters()
Get a map of all parameters, including string, long, and date. |
java.lang.String |
getString(java.lang.String key)
Typesafe Getter for the String represented by the provided key. |
java.lang.String |
getString(java.lang.String key,
java.lang.String defaultValue)
Typesafe Getter for the String represented by the provided key. |
int |
hashCode()
|
boolean |
isEmpty()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JobParameters()
public JobParameters(java.util.Map<java.lang.String,JobParameter> parameters)
| Method Detail |
|---|
public long getLong(java.lang.String key)
key - The key to get a value for
Long value
public long getLong(java.lang.String key,
long defaultValue)
key - to return the value fordefaultValue - to return if the value doesn't exist
public java.lang.String getString(java.lang.String key)
key - The key to get a value for
String value
public java.lang.String getString(java.lang.String key,
java.lang.String defaultValue)
key - to return the value fordefaultValue - to return if the value doesn't exist
public double getDouble(java.lang.String key)
key - The key to get a value for
Double value
public double getDouble(java.lang.String key,
double defaultValue)
key - to return the value fordefaultValue - to return if the value doesn't exist
public java.util.Date getDate(java.lang.String key)
key - The key to get a value for
java.util.Date value
public java.util.Date getDate(java.lang.String key,
java.util.Date defaultValue)
key - to return the value fordefaultValue - to return if the value doesn't exist
public java.util.Map<java.lang.String,JobParameter> getParameters()
public boolean isEmpty()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||