Package com.avoka.fc.core.dao
Class UserPortalPrefDao<T>
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.UserPortalPrefDao<T>
-
- Type Parameters:
T
- the preference object type
public class UserPortalPrefDao<T> extends AbstractDao
Provides a User Portal Preferences Data Access Object (DAO).
-
-
Field Summary
-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description UserPortalPrefDao(Class<T> prefsClass)
Package constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getPrefString(UserAccount user, Portal portal)
Return the user's portal preferences string.T
loadPrefObject(UserAccount user, Portal portal)
Load the user's portal preferences object.void
setPrefString(UserAccount user, Portal portal, String prefs)
Set the preference string for the given user and portal.void
storePrefObject(UserAccount user, Portal portal, T userPref)
Store the user portal preferences object.-
Methods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
-
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
-
-
-
Method Detail
-
loadPrefObject
public T loadPrefObject(UserAccount user, Portal portal)
Load the user's portal preferences object.- Parameters:
user
- the associated userportal
- 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 userportal
- the associated portaluserPref
- 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
-
-