fr.paris.lutece.portal.business.prefs
Class AbstractUserPreferencesDAO

java.lang.Object
  extended by fr.paris.lutece.portal.business.prefs.AbstractUserPreferencesDAO
All Implemented Interfaces:
IPreferencesDAO
Direct Known Subclasses:
AdminUserPreferencesDAO, UserPreferencesDAO

public abstract class AbstractUserPreferencesDAO
extends Object
implements IPreferencesDAO

User Preferences DAO


Constructor Summary
AbstractUserPreferencesDAO()
           
 
Method Summary
 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 store(String strUserId, String strKey, String strValue)
          Store a preference for a given user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractUserPreferencesDAO

public AbstractUserPreferencesDAO()
Method Detail

load

public String load(String strUserId,
                   String strKey,
                   String strDefault)
Get a preference for a given user

Specified by:
load in interface IPreferencesDAO
Parameters:
strUserId - The user's ID
strKey - The preference's key
strDefault - The default value
Returns:
The preference's value

getUserId

public List<String> getUserId(String strKey,
                              String strValue)
Get the list of user id associated with the given key and value

Specified by:
getUserId in interface IPreferencesDAO
Parameters:
strKey - The preference's key
strValue - The preference's value
Returns:
The list of user id associated with the given key and value. If there is no user id associated with the parameters, then an empty list is returned

store

public void store(String strUserId,
                  String strKey,
                  String strValue)
Store a preference for a given user

Specified by:
store in interface IPreferencesDAO
Parameters:
strUserId - The user's ID
strKey - The preference's key
strValue - The value

keys

public List<String> keys(String strUserId)
Get all preference keys for a given user

Specified by:
keys in interface IPreferencesDAO
Parameters:
strUserId - The user's ID
Returns:
The keys

remove

public void remove(String strUserId)
Clear all preferences for a given user

Specified by:
remove in interface IPreferencesDAO
Parameters:
strUserId - The user's ID


Copyright © 2014 Mairie de Paris. All Rights Reserved.