public class BaseUserPreferencesServiceImpl extends Object implements IUserPreferencesService, org.springframework.beans.factory.InitializingBean
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
clear(String strUserId)
Clear all preferences for a given user
|
void |
clearKey(String strUserId,
String strKey)
Clear a preference for a given user
|
void |
clearKeyPrefix(String strUserId,
String strPrefix)
Clear all preferences with a given prefix for a given user
|
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
|
String |
get(String strUserId,
String strKey,
String strDefault)
Get a preference for a given user
|
boolean |
getBoolean(String strUserId,
String strKey,
boolean bDefault)
Get a boolean preference for a given user
|
int |
getInt(String strUserId,
String strKey,
int nDefault)
Get an integer preference for a given user
|
List<String> |
getUsers(String strKey,
String strValue)
Get the list of users associated with a key and a value
|
List<String> |
keys(String strUserId)
Get all preference keys for a given user
|
void |
put(String strUserId,
String strKey,
String strValue)
Put a preference for a given user
|
void |
putBoolean(String strUserId,
String strKey,
boolean bValue)
Put a boolean preference for a given user
|
void |
putInt(String strUserId,
String strKey,
int nValue)
Put an integer preference for a given user
|
void |
setDao(IPreferencesDAO dao)
Sets the DAO
|
public void setDao(IPreferencesDAO dao)
dao
- The DAOpublic String get(String strUserId, String strKey, String strDefault)
get
in interface IUserPreferencesService
strUserId
- The user's IDstrKey
- The preference's keystrDefault
- The default valuepublic int getInt(String strUserId, String strKey, int nDefault)
getInt
in interface IUserPreferencesService
strUserId
- The user's IDstrKey
- The preference's keynDefault
- The default valuepublic boolean getBoolean(String strUserId, String strKey, boolean bDefault)
getBoolean
in interface IUserPreferencesService
strUserId
- The user's IDstrKey
- The preference's keybDefault
- The default valuepublic void put(String strUserId, String strKey, String strValue)
put
in interface IUserPreferencesService
strUserId
- The user's IDstrKey
- The preference's keystrValue
- The valuepublic void putInt(String strUserId, String strKey, int nValue)
putInt
in interface IUserPreferencesService
strUserId
- The user's IDstrKey
- The preference's keynValue
- The valuepublic void putBoolean(String strUserId, String strKey, boolean bValue)
putBoolean
in interface IUserPreferencesService
strUserId
- The user's IDstrKey
- The preference's keybValue
- The valuepublic List<String> keys(String strUserId)
keys
in interface IUserPreferencesService
strUserId
- The user's IDpublic void clear(String strUserId)
clear
in interface IUserPreferencesService
strUserId
- The user's IDpublic void clearKey(String strUserId, String strKey)
clearKey
in interface IUserPreferencesService
strUserId
- The user's IDstrKey
- The preference's keypublic void clearKeyPrefix(String strUserId, String strPrefix)
clearKeyPrefix
in interface IUserPreferencesService
strUserId
- The user's IDstrPrefix
- The keys prefixpublic boolean existsKey(String strUserId, String strKey)
existsKey
in interface IUserPreferencesService
strUserId
- The User IDstrKey
- The Pref keypublic List<String> getUsers(String strKey, String strValue)
getUsers
in interface IUserPreferencesService
strKey
- The preference's keystrValue
- The preference's valuepublic void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public boolean existsValueForKey(String strKey, String strValue)
IUserPreferencesService
existsValueForKey
in interface IUserPreferencesService
strKey
- The Pref keystrValue
- The Pref ValueCopyright © 2020 City of Paris. All rights reserved.