Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.quartz
Class JobDataMap

    java.lang.Object
      org.quartz.utils.DirtyFlagMap
          org.quartz.JobDataMap

All Implemented Interfaces:
  Cloneable, Map, Serializable

public class JobDataMap
extends DirtyFlagMap
implements Serializable

Holds state information for `Job` instances.

`JobDataMap` instances are stored once when the `Job` is added to a scheduler. They are also re-persisted after every execution of `StatefulJob` instances.

`JobDataMap` instances can also be stored with a `Trigger`. This can be useful in the case where you have a Job that is stored in the scheduler for regular/repeated use by multiple Triggers, yet with each independent triggering, you want to supply the Job with different data inputs.

The `JobExecutionContext` passed to a Job at execution time also contains a convenience `JobDataMap` that is the result of merging the contents of the trigger's JobDataMap (if any) over the Job's JobDataMap (if any).

Author:
  James House
See Also:
  `Job`, `StatefulJob`, `Trigger`, `JobExecutionContext`, Serialized Form

Nested Class Summary

Nested classes inherited from class java.util.Map
`Map.Entry`

Constructor Summary
`JobDataMap()` Create an empty `JobDataMap`.
`JobDataMap(Map map)` Create a `JobDataMap` with the given data.

Method Summary
`boolean` | `containsTransientData()`
`boolean` | `getAllowsTransientData()`
`boolean` | `getBoolean(String key)` Retrieve the identified `boolean` value from the `JobDataMap`.
`Boolean` | `getBooleanFromString(String key)` Retrieve the identified `Boolean` value from the `JobDataMap`.
`boolean` | `getBooleanValue(String key)` Retrieve the identified `boolean` value from the `JobDataMap`.
`boolean` | `getBooleanValueFromString(String key)` Retrieve the identified `boolean` value from the `JobDataMap`.
`char` | `getChar(String key)` Retrieve the identified `char` value from the `JobDataMap`.
`Character` | `getCharacterFromString(String key)` Retrieve the identified `Character` value from the `JobDataMap`.
`char` | `getCharFromString(String key)` Retrieve the identified `char` value from the `JobDataMap`.
`double` | `getDouble(String key)` Retrieve the identified `double` value from the `JobDataMap`.
`Double` | `getDoubleFromString(String key)` Retrieve the identified `Double` value from the `JobDataMap`.
`double` | `getDoubleValue(String key)` Retrieve the identified `double` value from the `JobDataMap`.
`double` | `getDoubleValueFromString(String key)` Retrieve the identified `double` value from the `JobDataMap`.
`float` | `getFloat(String key)` Retrieve the identified `float` value from the `JobDataMap`.
`Float` | `getFloatFromString(String key)` Retrieve the identified `Float` value from the `JobDataMap`.
`float` | `getFloatValue(String key)` Retrieve the identified `float` value from the `JobDataMap`.
`float` | `getFloatValueFromString(String key)` Retrieve the identified `float` value from the `JobDataMap`.
`int` | `getInt(String key)` Retrieve the identified `int` value from the `JobDataMap`.
`Integer` | `getIntegerFromString(String key)` Retrieve the identified `int` value from the `JobDataMap`.
`int` | `getIntFromString(String key)` Retrieve the identified `int` value from the `JobDataMap`.
`long` | `getIntValue(String key)` Retrieve the identified `int` value from the `JobDataMap`.
`String[]` | `getKeys()`
`long` | `getLong(String key)` Retrieve the identified `long` value from the `JobDataMap`.
`Long` | `getLongFromString(String key)` Retrieve the identified `Long` value from the `JobDataMap`.
`long` | `getLongValue(String key)` Retrieve the identified `long` value from the `JobDataMap`.
`long` | `getLongValueFromString(String key)` Retrieve the identified `long` value from the `JobDataMap`.
`String` | `getString(String key)` Retrieve the identified `String` value from the `JobDataMap`.
`Object` | `put(Object key, Object value)` Adds the given `Serializable` object value to the `JobDataMap`.
`void` | `put(String key, boolean value)` Adds the given `boolean` value to the `Job`'s data map.
`void` | `put(String key, char value)` Adds the given `char` value to the `Job`'s data map.
`void` | `put(String key, double value)` Adds the given `double` value to the `Job`'s data map.
`void` | `put(String key, float value)` Adds the given `float` value to the `Job`'s data map.
`void` | `put(String key, int value)` Adds the given `int` value to the `Job`'s data map.
`void` | `put(String key, long value)` Adds the given `long` value to the `Job`'s data map.
`void` | `put(String key, String value)` Adds the given `String` value to the `Job`'s data map.
`void` | `putAll(Map map)` Adds the name-value pairs in the given `Map` to the `JobDataMap`.
`void` | `putAsString(String key, boolean value)` Adds the given `boolean` value as a string version to the `Job`'s data map.
`void` | `putAsString(String key, Boolean value)` Adds the given `Boolean` value as a string version to the `Job`'s data map.
`void` | `putAsString(String key, char value)` Adds the given `char` value as a string version to the `Job`'s data map.
`void` | `putAsString(String key, Character value)` Adds the given `Character` value as a string version to the `Job`'s data map.
`void` | `putAsString(String key, double value)` Adds the given `double` value as a string version to the `Job`'s data map.
`void` | `putAsString(String key, Double value)` Adds the given `Double` value as a string version to the `Job`'s data map.
`void` | `putAsString(String key, float value)` Adds the given `float` value as a string version to the `Job`'s data map.
`void` | `putAsString(String key, Float value)` Adds the given `Float` value as a string version to the `Job`'s data map.
`void` | `putAsString(String key, int value)` Adds the given `int` value as a string version to the `Job`'s data map.
`void` | `putAsString(String key, Integer value)` Adds the given `Integer` value as a string version to the `Job`'s data map.
`void` | `putAsString(String key, long value)` Adds the given `long` value as a string version to the `Job`'s data map.
`void` | `putAsString(String key, Long value)` Adds the given `Long` value as a string version to the `Job`'s data map.
`void` | `removeTransientData()` Nulls-out any data values that are non-Serializable.
`void` | `setAllowsTransientData(boolean allowsTransientData)` Tell the `JobDataMap` that it should allow non- `Serializable` data.

Methods inherited from class org.quartz.utils.DirtyFlagMap
`clear, clearDirtyFlag, clone, containsKey, containsValue, entrySet, equals, get, getWrappedMap, isDirty, isEmpty, isMutable, keySet, remove, setMutable, size, values`

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Map
`hashCode`

Constructor Detail

### JobDataMap

    public JobDataMap()

  Create an empty `JobDataMap`.

### JobDataMap

    public JobDataMap(Map map)

  Create a `JobDataMap` with the given data.

Method Detail

### setAllowsTransientData

    public void setAllowsTransientData(boolean allowsTransientData)

  Tell the `JobDataMap` that it should allow non- `Serializable` data.

  If the `JobDataMap` does contain non- `Serializable` objects, and it belongs to a non-volatile `Job` that is stored in a `JobStore` that supports persistence, then those elements will be nulled-out during persistence.

### getAllowsTransientData

    public boolean getAllowsTransientData()

### containsTransientData

    public boolean containsTransientData()

### removeTransientData

    public void removeTransientData()

  Nulls-out any data values that are non-Serializable.

### putAll

    public void putAll(Map map)

  Adds the name-value pairs in the given `Map` to the `JobDataMap`.

  All keys must be `String`s, and all values must be `Serializable`.

  Specified by:
    `putAll` in interface `Map`
  Overrides:
    `putAll` in class `DirtyFlagMap`

### put

    public void put(String key,
                    int value)

  Adds the given `int` value to the `Job`'s data map.

### put

    public void put(String key,
                    long value)

  Adds the given `long` value to the `Job`'s data map.

### put

    public void put(String key,
                    float value)

  Adds the given `float` value to the `Job`'s data map.

### put

    public void put(String key,
                    double value)

  Adds the given `double` value to the `Job`'s data map.

### put

    public void put(String key,
                    boolean value)

  Adds the given `boolean` value to the `Job`'s data map.

### put

    public void put(String key,
                    char value)

  Adds the given `char` value to the `Job`'s data map.

### put

    public void put(String key,
                    String value)

  Adds the given `String` value to the `Job`'s data map.

### putAsString

    public void putAsString(String key,
                            boolean value)

  Adds the given `boolean` value as a string version to the `Job`'s data map.

### putAsString

    public void putAsString(String key,
                            Boolean value)

  Adds the given `Boolean` value as a string version to the `Job`'s data map.

### putAsString

    public void putAsString(String key,
                            char value)

  Adds the given `char` value as a string version to the `Job`'s data map.

### putAsString

    public void putAsString(String key,
                            Character value)

  Adds the given `Character` value as a string version to the `Job`'s data map.

### putAsString

    public void putAsString(String key,
                            double value)

  Adds the given `double` value as a string version to the `Job`'s data map.

### putAsString

    public void putAsString(String key,
                            Double value)

  Adds the given `Double` value as a string version to the `Job`'s data map.

### putAsString

    public void putAsString(String key,
                            float value)

  Adds the given `float` value as a string version to the `Job`'s data map.

### putAsString

    public void putAsString(String key,
                            Float value)

  Adds the given `Float` value as a string version to the `Job`'s data map.

### putAsString

    public void putAsString(String key,
                            int value)

  Adds the given `int` value as a string version to the `Job`'s data map.

### putAsString

    public void putAsString(String key,
                            Integer value)

  Adds the given `Integer` value as a string version to the `Job`'s data map.

### putAsString

    public void putAsString(String key,
                            long value)

  Adds the given `long` value as a string version to the `Job`'s data map.

### putAsString

    public void putAsString(String key,
                            Long value)

  Adds the given `Long` value as a string version to the `Job`'s data map.

### put

    public Object put(Object key,
                      Object value)

  Adds the given `Serializable` object value to the `JobDataMap`.

  Specified by:
    `put` in interface `Map`
  Overrides:
    `put` in class `DirtyFlagMap`

### getInt

    public int getInt(String key)

  Retrieve the identified `int` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not an Integer.

### getLong

    public long getLong(String key)

  Retrieve the identified `long` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a Long.

### getFloat

    public float getFloat(String key)

  Retrieve the identified `float` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a Float.

### getDouble

    public double getDouble(String key)

  Retrieve the identified `double` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a Double.

### getBoolean

    public boolean getBoolean(String key)

  Retrieve the identified `boolean` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a Boolean.

### getChar

    public char getChar(String key)

  Retrieve the identified `char` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a Character.

### getString

    public String getString(String key)

  Retrieve the identified `String` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getIntFromString

    public int getIntFromString(String key)

  Retrieve the identified `int` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getIntValue

    public long getIntValue(String key)

  Retrieve the identified `int` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String or Integeger.

### getIntegerFromString

    public Integer getIntegerFromString(String key)

  Retrieve the identified `int` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getBooleanValueFromString

    public boolean getBooleanValueFromString(String key)

  Retrieve the identified `boolean` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getBooleanValue

    public boolean getBooleanValue(String key)

  Retrieve the identified `boolean` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String or Boolean.

### getBooleanFromString

    public Boolean getBooleanFromString(String key)

  Retrieve the identified `Boolean` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getCharFromString

    public char getCharFromString(String key)

  Retrieve the identified `char` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getCharacterFromString

    public Character getCharacterFromString(String key)

  Retrieve the identified `Character` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getDoubleValueFromString

    public double getDoubleValueFromString(String key)

  Retrieve the identified `double` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getDoubleValue

    public double getDoubleValue(String key)

  Retrieve the identified `double` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String or Double.

### getDoubleFromString

    public Double getDoubleFromString(String key)

  Retrieve the identified `Double` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getFloatValueFromString

    public float getFloatValueFromString(String key)

  Retrieve the identified `float` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getFloatValue

    public float getFloatValue(String key)

  Retrieve the identified `float` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String or Float.

### getFloatFromString

    public Float getFloatFromString(String key)

  Retrieve the identified `Float` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getLongValueFromString

    public long getLongValueFromString(String key)

  Retrieve the identified `long` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getLongValue

    public long getLongValue(String key)

  Retrieve the identified `long` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String or Long.

### getLongFromString

    public Long getLongFromString(String key)

  Retrieve the identified `Long` value from the `JobDataMap`.

  Throws:
    `ClassCastException` - if the identified object is not a String.

### getKeys

    public String[] getKeys()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Quartz Enterprise Job Scheduler Project Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD