com.atlassian.confluence.userstatus
Interface UserStatusDao

All Superinterfaces:
ContentEntityObjectDao, ObjectDao, VersionedObjectDao
All Known Implementing Classes:
HibernateUserStatusDao

public interface UserStatusDao
extends ContentEntityObjectDao

Interface to the persisted user status objects


Method Summary
 void clearCurrentUserStatus(String username)
          Clears the current status of the specified user
 void clearCurrentUserStatus(com.atlassian.user.User user)
          Clears the current status of the specified user
 void clearUserStatus(UserStatus status)
          Clears the specified status if it is current
 List<UserStatus> getAllByUser(String username)
          Return a list of all user status updates from the specified user
 List<UserStatus> getAllByUser(String username, int maxResults)
          Returns a list of user status updates from a specified user with a specified number of results.
 List<UserStatus> getAllByUser(com.atlassian.user.User user)
          Return a list of all user status updates from the specified user.
 List<UserStatus> getAllByUser(com.atlassian.user.User user, int maxResults)
          Returns a list of user status updates from a specified user with a specified number of results.
 UserStatus getById(long id)
          Gets a user status by its id
 UserStatus getByUser(String username)
          Gets the current user status.
 UserStatus getByUser(com.atlassian.user.User user)
          Gets the current user status.
 int getUserStatusCount(String username)
          Returns the total number of user statuses stored against the specified user.
 int getUserStatusCount(com.atlassian.user.User user)
          Returns the total number of user statuses stored against the specified user.
 void removeAllStatusesForUser(String username)
          Remove all user statuses for a particular user
 void removeAllStatusesForUser(com.atlassian.user.User user)
          Remove all user statuses for a particular user
 
Methods inherited from interface com.atlassian.confluence.core.persistence.ContentEntityObjectDao
countContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findPreviousVersions, getAllCurrentEntities, getContentAuthoredByUser, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getLockedContentBySpace, getObjectType, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getVersion, getVersionHistorySummary
 
Methods inherited from interface com.atlassian.confluence.core.persistence.VersionedObjectDao
findLatestVersionsCount, findLatestVersionsIterator, save
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

Method Detail

getByUser

UserStatus getByUser(String username)
Gets the current user status. If there is no status for that user null is returned.

Parameters:
username - the specified user name
Returns:
the current user status, or null if no status exists

getByUser

UserStatus getByUser(com.atlassian.user.User user)
Gets the current user status. If there is no status for that user null is returned.

Parameters:
user - the user object
Returns:
the current user status, or null if no status exists

getById

UserStatus getById(long id)
Gets a user status by its id

Specified by:
getById in interface ContentEntityObjectDao
Parameters:
id - the status id
Returns:
a user status

getAllByUser

List<UserStatus> getAllByUser(String username)
Return a list of all user status updates from the specified user

Parameters:
username - the username of user to find status updates for
Returns:
a list of user status updates

getAllByUser

List<UserStatus> getAllByUser(com.atlassian.user.User user)
Return a list of all user status updates from the specified user. If there are no statuses an empty list is returned.

Parameters:
user - the user to find status updates for
Returns:
a list of user status updates

getAllByUser

List<UserStatus> getAllByUser(com.atlassian.user.User user,
                              int maxResults)
Returns a list of user status updates from a specified user with a specified number of results. If there are no statuses an empty list is returned.

Parameters:
user - the user to find status updates for
maxResults - the maximum number of results to return
Returns:
a list of user status updates

getAllByUser

List<UserStatus> getAllByUser(String username,
                              int maxResults)
Returns a list of user status updates from a specified user with a specified number of results. If there are no statuses an empty list is returned.

Parameters:
username - the user to find status updates for
maxResults - the maximum number of results to return
Returns:
a list of user status updates

getUserStatusCount

int getUserStatusCount(String username)
Returns the total number of user statuses stored against the specified user.

Parameters:
username - the user to count the statuses for
Returns:
the number of user statuses

getUserStatusCount

int getUserStatusCount(com.atlassian.user.User user)
Returns the total number of user statuses stored against the specified user.

Parameters:
user - the user to count the statuses for
Returns:
the number of user statuses

clearCurrentUserStatus

void clearCurrentUserStatus(com.atlassian.user.User user)
Clears the current status of the specified user

Parameters:
user - - the user to clear the status for

clearCurrentUserStatus

void clearCurrentUserStatus(String username)
Clears the current status of the specified user

Parameters:
username - - the user to clear the status for

clearUserStatus

void clearUserStatus(UserStatus status)
Clears the specified status if it is current

Parameters:
status - - the status to clear

removeAllStatusesForUser

void removeAllStatusesForUser(String username)
Remove all user statuses for a particular user

Parameters:
username - - name of the specified user

removeAllStatusesForUser

void removeAllStatusesForUser(com.atlassian.user.User user)
Remove all user statuses for a particular user

Parameters:
user - - the specified user


Copyright © 2003-2011 Atlassian. All Rights Reserved.