Class JobParameter<T>

java.lang.Object
org.springframework.batch.core.JobParameter<T>
All Implemented Interfaces:
Serializable

public class JobParameter<T> extends Object implements Serializable
Domain representation of a parameter to a batch job. 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, Song JaeGeun
See Also:
  • Constructor Details

    • JobParameter

      public JobParameter(@NonNull T value, @NonNull Class<T> type, boolean identifying)
      Create a new JobParameter.
      Parameters:
      value - the value of the parameter. Must not be null.
      type - the type of the parameter. Must not be null.
      identifying - true if the parameter is identifying. false otherwise.
    • JobParameter

      public JobParameter(@NonNull T value, @NonNull Class<T> type)
      Create a new identifying JobParameter.
      Parameters:
      value - the value of the parameter. Must not be null.
      type - the type of the parameter. Must not be null.
  • Method Details

    • isIdentifying

      public boolean isIdentifying()
      Returns:
      The identifying flag. It is set to true if the job parameter is identifying.
    • getValue

      public T getValue()
      Returns:
      the value contained within this JobParameter.
    • getType

      public Class<T> getType()
      Return the type of the parameter.
      Returns:
      the type of the 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