public final class DatastoreService extends Object
Modifier and Type | Field and Description |
---|---|
static String |
VALUE_FALSE |
static String |
VALUE_TRUE |
Modifier and Type | Method and Description |
---|---|
static boolean |
existsInstanceKey(String strKey)
Check if a key is available in the datastore depending the current web app instance
|
static boolean |
existsKey(String strKey)
Check if a key is available in the datastore
|
static ReferenceList |
getDataByPrefix(String strPrefix)
Gets a list of key/value where keys are matching a given prefix
|
static String |
getDataValue(String strKey,
String strDefault)
Get entity
|
static ReferenceList |
getInstanceDataByPrefix(String strPrefix)
Gets a list of key/value where keys are matching a given prefix depending the current web app instance
|
static String |
getInstanceDataValue(String strKey,
String strDefault)
Get entity depending the current web app instance
|
static void |
init()
initialize the service
|
static void |
removeData(String strKey)
Remove a give key
|
static void |
removeDataByPrefix(String strPrefix)
Remove all data where keys begin with a given prefix
|
static void |
removeInstanceData(String strKey)
Remove a give key depending the current web app instance
|
static void |
removeInstanceDataByPrefix(String strPrefix)
Remove all data where keys begin with a given prefix depending the current web app instance
|
static String |
replaceKeys(String strSource)
This method replace keys by their value into a given content
|
static void |
setDataValue(String strKey,
String strValue)
Set entity
|
static void |
setInstanceDataValue(String strKey,
String strValue)
Set entity depending the current web app instance
|
static void |
startCache()
Start cache.
|
public static final String VALUE_TRUE
public static final String VALUE_FALSE
public static void init()
public static String getDataValue(String strKey, String strDefault)
strKey
- The entity's keystrDefault
- The default valuepublic static String getInstanceDataValue(String strKey, String strDefault)
strKey
- The entity's keystrDefault
- The default valuepublic static void setDataValue(String strKey, String strValue)
strKey
- The entity's keystrValue
- The valuepublic static void setInstanceDataValue(String strKey, String strValue)
strKey
- The entity's keystrValue
- The valuepublic static void removeData(String strKey)
strKey
- The keypublic static void removeInstanceData(String strKey)
strKey
- The keypublic static void removeDataByPrefix(String strPrefix)
strPrefix
- The prefixpublic static void removeInstanceDataByPrefix(String strPrefix)
strPrefix
- The prefixpublic static ReferenceList getDataByPrefix(String strPrefix)
strPrefix
- The prefixpublic static ReferenceList getInstanceDataByPrefix(String strPrefix)
strPrefix
- The prefixpublic static String replaceKeys(String strSource)
strSource
- The string that contains datastore keyspublic static boolean existsKey(String strKey)
strKey
- The keypublic static boolean existsInstanceKey(String strKey)
strKey
- The keypublic static void startCache()
Copyright © 2020 City of Paris. All rights reserved.