ParameterMaps, channelCache, and messageCache in QIE are all key-value variables that let you store and retrieve data using a unique key name. The main difference between them is scope and syntax. channelCache stores values shared across the entire channel and is accessible throughout the interface; messageCache stores data specific values for a single message as it moves through the channel; and parameterMaps typically hold named key-value values within a given script or step. While channelCache and messageCache use function-style access like getValue(key) and setValue(key, value), parameterMaps use Java-style methods such as get(key) and put(key, value). Despite the differences in how they're accessed, all three are used to temporarily manage data in the form of key-value pairs during interface execution.
For a list a parameterMap Methods see Java Docs HashMap methods: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/HashMap.html?utm_source=chatgpt.com
Here is a table listing the popular HashMap (parameterMap) methods along with the QIE channelCache and messageCache functions.
Operation | parameterMaps (Methods) | channelCache & messageCache (Functions) |
---|
Check if key exists | map.containsKey("key") | channelCache.checkValueExists("key") messageCache.checkValueExists("key") |
Get value | map.get("key") | channelCache.getValue("key") messageCache.getValue("key") |
Set value | map.put("key", "value") | channelCache.setValue("key", "value") messageCache.setValue("key", "value") |
Remove value | map.remove("key") | channelCache.removeValue("key") |
Get as boolean | (Use cast or comparison logic) | channelCache.getBoolean("key", defaultValue) |
Get as number | Number(map.get("key")) | channelCache.getNumber("key", defaultValue) |
Get as date | Use map.get then parse with QIE date functions | channelCache.getDate("key", defaultValue) |
Iterate over keys | map.keySet().toArray() | |
Get size | map.size() | |
Clear all entries | map.clear() | |
Contains a Key | map.containsKey(Object key) | |
Contains a Value | map.containsValue(Object value) | |
Remove All entries | map.clear() | |
Returns all key entries | map.keySet() | |
Returns all Value entries | map.valueSet() | |
Returns all keys and entries | map.entrySet() | |