public interface ProfileDao
| Modifier and Type | Method and Description |
|---|---|
boolean |
addNewCommentToWallItem(WallItemComment wallItemComment)
Adds a new wall item comment.
|
boolean |
addNewCompanyProfile(CompanyProfile companyProfile)
Save a new CompanyProfile record
|
boolean |
addNewConnection(ProfileFriend profileFriend)
Save a new connection record
|
boolean |
addNewGalleryImage(GalleryImage galleryImage)
Add a new GalleryImage record
|
ProfilePreferences |
addNewPreferencesRecord(ProfilePreferences prefs)
Persist a new ProfilePreferences record and return it.
|
ProfilePrivacy |
addNewPrivacyRecord(ProfilePrivacy privacy)
Add a new ProfilePrivacy record
|
boolean |
addNewProfileImage(ProfileImageUploaded profileImage)
Add a new profile image record to the database.
|
boolean |
addNewWallItemForUser(String userUuid,
WallItem item)
Adds a wall item for the specified user.
|
boolean |
clearUserStatus(ProfileStatus profileStatus)
Remove the ProfileStatus record for a user
|
List<String> |
findSakaiPersonsByInterest(String search,
boolean includeBusinessBio)
Get a list of all userIds that match the search criteria in the interest fields.
|
List<String> |
findSakaiPersonsByNameOrEmail(String search)
Get a list of all userIds that match the search criteria in name or email
|
List<String> |
getAllSakaiPersonIds()
Get a list of uuids for all users that have a SakaiPerson record
|
int |
getAllSakaiPersonIdsCount()
Get a total count of all users with SakaiPerson records
|
int |
getAllUnreadMessagesCount(String userId)
Get a count of all unread messages for a user
|
CompanyProfile |
getCompanyProfile(String userId,
long companyProfileId)
Get the CompanyProfile record for a user and company ID
|
List<CompanyProfile> |
getCompanyProfiles(String userId)
Get all CompanyProfile records for a user
|
List<String> |
getConfirmedConnectionUserIdsForUser(String userId)
Get a list of confirmed connections for a given user.
|
ProfileFriend |
getConnectionRecord(String userId,
String friendId)
Get a connection record for a user/friend pair
This tries both column arrangements, ie user/friend and friend/user
|
ProfileImageUploaded |
getCurrentProfileImageRecord(String userId)
Get the current ProfileImage record from the database.
|
List<ProfileImageUploaded> |
getCurrentProfileImageRecords(String userId)
Get the current ProfileImage records from the database.
|
ProfileImageExternal |
getExternalImageRecordForUser(String userId)
Get a ProfileImageExternal record for a user
|
ExternalIntegrationInfo |
getExternalIntegrationInfo(String userUuid)
Get the ExternalIntegrationInfo record for a user
|
GalleryImage |
getGalleryImageRecord(String userId,
long imageId)
Get the GalleryImage record for a user and image ID
|
List<GalleryImage> |
getGalleryImages(String userId)
Get all GalleryImage records for a user
|
int |
getGalleryImagesCount(String userUuid)
Get a count of all gallery images that a user has
|
ProfileKudos |
getKudos(String userUuid)
Get the kudos record for a user
|
Message |
getLatestMessageInThread(String threadId)
Get the latest Message in a MessageThread
|
Message |
getMessage(String id)
Get a Message record
|
MessageParticipant |
getMessageParticipant(String messageId,
String userUuid)
Get a MessageParticipant record for the given message and user id
|
List<Message> |
getMessagesInThread(String threadId)
Get a list of all Messages in a given thread
|
int |
getMessagesInThreadCount(String threadId)
Get a count of all Messages in a given thread
|
MessageThread |
getMessageThread(String threadId)
Get a MessageThread record
|
List<MessageThread> |
getMessageThreads(String userId)
Get a list of MessageThreads for a user
|
int |
getMessageThreadsCount(String userId)
Get a count of all message threads for a user
|
ProfileImageOfficial |
getOfficialImageRecordForUser(String userUuid)
Get the ProfileImageOfficial record from the database for the given user
|
List<ProfileImageUploaded> |
getOtherProfileImageRecords(String userId)
Get old ProfileImage records from the database.
|
ProfileFriend |
getPendingConnection(String userId,
String friendId)
Get a connection record that is pending
|
ProfilePreferences |
getPreferencesRecordForUser(String userId)
Get a ProfilePreferences record for the user
|
ProfilePrivacy |
getPrivacyRecord(String userId)
Get the ProfilePrivacy record for the user
|
List<String> |
getRequestedConnectionUserIdsForUser(String userId)
Get a list of unconfirmed Friend requests for a given user.
|
int |
getSentMessagesCount(String userId)
Get a count of all sent messages for a user
|
SocialNetworkingInfo |
getSocialNetworkingInfo(String userId)
Get a SocialNetworkingInfo record for a user
|
int |
getStatusUpdatesCount(String userUuid)
Get a count of all status updates for a user
|
List<String> |
getThreadParticipants(String threadId)
Get a list of uuids of all perticipants in a thread
|
int |
getThreadsWithUnreadMessagesCount(String userId)
Get a count of all threads with unread messages for a user
|
List<UserProfile> |
getUserProfiles(int start,
int count)
Get a list of UserProfiles withing the given pageing parameters
|
ProfileStatus |
getUserStatus(String userId,
Date oldestStatusDate)
Get a ProfileStatus record for a user, but only if the date of the record is within the given time
|
WallItem |
getWallItem(long wallItemId)
Returns the specified wall item.
|
WallItemComment |
getWallItemComment(long wallItemCommentId)
Returns the specified wall item comment.
|
List<WallItem> |
getWallItemsForUser(String userUuid)
Retrieves all wall items for the specified user.
|
boolean |
invalidateCurrentProfileImage(String userUuid)
Invalidate the current profile image for a user.
|
boolean |
removeCompanyProfile(CompanyProfile companyProfile)
Remove a CompanyProfile record
|
boolean |
removeConnection(ProfileFriend profileFriend)
Remove a connection record
|
boolean |
removeGalleryImage(GalleryImage galleryImage)
Remove a GalleryImage record
|
boolean |
removeWallItemFromWall(WallItem item)
Removes a wall item.
|
boolean |
saveExternalImage(ProfileImageExternal externalImage)
Save a ProfileImageExternal record
|
void |
saveNewMessage(Message message)
Save a Message record
|
void |
saveNewMessageParticipant(MessageParticipant participant)
Save a MessageParticipant record
|
void |
saveNewMessageParticipants(List<MessageParticipant> participants)
Save a list of MessageParticipants
|
void |
saveNewThread(MessageThread thread)
Save a MessageThread record
|
boolean |
saveOfficialImageUrl(ProfileImageOfficial officialImage)
Save the ProfileImageOfficial record the database
|
boolean |
savePreferencesRecord(ProfilePreferences prefs)
Save a ProfilePreferences record
|
boolean |
saveSocialNetworkingInfo(SocialNetworkingInfo socialNetworkingInfo)
Save a SocialNetworkingInfo record
|
boolean |
setUserStatus(ProfileStatus profileStatus)
Set the status for a user
|
boolean |
toggleMessageRead(MessageParticipant participant,
boolean status)
Toggle a Message as being read by the given participant
|
boolean |
updateCompanyProfile(CompanyProfile companyProfile)
Update a CompanyProfile record
|
boolean |
updateConnection(ProfileFriend profileFriend)
Update a connection record
|
boolean |
updateExternalIntegrationInfo(ExternalIntegrationInfo info)
Update a user's ExternalIntegrationInfo record
|
boolean |
updateKudos(ProfileKudos kudos)
Update a user's kudos record
|
boolean |
updatePrivacyRecord(ProfilePrivacy privacy)
Update the ProfilePrivacy record
|
static final String QUERY_GET_COMPANY_PROFILE
static final String QUERY_GET_COMPANY_PROFILES
static final String QUERY_GET_FRIEND_REQUESTS_FOR_USER
static final String QUERY_GET_CONFIRMED_FRIEND_USERIDS_FOR_USER
static final String QUERY_GET_FRIEND_REQUEST
static final String QUERY_GET_FRIEND_RECORD
static final String QUERY_GET_USER_STATUS
static final String QUERY_GET_PRIVACY_RECORD
static final String QUERY_GET_CURRENT_PROFILE_IMAGE_RECORD
static final String QUERY_OTHER_PROFILE_IMAGE_RECORDS
static final String QUERY_GET_STATUS_UPDATES_COUNT
static final String QUERY_GET_GALLERY_IMAGE_RECORDS
static final String QUERY_GET_GALLERY_RECORD
static final String QUERY_GET_GALLERY_IMAGE_RECORDS_COUNT
static final String QUERY_GET_PREFERENCES_RECORD
static final String QUERY_GET_SOCIAL_NETWORKING_INFO
static final String QUERY_GET_EXTERNAL_IMAGE_RECORD
static final String QUERY_FIND_SAKAI_PERSONS_BY_NAME_OR_EMAIL
static final String QUERY_FIND_SAKAI_PERSONS_BY_INTEREST
static final String QUERY_FIND_SAKAI_PERSONS_BY_INTEREST_AND_BUSINESS_BIO
static final String QUERY_GET_SAKAI_PERSON
static final String QUERY_GET_ALL_SAKAI_PERSON_IDS
static final String QUERY_GET_ALL_SAKAI_PERSON_IDS_COUNT
static final String QUERY_GET_OFFICIAL_IMAGE_RECORD
static final String QUERY_GET_ALL_UNREAD_MESSAGES_COUNT
static final String QUERY_GET_THREADS_WITH_UNREAD_MESSAGES_COUNT
static final String QUERY_GET_MESSAGES_IN_THREAD
static final String QUERY_GET_MESSAGES_IN_THREAD_COUNT
static final String QUERY_GET_MESSAGE
static final String QUERY_GET_LATEST_MESSAGE_IN_THREAD
static final String QUERY_GET_MESSAGE_THREADS
static final String QUERY_GET_MESSAGE_THREADS_COUNT
static final String QUERY_GET_SENT_MESSAGES_COUNT
static final String QUERY_GET_MESSAGE_THREAD
static final String QUERY_GET_MESSAGE_PARTICIPANT_FOR_MESSAGE_AND_UUID
static final String QUERY_GET_THREAD_PARTICIPANTS
static final String QUERY_GET_KUDOS_RECORD
static final String QUERY_GET_EXTERNAL_INTEGRATION_INFO
static final String QUERY_GET_WALL_ITEMS
static final String QUERY_GET_WALL_ITEM
static final String QUERY_GET_WALL_ITEM_COMMENT
static final String USER_UUID
static final String FRIEND_UUID
static final String CONFIRMED
static final String OLDEST_STATUS_DATE
static final String SEARCH
static final String UUID
static final String ID
static final String THREAD
static final String MESSAGE_ID
List<String> getRequestedConnectionUserIdsForUser(String userId)
userId - uuid of the user to retrieve the list of friends forList<String> getConfirmedConnectionUserIdsForUser(String userId)
userId - uuid of the user to retrieve the list of friends forList<String> findSakaiPersonsByNameOrEmail(String search)
search - string to search onList<String> findSakaiPersonsByInterest(String search, boolean includeBusinessBio)
search - string to search onincludeBusinessBio - true if the business biography should also be searched.List<ProfileImageUploaded> getCurrentProfileImageRecords(String userId)
userId - userId of the userProfileImageUploaded getCurrentProfileImageRecord(String userId)
userId - userId of the userList<ProfileImageUploaded> getOtherProfileImageRecords(String userId)
userId - userId of the userProfileImageOfficial getOfficialImageRecordForUser(String userUuid)
userUuid - uuid of the userboolean saveOfficialImageUrl(ProfileImageOfficial officialImage)
officialImage - ProfileImageOfficial objectProfileFriend getConnectionRecord(String userId, String friendId)
This tries both column arrangements, ie user/friend and friend/user
userId - uuid of the userfriendId - uuid of the other userboolean addNewConnection(ProfileFriend profileFriend)
profileFriend - ProfileFriend recordboolean updateConnection(ProfileFriend profileFriend)
profileFriend - ProfileFriend recordboolean removeConnection(ProfileFriend profileFriend)
profileFriend - ProfileFriend recordProfileFriend getPendingConnection(String userId, String friendId)
userId - uuid of the userfriendId - uuid of the friendProfileStatus getUserStatus(String userId, Date oldestStatusDate)
userId - uuid of the useroldestStatusDate - oldest date to search untilboolean setUserStatus(ProfileStatus profileStatus)
profileStatus - ProfileStatus objectboolean clearUserStatus(ProfileStatus profileStatus)
profileStatus - ProfileStatus objectint getStatusUpdatesCount(String userUuid)
userUuid - uuid of the userProfilePrivacy addNewPrivacyRecord(ProfilePrivacy privacy)
privacy - ProfilePrivacy objectProfilePrivacy getPrivacyRecord(String userId)
userId - uuid of the userboolean updatePrivacyRecord(ProfilePrivacy privacy)
privacy - ProfilePrivacy objectboolean addNewCompanyProfile(CompanyProfile companyProfile)
companyProfile - CompanyProfile recordboolean updateCompanyProfile(CompanyProfile companyProfile)
companyProfile - CompanyProfile recordCompanyProfile getCompanyProfile(String userId, long companyProfileId)
userId - uuid of the usercompanyProfileId - id of the companyList<CompanyProfile> getCompanyProfiles(String userId)
userId - uuid of the userboolean removeCompanyProfile(CompanyProfile companyProfile)
companyProfile - CompanyProfile recordboolean addNewGalleryImage(GalleryImage galleryImage)
galleryImage - GalleryImage recordGalleryImage getGalleryImageRecord(String userId, long imageId)
userId - uuid of the userimageId - id of the imageList<GalleryImage> getGalleryImages(String userId)
userId - uuid of the userboolean removeGalleryImage(GalleryImage galleryImage)
galleryImage - GalleryImage recordint getGalleryImagesCount(String userUuid)
userUuid - uuid of the userSocialNetworkingInfo getSocialNetworkingInfo(String userId)
userId - uuid of the userboolean saveSocialNetworkingInfo(SocialNetworkingInfo socialNetworkingInfo)
socialNetworkingInfo - SocialNetworkingInfo objectboolean addNewProfileImage(ProfileImageUploaded profileImage)
profileImage - ProfileImageUploaded objList<String> getAllSakaiPersonIds()
int getAllSakaiPersonIdsCount()
ProfileImageExternal getExternalImageRecordForUser(String userId)
userId - uuid of the userboolean saveExternalImage(ProfileImageExternal externalImage)
externalImage - ProfileImageExternal recordProfilePreferences addNewPreferencesRecord(ProfilePreferences prefs)
prefs - complete ProfilePreferences recordProfilePreferences getPreferencesRecordForUser(String userId)
userId - uuid for the userboolean savePreferencesRecord(ProfilePreferences prefs)
prefs - ProfilePreferences recordint getAllUnreadMessagesCount(String userId)
userId - uuid of the userint getThreadsWithUnreadMessagesCount(String userId)
userId - uuid of the userint getSentMessagesCount(String userId)
userId - uuid of the userList<MessageThread> getMessageThreads(String userId)
userId - uuid of the userint getMessageThreadsCount(String userId)
userId - uuid of the userList<Message> getMessagesInThread(String threadId)
threadId - id of the threadint getMessagesInThreadCount(String threadId)
threadId - id of the threadMessage getMessage(String id)
id - uuid of the MessageMessageThread getMessageThread(String threadId)
threadId - id of the threadMessage getLatestMessageInThread(String threadId)
threadId - id of the threadboolean toggleMessageRead(MessageParticipant participant, boolean status)
participant - MessageParticipantstatus - true/false for read/unreadMessageParticipant getMessageParticipant(String messageId, String userUuid)
messageId - uuid of the messageuserUuid - uuid of the userList<String> getThreadParticipants(String threadId)
threadId - id of the threadvoid saveNewThread(MessageThread thread)
thread - MessageThread objectvoid saveNewMessage(Message message)
thread - Message objectvoid saveNewMessageParticipant(MessageParticipant participant)
thread - MessageParticipant objectvoid saveNewMessageParticipants(List<MessageParticipant> participants)
participants - List of MessageParticipant objectsList<UserProfile> getUserProfiles(int start, int count)
start - first recordcount - total number of recordsProfileKudos getKudos(String userUuid)
userUuid - boolean updateKudos(ProfileKudos kudos)
kudos - ProfileKudos for the userExternalIntegrationInfo getExternalIntegrationInfo(String userUuid)
userUuid - boolean updateExternalIntegrationInfo(ExternalIntegrationInfo info)
info - ExternalIntegrationInfo for the userboolean addNewWallItemForUser(String userUuid, WallItem item)
userUuid - the user ID.item - the wall item to add.true on success, false on failure.boolean removeWallItemFromWall(WallItem item)
item - the wall item to remove.true on success, false on failure.WallItem getWallItem(long wallItemId)
wallItemId - the wall item to return.WallItemComment getWallItemComment(long wallItemCommentId)
wallItemCommentId - the wall item comment to return.List<WallItem> getWallItemsForUser(String userUuid)
userUuid - the user ID.boolean addNewCommentToWallItem(WallItemComment wallItemComment)
wallItemComment - the wall item comment to add.true if the add is successful and
false if the add fails.boolean invalidateCurrentProfileImage(String userUuid)
userUuid - the uuid for the userCopyright © 2008–2017 The Sakai Foundation. All rights reserved.