Class UserPreferencesDaoImpl
java.lang.Object
com.atlassian.confluence.impl.user.preferences.dao.UserPreferencesDaoImpl
- All Implemented Interfaces:
UserPreferencesDao
DAO for configuring user preferences, a simple key-value store which accepts values of type
String
,
Boolean
, and Long
. A user preference is currently modeled by a BucketPropertySetItem
for
backwards compatibility with the predecessor API, OpenSymphony PropertySet.- Since:
- 9.4
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetUserPreference
(com.atlassian.sal.api.user.UserKey userKey, String key) getUserPreferences
(com.atlassian.sal.api.user.UserKey userKey) removeAllUserPreferences
(com.atlassian.sal.api.user.UserKey userKey) void
removeUserPreference
(com.atlassian.sal.api.user.UserKey userKey, String key) void
setUserPreference
(com.atlassian.sal.api.user.UserKey userKey, String key, boolean value) void
setUserPreference
(com.atlassian.sal.api.user.UserKey userKey, String key, long value) void
setUserPreference
(com.atlassian.sal.api.user.UserKey userKey, String key, String value)
-
Field Details
-
ENTITY_PREFIX
- See Also:
-
OSPS_KEY_LENGTH_LIMIT
public static final int OSPS_KEY_LENGTH_LIMIT- See Also:
-
OSPS_STR_COLUMN_LIMIT
public static final int OSPS_STR_COLUMN_LIMIT- See Also:
-
OSPS_TEXT_COLUMN_LIMIT
public static final int OSPS_TEXT_COLUMN_LIMIT- See Also:
-
OSPS_QUERY
- See Also:
-
OSPS_QUERY_KEYED
- See Also:
-
-
Constructor Details
-
UserPreferencesDaoImpl
public UserPreferencesDaoImpl(org.hibernate.SessionFactory sessionFactory)
-
-
Method Details
-
getUserPreferences
@Transactional(readOnly=true) public List<UserPreference> getUserPreferences(com.atlassian.sal.api.user.UserKey userKey) - Specified by:
getUserPreferences
in interfaceUserPreferencesDao
-
getUserPreference
@Transactional(readOnly=true) public Optional<UserPreference> getUserPreference(com.atlassian.sal.api.user.UserKey userKey, String key) - Specified by:
getUserPreference
in interfaceUserPreferencesDao
-
removeAllUserPreferences
- Specified by:
removeAllUserPreferences
in interfaceUserPreferencesDao
- Returns:
- the keys of the removed preferences
-
removeUserPreference
- Specified by:
removeUserPreference
in interfaceUserPreferencesDao
-
setUserPreference
- Specified by:
setUserPreference
in interfaceUserPreferencesDao
-
setUserPreference
public void setUserPreference(com.atlassian.sal.api.user.UserKey userKey, String key, boolean value) - Specified by:
setUserPreference
in interfaceUserPreferencesDao
-
setUserPreference
- Specified by:
setUserPreference
in interfaceUserPreferencesDao
-