Package org.springframework.batch.core
Class JobParameter
java.lang.Object
org.springframework.batch.core.JobParameter
- All Implemented Interfaces:
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, Mahmoud Ben Hassine
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionJobParameter
(Double parameter) Construct a newJobParameter
from aDouble
.JobParameter
(Double parameter, boolean identifying) Construct a newJobParameter
from aDouble
.JobParameter
(Long parameter) Construct a newJobParameter
from aLong
.JobParameter
(Long parameter, boolean identifying) Construct a newJobParameter
from aLong
.JobParameter
(String parameter) Construct a newJobParameter
from aString
.JobParameter
(String parameter, boolean identifying) Construct a newJobParameter
from aString
.JobParameter
(Date parameter) Construct a newJobParameter
as aDate
.JobParameter
(Date parameter, boolean identifying) Construct a newJobParameter
from aDate
. -
Method Summary
-
Constructor Details
-
JobParameter
Construct a newJobParameter
from aString
.- Parameters:
parameter
-String
instance. Must not benull
.identifying
-true
if theJobParameter
should be identifying.
-
JobParameter
Construct a newJobParameter
from aLong
.- Parameters:
parameter
-Long
instance. Must not benull
.identifying
-true
if theJobParameter
should be identifying.
-
JobParameter
Construct a newJobParameter
from aDate
.- Parameters:
parameter
-Date
instance. Must not benull
.identifying
-true
if theJobParameter
should be identifying.
-
JobParameter
Construct a newJobParameter
from aDouble
.- Parameters:
parameter
-Double
instance. Must not benull
.identifying
-true
if theJobParameter
should be identifying.
-
JobParameter
Construct a newJobParameter
from aString
.- Parameters:
parameter
- AString
instance.
-
JobParameter
Construct a newJobParameter
from aLong
.- Parameters:
parameter
- ALong
instance.
-
JobParameter
Construct a newJobParameter
as aDate
.- Parameters:
parameter
- ADate
instance.
-
JobParameter
Construct a newJobParameter
from aDouble
.- Parameters:
parameter
- ADouble
instance.
-
-
Method Details
-
isIdentifying
public boolean isIdentifying()- Returns:
- The identifying flag. It is set to
true
if the job parameter is identifying.
-
getValue
- Returns:
- the value contained within this
JobParameter
.
-
getType
- Returns:
- a
JobParameter.ParameterType
representing the type of this parameter.
-
equals
-
toString
-
hashCode
public int hashCode()
-