public abstract class AbstractUserPreferencesDAO extends Object implements IPreferencesDAO
Constructor and Description |
---|
AbstractUserPreferencesDAO() |
Modifier and Type | Method and Description |
---|---|
boolean |
existsKey(String strUserId,
String strKey)
Cheks if a preference key exists
|
boolean |
existsValueForKey(String strKey,
String strValue)
Checks if a value is already used for a preference given key
|
List<String> |
getUserId(String strKey,
String strValue)
Get the list of user id associated with the given key and value
|
List<String> |
keys(String strUserId)
Get all preference keys for a given user
|
String |
load(String strUserId,
String strKey,
String strDefault)
Get a preference for a given user
|
void |
remove(String strUserId)
Clear all preferences for a given user
|
void |
removeKey(String strUserId,
String strKey)
Clear all preferences for a given user
|
void |
removeKeyPrefix(String strUserId,
String strKeyPrefix)
Clear all preferences for a given user
|
void |
store(String strUserId,
String strKey,
String strValue)
Store a preference for a given user
|
public String load(String strUserId, String strKey, String strDefault)
load
in interface IPreferencesDAO
strUserId
- The user's IDstrKey
- The preference's keystrDefault
- The default valuepublic List<String> getUserId(String strKey, String strValue)
getUserId
in interface IPreferencesDAO
strKey
- The preference's keystrValue
- The preference's valuepublic void store(String strUserId, String strKey, String strValue)
store
in interface IPreferencesDAO
strUserId
- The user's IDstrKey
- The preference's keystrValue
- The valuepublic List<String> keys(String strUserId)
keys
in interface IPreferencesDAO
strUserId
- The user's IDpublic void remove(String strUserId)
remove
in interface IPreferencesDAO
strUserId
- The user's IDpublic void removeKey(String strUserId, String strKey)
removeKey
in interface IPreferencesDAO
strUserId
- The user's IDstrKey
- The preference's keypublic void removeKeyPrefix(String strUserId, String strKeyPrefix)
removeKeyPrefix
in interface IPreferencesDAO
strUserId
- The user's IDstrKeyPrefix
- The key prefixpublic boolean existsKey(String strUserId, String strKey)
existsKey
in interface IPreferencesDAO
strUserId
- The User IDstrKey
- The Pref keypublic boolean existsValueForKey(String strKey, String strValue)
existsValueForKey
in interface IPreferencesDAO
strKey
- The Pref keystrValue
- The Pref valueCopyright © 2020 City of Paris. All rights reserved.