org.springframework.batch.core
Class JobParameter

java.lang.Object
  extended by org.springframework.batch.core.JobParameter
All Implemented Interfaces:
Serializable

public class JobParameter
extends Object
implements Serializable

Domain representation of a parameter to a batch job. Only the following types can be parameters: String, Long, Date, and Double. The identifying flag is used to indicate if the parameter is to be used as part of the identification of a job instance.

Since:
2.0
Author:
Lucas Ward, Dave Syer, Michael Minella
See Also:
Serialized Form

Nested Class Summary
static class JobParameter.ParameterType
          Enumeration representing the type of a JobParameter.
 
Constructor Summary
JobParameter(Date parameter)
          Construct a new JobParameter as a Date.
JobParameter(Date parameter, boolean identifying)
          Construct a new JobParameter as a Date.
JobParameter(Double parameter)
          Construct a new JobParameter as a Double.
JobParameter(Double parameter, boolean identifying)
          Construct a new JobParameter as a Double.
JobParameter(Long parameter)
          Construct a new JobParameter as a Long.
JobParameter(Long parameter, boolean identifying)
          Construct a new JobParameter as a Long.
JobParameter(String parameter)
          Construct a new JobParameter as a String.
JobParameter(String parameter, boolean identifying)
          Construct a new JobParameter as a String.
 
Method Summary
 boolean equals(Object obj)
           
 JobParameter.ParameterType getType()
           
 Object getValue()
           
 int hashCode()
           
 boolean isIdentifying()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobParameter

public JobParameter(String parameter,
                    boolean identifying)
Construct a new JobParameter as a String.


JobParameter

public JobParameter(Long parameter,
                    boolean identifying)
Construct a new JobParameter as a Long.

Parameters:
parameter -

JobParameter

public JobParameter(Date parameter,
                    boolean identifying)
Construct a new JobParameter as a Date.

Parameters:
parameter -

JobParameter

public JobParameter(Double parameter,
                    boolean identifying)
Construct a new JobParameter as a Double.

Parameters:
parameter -

JobParameter

public JobParameter(String parameter)
Construct a new JobParameter as a String.


JobParameter

public JobParameter(Long parameter)
Construct a new JobParameter as a Long.

Parameters:
parameter -

JobParameter

public JobParameter(Date parameter)
Construct a new JobParameter as a Date.

Parameters:
parameter -

JobParameter

public JobParameter(Double parameter)
Construct a new JobParameter as a Double.

Parameters:
parameter -
Method Detail

isIdentifying

public boolean isIdentifying()

getValue

public Object getValue()
Returns:
the value contained within this JobParameter.

getType

public JobParameter.ParameterType getType()
Returns:
a ParameterType representing the type of this parameter.

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2013 SpringSource. All Rights Reserved.