Class JobParametersEvent

java.lang.Object
org.springframework.cloud.task.batch.listener.support.JobParametersEvent

public class JobParametersEvent extends Object
This is a JobParametersEvent DTO created so that a JobParameters can be serialized into Json without having to add mixins to an ObjectMapper.
Author:
Glenn Renfro
  • Constructor Details

    • JobParametersEvent

      public JobParametersEvent()
    • JobParametersEvent

      public JobParametersEvent(Map<String,org.springframework.batch.core.JobParameter<?>> jobParameters)
  • Method Details

    • getLong

      @Deprecated(since="3.0") public Long getLong(String key)
      Deprecated.
      Typesafe Getter for the Long represented by the provided key.
      Parameters:
      key - The key to get a value for
      Returns:
      The Long value
    • getLong

      @Deprecated(since="3.0") public Long getLong(String key, long defaultValue)
      Deprecated.
      Typesafe Getter for the Long represented by the provided key. If the key does not exist, the default value will be returned.
      Parameters:
      key - to return the value for
      defaultValue - to return if the value doesn't exist
      Returns:
      the parameter represented by the provided key, defaultValue otherwise.
    • getString

      @Deprecated(since="3.0") public String getString(String key)
      Deprecated.
      Typesafe Getter for the String represented by the provided key.
      Parameters:
      key - The key to get a value for
      Returns:
      The String value
    • getString

      @Deprecated(since="3.0") public String getString(String key, String defaultValue)
      Deprecated.
      Typesafe Getter for the String represented by the provided key. If the key does not exist, the default value will be returned.
      Parameters:
      key - to return the value for
      defaultValue - to return if the value doesn't exist
      Returns:
      the parameter represented by the provided key, defaultValue otherwise.
    • getDouble

      @Deprecated(since="3.0") public Double getDouble(String key)
      Deprecated.
      Typesafe Getter for the Long represented by the provided key.
      Parameters:
      key - The key to get a value for
      Returns:
      The Double value
    • getDouble

      @Deprecated(since="3.0") public Double getDouble(String key, double defaultValue)
      Deprecated.
      Typesafe Getter for the Double represented by the provided key. If the key does not exist, the default value will be returned.
      Parameters:
      key - to return the value for
      defaultValue - to return if the value doesn't exist
      Returns:
      the parameter represented by the provided key, defaultValue otherwise.
    • getDate

      @Deprecated(since="3.0") public Date getDate(String key)
      Deprecated.
      Typesafe Getter for the Date represented by the provided key.
      Parameters:
      key - The key to get a value for
      Returns:
      The java.util.Date value
    • getDate

      @Deprecated(since="3.0") public Date getDate(String key, Date defaultValue)
      Deprecated.
      Typesafe Getter for the Date represented by the provided key. If the key does not exist, the default value will be returned.
      Parameters:
      key - to return the value for
      defaultValue - to return if the value doesn't exist
      Returns:
      the parameter represented by the provided key, defaultValue otherwise.
    • getParameters

      public Map<String,JobParameterEvent> getParameters()
      Get a map of all parameters, including string, long, and date.
      Returns:
      an unmodifiable map containing all parameters.
    • isEmpty

      public boolean isEmpty()
      Returns:
      true if the parameters is empty, false otherwise.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toProperties

      public Properties toProperties()