org.springframework.batch.core

## Class JobParameter

- java.lang.Object
- - org.springframework.batch.core.JobParameter

- All Implemented Interfaces:
    java.io.Serializable

      public class JobParameter
      extends java.lang.Object
      implements java.io.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

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JobParameter.ParameterType` Enumeration representing the type of a JobParameter.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JobParameter(java.util.Date parameter)` Construct a new JobParameter as a Date.
    `JobParameter(java.util.Date parameter, boolean identifying)` Construct a new JobParameter as a Date.
    `JobParameter(java.lang.Double parameter)` Construct a new JobParameter as a Double.
    `JobParameter(java.lang.Double parameter, boolean identifying)` Construct a new JobParameter as a Double.
    `JobParameter(java.lang.Long parameter)` Construct a new JobParameter as a Long.
    `JobParameter(java.lang.Long parameter, boolean identifying)` Construct a new JobParameter as a Long.
    `JobParameter(java.lang.String parameter)` Construct a new JobParameter as a String.
    `JobParameter(java.lang.String parameter, boolean identifying)` Construct a new JobParameter as a String.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `JobParameter.ParameterType` | `getType()`
    `java.lang.Object` | `getValue()`
    `int` | `hashCode()`
    `boolean` | `isIdentifying()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### JobParameter

          public JobParameter(java.lang.String parameter,
                              boolean identifying)

      Construct a new JobParameter as a String.

    - #### JobParameter

          public JobParameter(java.lang.Long parameter,
                              boolean identifying)

      Construct a new JobParameter as a Long.
      Parameters:
        `parameter` -

    - #### JobParameter

          public JobParameter(java.util.Date parameter,
                              boolean identifying)

      Construct a new JobParameter as a Date.
      Parameters:
        `parameter` -

    - #### JobParameter

          public JobParameter(java.lang.Double parameter,
                              boolean identifying)

      Construct a new JobParameter as a Double.
      Parameters:
        `parameter` -

    - #### JobParameter

          public JobParameter(java.lang.String parameter)

      Construct a new JobParameter as a String.

    - #### JobParameter

          public JobParameter(java.lang.Long parameter)

      Construct a new JobParameter as a Long.
      Parameters:
        `parameter` -

    - #### JobParameter

          public JobParameter(java.util.Date parameter)

      Construct a new JobParameter as a Date.
      Parameters:
        `parameter` -

    - #### JobParameter

          public JobParameter(java.lang.Double parameter)

      Construct a new JobParameter as a Double.
      Parameters:
        `parameter` -

  - ### Method Detail

    - #### isIdentifying

          public boolean isIdentifying()

    - #### getValue

          public java.lang.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(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`