Package com.artifex.solib
Class DefaultPersistentStorage
java.lang.Object
com.artifex.solib.DefaultPersistentStorage
- All Implemented Interfaces:
SOPersistentStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllStringPreferences(Object storageObject) This method will be called to retrieve all entries from the persistent store.getStorageObject(android.content.Context context, String storeName) This method will be called to obtain a storage object for the named store.getStringPreference(Object storageObject, String key, String defaultValue) This method will be called to retrieve data, identified by key, from the store.
The default value should be returned if the key does not reside in the store.voidremovePreference(Object storageObject, String key) This method will be called to remove an entry from the persistent store.voidsetStringPreference(Object storageObject, String key, String value) This method will be called to set a key/value pair in the store.
-
Constructor Details
-
DefaultPersistentStorage
public DefaultPersistentStorage()
-
-
Method Details
-
getStorageObject
This method will be called to obtain a storage object for the named store.- Specified by:
getStorageObjectin interfaceSOPersistentStorage- Parameters:
context- The application contextstoreName- The data store identifier- Returns:
- The object to be used to manage the persistent store.
-
setStringPreference
This method will be called to set a key/value pair in the store.- Specified by:
setStringPreferencein interfaceSOPersistentStorage- Parameters:
context- The object to be used to manage the persistent storekey- The data keyvalue- The data value
-
getStringPreference
This method will be called to retrieve data, identified by key, from the store.
The default value should be returned if the key does not reside in the store.- Specified by:
getStringPreferencein interfaceSOPersistentStorage- Parameters:
context- The object to be used to manage the persistent storekey- The data keydefaultValue- The default data value- Returns:
- The current author name.
-
getAllStringPreferences
This method will be called to retrieve all entries from the persistent store.
This method is not required to be implemented.- Specified by:
getAllStringPreferencesin interfaceSOPersistentStorage- Parameters:
storageObject- The object to be used to manage the store.- Returns:
- The retrieved key/value pairs.
-
removePreference
This method will be called to remove an entry from the persistent store. .
This method is not required to be implemented.- Specified by:
removePreferencein interfaceSOPersistentStorage- Parameters:
storageObject- The object to be used to manage the store.key- The data key
-