Interface Storage
- All Superinterfaces:
IntermediateStorage
This interface handles the storage of StorageProviders KeyValue pairs.
Setting a new key with the Storage also sets the type for this key. e.g. a key that has been set with
setLong(key,value) can not be set with setString(key,value) again.
- Since:
- 10.0.34
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.novomind.ecom.api.iagent.persistence.storage.IntermediateStorage
IntermediateStorage.ValueType
-
Method Summary
Modifier and TypeMethodDescriptionsetBoolean
(String key, Boolean value) Sets the KeyValue pair for this Storage.Sets the KeyValue pair for this Storage.Sets the KeyValue pair for this Storage.setEncryptedString
(String key, String value) Sets the KeyValue pair for this Storage.Sets the KeyValue pair for this Storage.Sets the KeyValue pair for this Storage.void
store()
Stores the changes for the instance of this StorageProvider.Methods inherited from interface com.novomind.ecom.api.iagent.persistence.storage.IntermediateStorage
containsKey, get, getBoolean, getDate, getDouble, getEncryptedString, getKeySet, getLong, getString, getValueType, remove
-
Method Details
-
store
Stores the changes for the instance of this StorageProvider.- Throws:
PersistencyException
- is thrown on errors while persisting. Such as the StorageProvider that the KeyValue pairs belong to, is not persisted.
NOTE: Not all StorageProvider needs to be persited to store the KeyValue pairs.- Since:
- 10.0.34
-
setString
Sets the KeyValue pair for this Storage. The value type is String.- Specified by:
setString
in interfaceIntermediateStorage
- Parameters:
key
- the keyvalue
- the String value- Returns:
- this Storage instance
- Throws:
WrongTypeException
- is thrown when the type String is wrong for this key- Since:
- 10.0.34
-
setLong
Sets the KeyValue pair for this Storage. The value type is Long.- Specified by:
setLong
in interfaceIntermediateStorage
- Parameters:
key
- the keyvalue
- the Long value- Returns:
- this Storage instance
- Throws:
WrongTypeException
- is thrown when the type Long is wrong for this key- Since:
- 10.0.34
-
setDouble
Sets the KeyValue pair for this Storage. The value type is Double.- Specified by:
setDouble
in interfaceIntermediateStorage
- Parameters:
key
- the keyvalue
- the Double value- Returns:
- this Storage instance
- Throws:
WrongTypeException
- is thrown when the type Double is wrong for this key- Since:
- 10.0.34
-
setDate
Sets the KeyValue pair for this Storage. The value type is Date.- Specified by:
setDate
in interfaceIntermediateStorage
- Parameters:
key
- the keyvalue
- the Date value- Returns:
- this Storage instance
- Throws:
WrongTypeException
- is thrown when the type Date is wrong for this key- Since:
- 10.0.34
-
setBoolean
Sets the KeyValue pair for this Storage. The value type is Boolean.- Specified by:
setBoolean
in interfaceIntermediateStorage
- Parameters:
key
- the keyvalue
- the Boolean value- Returns:
- this Storage instance
- Throws:
WrongTypeException
- is thrown when the type Boolean is wrong for this key- Since:
- 10.0.34
-
setEncryptedString
Sets the KeyValue pair for this Storage. The value type is String. This string will be saved encrypted.- Specified by:
setEncryptedString
in interfaceIntermediateStorage
- Parameters:
key
- the keyvalue
- the String value- Returns:
- this Storage instance
- Throws:
WrongTypeException
- is thrown when the type String is wrong for this key or the type of the key is an unencrypted String- Since:
- 10.0.102
-