Class UserPortalPrefDao<T>

  • Type Parameters:
    T - the preference object type

    public class UserPortalPrefDao<T>
    extends AbstractDao
    Provides a User Portal Preferences Data Access Object (DAO).
    • Constructor Detail

      • UserPortalPrefDao

        public UserPortalPrefDao​(Class<T> prefsClass)
        Package constructor.
        Parameters:
        prefsClass - the preferences class
    • Method Detail

      • loadPrefObject

        public T loadPrefObject​(UserAccount user,
                                Portal portal)
        Load the user's portal preferences object.
        Parameters:
        user - the associated user
        portal - the portal application
        Returns:
        user's portal preferences object
      • storePrefObject

        public void storePrefObject​(UserAccount user,
                                    Portal portal,
                                    T userPref)
        Store the user portal preferences object.
        Parameters:
        user - the current user
        portal - the associated portal
        userPref - the preferences object
      • setPrefString

        public void setPrefString​(UserAccount user,
                                  Portal portal,
                                  String prefs)
        Set the preference string for the given user and portal. Note that no marshallimg will be done, the string is simply stored as is.
        Parameters:
        user - the user (required)
        portal - the portal (required)
        prefs - the string representing the preferences
        Since:
        4.2.0
      • getPrefString

        public String getPrefString​(UserAccount user,
                                    Portal portal)
        Return the user's portal preferences string.
        Parameters:
        user - the user (required)
        portal - the portal (required)
        Returns:
        the preference string, or null if no preferences exist for this portal
        Since:
        4.2.0