public class ProfileDaoImpl extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements ProfileDao
CONFIRMED, FRIEND_UUID, ID, MESSAGE_ID, OLDEST_STATUS_DATE, QUERY_FIND_SAKAI_PERSONS_BY_INTEREST, QUERY_FIND_SAKAI_PERSONS_BY_INTEREST_AND_BUSINESS_BIO, QUERY_FIND_SAKAI_PERSONS_BY_NAME_OR_EMAIL, QUERY_GET_ALL_SAKAI_PERSON_IDS, QUERY_GET_ALL_SAKAI_PERSON_IDS_COUNT, QUERY_GET_ALL_UNREAD_MESSAGES_COUNT, QUERY_GET_COMPANY_PROFILE, QUERY_GET_COMPANY_PROFILES, QUERY_GET_CONFIRMED_FRIEND_USERIDS_FOR_USER, QUERY_GET_CURRENT_PROFILE_IMAGE_RECORD, QUERY_GET_EXTERNAL_IMAGE_RECORD, QUERY_GET_EXTERNAL_INTEGRATION_INFO, QUERY_GET_FRIEND_RECORD, QUERY_GET_FRIEND_REQUEST, QUERY_GET_FRIEND_REQUESTS_FOR_USER, QUERY_GET_GALLERY_IMAGE_RECORDS, QUERY_GET_GALLERY_IMAGE_RECORDS_COUNT, QUERY_GET_GALLERY_RECORD, QUERY_GET_KUDOS_RECORD, QUERY_GET_LATEST_MESSAGE_IN_THREAD, QUERY_GET_MESSAGE, QUERY_GET_MESSAGE_PARTICIPANT_FOR_MESSAGE_AND_UUID, QUERY_GET_MESSAGE_THREAD, QUERY_GET_MESSAGE_THREADS, QUERY_GET_MESSAGE_THREADS_COUNT, QUERY_GET_MESSAGES_IN_THREAD, QUERY_GET_MESSAGES_IN_THREAD_COUNT, QUERY_GET_OFFICIAL_IMAGE_RECORD, QUERY_GET_PREFERENCES_RECORD, QUERY_GET_PRIVACY_RECORD, QUERY_GET_SAKAI_PERSON, QUERY_GET_SENT_MESSAGES_COUNT, QUERY_GET_SOCIAL_NETWORKING_INFO, QUERY_GET_STATUS_UPDATES_COUNT, QUERY_GET_THREAD_PARTICIPANTS, QUERY_GET_THREADS_WITH_UNREAD_MESSAGES_COUNT, QUERY_GET_USER_STATUS, QUERY_GET_WALL_ITEM, QUERY_GET_WALL_ITEM_COMMENT, QUERY_GET_WALL_ITEMS, QUERY_OTHER_PROFILE_IMAGE_RECORDS, SEARCH, THREAD, USER_UUID, UUID| Constructor and Description |
|---|
ProfileDaoImpl() |
| 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 userId)
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 userId)
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 oldestDate)
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.
|
void |
init() |
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 read)
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
|
public List<String> getRequestedConnectionUserIdsForUser(String userId)
getRequestedConnectionUserIdsForUser in interface ProfileDaouserId - uuid of the user to retrieve the list of friends forpublic List<String> getConfirmedConnectionUserIdsForUser(String userId)
getConfirmedConnectionUserIdsForUser in interface ProfileDaouserId - uuid of the user to retrieve the list of friends forpublic List<String> findSakaiPersonsByNameOrEmail(String search)
findSakaiPersonsByNameOrEmail in interface ProfileDaosearch - string to search onpublic List<String> findSakaiPersonsByInterest(String search, boolean includeBusinessBio)
findSakaiPersonsByInterest in interface ProfileDaosearch - string to search onincludeBusinessBio - true if the business biography should also be searched.public List<ProfileImageUploaded> getCurrentProfileImageRecords(String userId)
getCurrentProfileImageRecords in interface ProfileDaouserId - userId of the userpublic ProfileImageUploaded getCurrentProfileImageRecord(String userId)
getCurrentProfileImageRecord in interface ProfileDaouserId - userId of the userpublic List<ProfileImageUploaded> getOtherProfileImageRecords(String userId)
getOtherProfileImageRecords in interface ProfileDaouserId - userId of the userpublic ProfileFriend getConnectionRecord(String userId, String friendId)
This tries both column arrangements, ie user/friend and friend/user
getConnectionRecord in interface ProfileDaouserId - uuid of the userfriendId - uuid of the other userpublic CompanyProfile getCompanyProfile(String userId, long companyProfileId)
getCompanyProfile in interface ProfileDaouserId - uuid of the usercompanyProfileId - id of the companypublic GalleryImage getGalleryImageRecord(String userId, long imageId)
getGalleryImageRecord in interface ProfileDaouserId - uuid of the userimageId - id of the imagepublic ProfileImageOfficial getOfficialImageRecordForUser(String userUuid)
getOfficialImageRecordForUser in interface ProfileDaouserUuid - uuid of the userpublic boolean addNewConnection(ProfileFriend profileFriend)
addNewConnection in interface ProfileDaoprofileFriend - ProfileFriend recordpublic boolean updateConnection(ProfileFriend profileFriend)
updateConnection in interface ProfileDaoprofileFriend - ProfileFriend recordpublic boolean removeConnection(ProfileFriend profileFriend)
removeConnection in interface ProfileDaoprofileFriend - ProfileFriend recordpublic ProfileFriend getPendingConnection(String userId, String friendId)
getPendingConnection in interface ProfileDaouserId - uuid of the userfriendId - uuid of the friendpublic ProfileStatus getUserStatus(String userId, Date oldestDate)
getUserStatus in interface ProfileDaouserId - uuid of the useroldestDate - oldest date to search untilpublic boolean setUserStatus(ProfileStatus profileStatus)
setUserStatus in interface ProfileDaoprofileStatus - ProfileStatus objectpublic boolean clearUserStatus(ProfileStatus profileStatus)
clearUserStatus in interface ProfileDaoprofileStatus - ProfileStatus objectpublic int getStatusUpdatesCount(String userId)
getStatusUpdatesCount in interface ProfileDaouserId - uuid of the userpublic ProfilePrivacy addNewPrivacyRecord(ProfilePrivacy privacy)
addNewPrivacyRecord in interface ProfileDaoprivacy - ProfilePrivacy objectpublic ProfilePrivacy getPrivacyRecord(String userId)
getPrivacyRecord in interface ProfileDaouserId - uuid of the userpublic boolean updatePrivacyRecord(ProfilePrivacy privacy)
updatePrivacyRecord in interface ProfileDaoprivacy - ProfilePrivacy objectpublic boolean addNewCompanyProfile(CompanyProfile companyProfile)
addNewCompanyProfile in interface ProfileDaocompanyProfile - CompanyProfile recordpublic boolean updateCompanyProfile(CompanyProfile companyProfile)
updateCompanyProfile in interface ProfileDaocompanyProfile - CompanyProfile recordpublic List<CompanyProfile> getCompanyProfiles(String userId)
getCompanyProfiles in interface ProfileDaouserId - uuid of the userpublic boolean removeCompanyProfile(CompanyProfile companyProfile)
removeCompanyProfile in interface ProfileDaocompanyProfile - CompanyProfile recordpublic boolean addNewGalleryImage(GalleryImage galleryImage)
addNewGalleryImage in interface ProfileDaogalleryImage - GalleryImage recordpublic List<GalleryImage> getGalleryImages(String userId)
getGalleryImages in interface ProfileDaouserId - uuid of the userpublic boolean removeGalleryImage(GalleryImage galleryImage)
removeGalleryImage in interface ProfileDaogalleryImage - GalleryImage recordpublic int getGalleryImagesCount(String userId)
getGalleryImagesCount in interface ProfileDaouserId - uuid of the userpublic SocialNetworkingInfo getSocialNetworkingInfo(String userId)
getSocialNetworkingInfo in interface ProfileDaouserId - uuid of the userpublic boolean saveSocialNetworkingInfo(SocialNetworkingInfo socialNetworkingInfo)
saveSocialNetworkingInfo in interface ProfileDaosocialNetworkingInfo - SocialNetworkingInfo objectpublic boolean addNewProfileImage(ProfileImageUploaded profileImage)
addNewProfileImage in interface ProfileDaoprofileImage - ProfileImageUploaded objpublic List<String> getAllSakaiPersonIds()
getAllSakaiPersonIds in interface ProfileDaopublic int getAllSakaiPersonIdsCount()
getAllSakaiPersonIdsCount in interface ProfileDaopublic List<UserProfile> getUserProfiles(int start, int count)
getUserProfiles in interface ProfileDaostart - first recordcount - total number of recordspublic ProfileImageExternal getExternalImageRecordForUser(String userId)
getExternalImageRecordForUser in interface ProfileDaouserId - uuid of the userpublic boolean saveExternalImage(ProfileImageExternal externalImage)
saveExternalImage in interface ProfileDaoexternalImage - ProfileImageExternal recordpublic ProfilePreferences addNewPreferencesRecord(ProfilePreferences prefs)
addNewPreferencesRecord in interface ProfileDaoprefs - complete ProfilePreferences recordpublic ProfilePreferences getPreferencesRecordForUser(String userId)
getPreferencesRecordForUser in interface ProfileDaouserId - uuid for the userpublic boolean savePreferencesRecord(ProfilePreferences prefs)
savePreferencesRecord in interface ProfileDaoprefs - ProfilePreferences recordpublic int getAllUnreadMessagesCount(String userId)
getAllUnreadMessagesCount in interface ProfileDaouserId - uuid of the userpublic int getThreadsWithUnreadMessagesCount(String userId)
getThreadsWithUnreadMessagesCount in interface ProfileDaouserId - uuid of the userpublic List<MessageThread> getMessageThreads(String userId)
getMessageThreads in interface ProfileDaouserId - uuid of the userpublic int getMessageThreadsCount(String userId)
getMessageThreadsCount in interface ProfileDaouserId - uuid of the userpublic int getSentMessagesCount(String userId)
getSentMessagesCount in interface ProfileDaouserId - uuid of the userpublic List<Message> getMessagesInThread(String threadId)
getMessagesInThread in interface ProfileDaothreadId - id of the threadpublic int getMessagesInThreadCount(String threadId)
getMessagesInThreadCount in interface ProfileDaothreadId - id of the threadpublic Message getMessage(String id)
getMessage in interface ProfileDaoid - uuid of the Messagepublic MessageThread getMessageThread(String threadId)
getMessageThread in interface ProfileDaothreadId - id of the threadpublic Message getLatestMessageInThread(String threadId)
getLatestMessageInThread in interface ProfileDaothreadId - id of the threadpublic boolean toggleMessageRead(MessageParticipant participant, boolean read)
toggleMessageRead in interface ProfileDaoparticipant - MessageParticipantread - true/false for read/unreadpublic MessageParticipant getMessageParticipant(String messageId, String userUuid)
getMessageParticipant in interface ProfileDaomessageId - uuid of the messageuserUuid - uuid of the userpublic List<String> getThreadParticipants(String threadId)
getThreadParticipants in interface ProfileDaothreadId - id of the threadpublic void saveNewThread(MessageThread thread)
saveNewThread in interface ProfileDaothread - MessageThread objectpublic void saveNewMessage(Message message)
saveNewMessage in interface ProfileDaopublic void saveNewMessageParticipant(MessageParticipant participant)
saveNewMessageParticipant in interface ProfileDaopublic void saveNewMessageParticipants(List<MessageParticipant> participants)
saveNewMessageParticipants in interface ProfileDaoparticipants - List of MessageParticipant objectspublic boolean saveOfficialImageUrl(ProfileImageOfficial officialImage)
saveOfficialImageUrl in interface ProfileDaoofficialImage - ProfileImageOfficial objectpublic ProfileKudos getKudos(String userUuid)
getKudos in interface ProfileDaopublic boolean updateKudos(ProfileKudos kudos)
updateKudos in interface ProfileDaokudos - ProfileKudos for the userpublic ExternalIntegrationInfo getExternalIntegrationInfo(String userUuid)
getExternalIntegrationInfo in interface ProfileDaopublic boolean updateExternalIntegrationInfo(ExternalIntegrationInfo info)
updateExternalIntegrationInfo in interface ProfileDaoinfo - ExternalIntegrationInfo for the userpublic boolean addNewWallItemForUser(String userUuid, WallItem item)
addNewWallItemForUser in interface ProfileDaouserUuid - the user ID.item - the wall item to add.true on success, false on failure.public boolean removeWallItemFromWall(WallItem item)
removeWallItemFromWall in interface ProfileDaoitem - the wall item to remove.true on success, false on failure.public WallItem getWallItem(long wallItemId)
getWallItem in interface ProfileDaowallItemId - the wall item to return.public WallItemComment getWallItemComment(long wallItemCommentId)
getWallItemComment in interface ProfileDaowallItemCommentId - the wall item comment to return.public List<WallItem> getWallItemsForUser(String userUuid)
getWallItemsForUser in interface ProfileDaouserUuid - the user ID.public boolean addNewCommentToWallItem(WallItemComment wallItemComment)
addNewCommentToWallItem in interface ProfileDaowallItemComment - the wall item comment to add.true if the add is successful and
false if the add fails.public boolean invalidateCurrentProfileImage(String userUuid)
invalidateCurrentProfileImage in interface ProfileDaouserUuid - the uuid for the userpublic void init()
Copyright © 2008–2017 The Sakai Foundation. All rights reserved.