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_ITEMS, QUERY_OTHER_PROFILE_IMAGE_RECORDS, SEARCH, THREAD, USER_UUID, UUID| Constructor and Description |
|---|
ProfileDaoImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addNewCommentToWallItem(org.sakaiproject.profile2.model.WallItemComment wallItemComment)
Adds a new wall item comment.
|
boolean |
addNewCompanyProfile(org.sakaiproject.profile2.model.CompanyProfile companyProfile)
Save a new CompanyProfile record
|
boolean |
addNewConnection(org.sakaiproject.profile2.hbm.model.ProfileFriend profileFriend)
Save a new connection record
|
boolean |
addNewGalleryImage(org.sakaiproject.profile2.model.GalleryImage galleryImage)
Add a new GalleryImage record
|
org.sakaiproject.profile2.model.ProfilePreferences |
addNewPreferencesRecord(org.sakaiproject.profile2.model.ProfilePreferences prefs)
Persist a new ProfilePreferences record and return it.
|
org.sakaiproject.profile2.model.ProfilePrivacy |
addNewPrivacyRecord(org.sakaiproject.profile2.model.ProfilePrivacy privacy)
Add a new ProfilePrivacy record
|
boolean |
addNewProfileImage(org.sakaiproject.profile2.hbm.model.ProfileImageUploaded profileImage)
Add a new profile image record to the database.
|
boolean |
addNewWallItemForUser(String userUuid,
org.sakaiproject.profile2.model.WallItem item)
Adds a wall item for the specified user.
|
boolean |
clearUserStatus(org.sakaiproject.profile2.model.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
|
org.sakaiproject.profile2.model.CompanyProfile |
getCompanyProfile(String userId,
long companyProfileId)
Get the CompanyProfile record for a user and company ID
|
List<org.sakaiproject.profile2.model.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.
|
org.sakaiproject.profile2.hbm.model.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
|
org.sakaiproject.profile2.hbm.model.ProfileImageUploaded |
getCurrentProfileImageRecord(String userId)
Get the current ProfileImage record from the database.
|
List<org.sakaiproject.profile2.hbm.model.ProfileImageUploaded> |
getCurrentProfileImageRecords(String userId)
Get the current ProfileImage records from the database.
|
org.sakaiproject.profile2.hbm.model.ProfileImageExternal |
getExternalImageRecordForUser(String userId)
Get a ProfileImageExternal record for a user
|
org.sakaiproject.profile2.model.ExternalIntegrationInfo |
getExternalIntegrationInfo(String userUuid)
Get the ExternalIntegrationInfo record for a user
|
org.sakaiproject.profile2.model.GalleryImage |
getGalleryImageRecord(String userId,
long imageId)
Get the GalleryImage record for a user and image ID
|
List<org.sakaiproject.profile2.model.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
|
org.sakaiproject.profile2.hbm.model.ProfileKudos |
getKudos(String userUuid)
Get the kudos record for a user
|
org.sakaiproject.profile2.model.Message |
getLatestMessageInThread(String threadId)
Get the latest Message in a MessageThread
|
org.sakaiproject.profile2.model.Message |
getMessage(String id)
Get a Message record
|
org.sakaiproject.profile2.model.MessageParticipant |
getMessageParticipant(String messageId,
String userUuid)
Get a MessageParticipant record for the given message and user id
|
List<org.sakaiproject.profile2.model.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
|
org.sakaiproject.profile2.model.MessageThread |
getMessageThread(String threadId)
Get a MessageThread record
|
List<org.sakaiproject.profile2.model.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
|
org.sakaiproject.profile2.hbm.model.ProfileImageOfficial |
getOfficialImageRecordForUser(String userUuid)
Get the ProfileImageOfficial record from the database for the given user
|
List<org.sakaiproject.profile2.hbm.model.ProfileImageUploaded> |
getOtherProfileImageRecords(String userId)
Get old ProfileImage records from the database.
|
org.sakaiproject.profile2.hbm.model.ProfileFriend |
getPendingConnection(String userId,
String friendId)
Get a connection record that is pending
|
org.sakaiproject.profile2.model.ProfilePreferences |
getPreferencesRecordForUser(String userId)
Get a ProfilePreferences record for the user
|
org.sakaiproject.profile2.model.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
|
org.sakaiproject.profile2.model.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<org.sakaiproject.profile2.model.UserProfile> |
getUserProfiles(int start,
int count)
Get a list of UserProfiles withing the given pageing parameters
|
org.sakaiproject.profile2.model.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
|
List<org.sakaiproject.profile2.model.WallItem> |
getWallItemsForUser(String userUuid)
Retrieves all wall items for the specified user.
|
void |
init() |
boolean |
removeCompanyProfile(org.sakaiproject.profile2.model.CompanyProfile companyProfile)
Remove a CompanyProfile record
|
boolean |
removeConnection(org.sakaiproject.profile2.hbm.model.ProfileFriend profileFriend)
Remove a connection record
|
boolean |
removeGalleryImage(org.sakaiproject.profile2.model.GalleryImage galleryImage)
Remove a GalleryImage record
|
boolean |
removeWallItemFromWall(org.sakaiproject.profile2.model.WallItem item)
Removes a wall item.
|
boolean |
saveExternalImage(org.sakaiproject.profile2.hbm.model.ProfileImageExternal externalImage)
Save a ProfileImageExternal record
|
void |
saveNewMessage(org.sakaiproject.profile2.model.Message message)
Save a Message record
|
void |
saveNewMessageParticipant(org.sakaiproject.profile2.model.MessageParticipant participant)
Save a MessageParticipant record
|
void |
saveNewMessageParticipants(List<org.sakaiproject.profile2.model.MessageParticipant> participants)
Save a list of MessageParticipants
|
void |
saveNewThread(org.sakaiproject.profile2.model.MessageThread thread)
Save a MessageThread record
|
boolean |
saveOfficialImageUrl(org.sakaiproject.profile2.hbm.model.ProfileImageOfficial officialImage)
Save the ProfileImageOfficial record the database
|
boolean |
savePreferencesRecord(org.sakaiproject.profile2.model.ProfilePreferences prefs)
Save a ProfilePreferences record
|
boolean |
saveSocialNetworkingInfo(org.sakaiproject.profile2.model.SocialNetworkingInfo socialNetworkingInfo)
Save a SocialNetworkingInfo record
|
boolean |
setUserStatus(org.sakaiproject.profile2.model.ProfileStatus profileStatus)
Set the status for a user
|
boolean |
toggleMessageRead(org.sakaiproject.profile2.model.MessageParticipant participant,
boolean read)
Toggle a Message as being read by the given participant
|
boolean |
updateCompanyProfile(org.sakaiproject.profile2.model.CompanyProfile companyProfile)
Update a CompanyProfile record
|
boolean |
updateConnection(org.sakaiproject.profile2.hbm.model.ProfileFriend profileFriend)
Update a connection record
|
boolean |
updateExternalIntegrationInfo(org.sakaiproject.profile2.model.ExternalIntegrationInfo info)
Update a user's ExternalIntegrationInfo record
|
boolean |
updateKudos(org.sakaiproject.profile2.hbm.model.ProfileKudos kudos)
Update a user's kudos record
|
boolean |
updatePrivacyRecord(org.sakaiproject.profile2.model.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<org.sakaiproject.profile2.hbm.model.ProfileImageUploaded> getCurrentProfileImageRecords(String userId)
getCurrentProfileImageRecords in interface ProfileDaouserId - userId of the userpublic org.sakaiproject.profile2.hbm.model.ProfileImageUploaded getCurrentProfileImageRecord(String userId)
getCurrentProfileImageRecord in interface ProfileDaouserId - userId of the userpublic List<org.sakaiproject.profile2.hbm.model.ProfileImageUploaded> getOtherProfileImageRecords(String userId)
getOtherProfileImageRecords in interface ProfileDaouserId - userId of the userpublic org.sakaiproject.profile2.hbm.model.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 org.sakaiproject.profile2.model.CompanyProfile getCompanyProfile(String userId, long companyProfileId)
getCompanyProfile in interface ProfileDaouserId - uuid of the usercompanyProfileId - id of the companypublic org.sakaiproject.profile2.model.GalleryImage getGalleryImageRecord(String userId, long imageId)
getGalleryImageRecord in interface ProfileDaouserId - uuid of the userimageId - id of the imagepublic org.sakaiproject.profile2.hbm.model.ProfileImageOfficial getOfficialImageRecordForUser(String userUuid)
getOfficialImageRecordForUser in interface ProfileDaouserUuid - uuid of the userpublic boolean addNewConnection(org.sakaiproject.profile2.hbm.model.ProfileFriend profileFriend)
addNewConnection in interface ProfileDaoprofileFriend - ProfileFriend recordpublic boolean updateConnection(org.sakaiproject.profile2.hbm.model.ProfileFriend profileFriend)
updateConnection in interface ProfileDaoprofileFriend - ProfileFriend recordpublic boolean removeConnection(org.sakaiproject.profile2.hbm.model.ProfileFriend profileFriend)
removeConnection in interface ProfileDaoprofileFriend - ProfileFriend recordpublic org.sakaiproject.profile2.hbm.model.ProfileFriend getPendingConnection(String userId, String friendId)
getPendingConnection in interface ProfileDaouserId - uuid of the userfriendId - uuid of the friendpublic org.sakaiproject.profile2.model.ProfileStatus getUserStatus(String userId, Date oldestDate)
getUserStatus in interface ProfileDaouserId - uuid of the useroldestDate - oldest date to search untilpublic boolean setUserStatus(org.sakaiproject.profile2.model.ProfileStatus profileStatus)
setUserStatus in interface ProfileDaoprofileStatus - ProfileStatus objectpublic boolean clearUserStatus(org.sakaiproject.profile2.model.ProfileStatus profileStatus)
clearUserStatus in interface ProfileDaoprofileStatus - ProfileStatus objectpublic int getStatusUpdatesCount(String userId)
getStatusUpdatesCount in interface ProfileDaouserId - uuid of the userpublic org.sakaiproject.profile2.model.ProfilePrivacy addNewPrivacyRecord(org.sakaiproject.profile2.model.ProfilePrivacy privacy)
addNewPrivacyRecord in interface ProfileDaoprivacy - ProfilePrivacy objectpublic org.sakaiproject.profile2.model.ProfilePrivacy getPrivacyRecord(String userId)
getPrivacyRecord in interface ProfileDaouserId - uuid of the userpublic boolean updatePrivacyRecord(org.sakaiproject.profile2.model.ProfilePrivacy privacy)
updatePrivacyRecord in interface ProfileDaoprivacy - ProfilePrivacy objectpublic boolean addNewCompanyProfile(org.sakaiproject.profile2.model.CompanyProfile companyProfile)
addNewCompanyProfile in interface ProfileDaocompanyProfile - CompanyProfile recordpublic boolean updateCompanyProfile(org.sakaiproject.profile2.model.CompanyProfile companyProfile)
updateCompanyProfile in interface ProfileDaocompanyProfile - CompanyProfile recordpublic List<org.sakaiproject.profile2.model.CompanyProfile> getCompanyProfiles(String userId)
getCompanyProfiles in interface ProfileDaouserId - uuid of the userpublic boolean removeCompanyProfile(org.sakaiproject.profile2.model.CompanyProfile companyProfile)
removeCompanyProfile in interface ProfileDaocompanyProfile - CompanyProfile recordpublic boolean addNewGalleryImage(org.sakaiproject.profile2.model.GalleryImage galleryImage)
addNewGalleryImage in interface ProfileDaogalleryImage - GalleryImage recordpublic List<org.sakaiproject.profile2.model.GalleryImage> getGalleryImages(String userId)
getGalleryImages in interface ProfileDaouserId - uuid of the userpublic boolean removeGalleryImage(org.sakaiproject.profile2.model.GalleryImage galleryImage)
removeGalleryImage in interface ProfileDaogalleryImage - GalleryImage recordpublic int getGalleryImagesCount(String userId)
getGalleryImagesCount in interface ProfileDaouserId - uuid of the userpublic org.sakaiproject.profile2.model.SocialNetworkingInfo getSocialNetworkingInfo(String userId)
getSocialNetworkingInfo in interface ProfileDaouserId - uuid of the userpublic boolean saveSocialNetworkingInfo(org.sakaiproject.profile2.model.SocialNetworkingInfo socialNetworkingInfo)
saveSocialNetworkingInfo in interface ProfileDaosocialNetworkingInfo - SocialNetworkingInfo objectpublic boolean addNewProfileImage(org.sakaiproject.profile2.hbm.model.ProfileImageUploaded profileImage)
addNewProfileImage in interface ProfileDaoprofileImage - ProfileImageUploaded objpublic List<String> getAllSakaiPersonIds()
getAllSakaiPersonIds in interface ProfileDaopublic int getAllSakaiPersonIdsCount()
getAllSakaiPersonIdsCount in interface ProfileDaopublic List<org.sakaiproject.profile2.model.UserProfile> getUserProfiles(int start, int count)
getUserProfiles in interface ProfileDaostart - first recordcount - total number of recordspublic org.sakaiproject.profile2.hbm.model.ProfileImageExternal getExternalImageRecordForUser(String userId)
getExternalImageRecordForUser in interface ProfileDaouserId - uuid of the userpublic boolean saveExternalImage(org.sakaiproject.profile2.hbm.model.ProfileImageExternal externalImage)
saveExternalImage in interface ProfileDaoexternalImage - ProfileImageExternal recordpublic org.sakaiproject.profile2.model.ProfilePreferences addNewPreferencesRecord(org.sakaiproject.profile2.model.ProfilePreferences prefs)
addNewPreferencesRecord in interface ProfileDaoprefs - complete ProfilePreferences recordpublic org.sakaiproject.profile2.model.ProfilePreferences getPreferencesRecordForUser(String userId)
getPreferencesRecordForUser in interface ProfileDaouserId - uuid for the userpublic boolean savePreferencesRecord(org.sakaiproject.profile2.model.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<org.sakaiproject.profile2.model.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<org.sakaiproject.profile2.model.Message> getMessagesInThread(String threadId)
getMessagesInThread in interface ProfileDaothreadId - id of the threadpublic int getMessagesInThreadCount(String threadId)
getMessagesInThreadCount in interface ProfileDaothreadId - id of the threadpublic org.sakaiproject.profile2.model.Message getMessage(String id)
getMessage in interface ProfileDaoid - uuid of the Messagepublic org.sakaiproject.profile2.model.MessageThread getMessageThread(String threadId)
getMessageThread in interface ProfileDaothreadId - id of the threadpublic org.sakaiproject.profile2.model.Message getLatestMessageInThread(String threadId)
getLatestMessageInThread in interface ProfileDaothreadId - id of the threadpublic boolean toggleMessageRead(org.sakaiproject.profile2.model.MessageParticipant participant,
boolean read)
toggleMessageRead in interface ProfileDaoparticipant - MessageParticipantread - true/false for read/unreadpublic org.sakaiproject.profile2.model.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(org.sakaiproject.profile2.model.MessageThread thread)
saveNewThread in interface ProfileDaothread - MessageThread objectpublic void saveNewMessage(org.sakaiproject.profile2.model.Message message)
saveNewMessage in interface ProfileDaopublic void saveNewMessageParticipant(org.sakaiproject.profile2.model.MessageParticipant participant)
saveNewMessageParticipant in interface ProfileDaopublic void saveNewMessageParticipants(List<org.sakaiproject.profile2.model.MessageParticipant> participants)
saveNewMessageParticipants in interface ProfileDaoparticipants - List of MessageParticipant objectspublic boolean saveOfficialImageUrl(org.sakaiproject.profile2.hbm.model.ProfileImageOfficial officialImage)
saveOfficialImageUrl in interface ProfileDaoofficialImage - ProfileImageOfficial objectpublic org.sakaiproject.profile2.hbm.model.ProfileKudos getKudos(String userUuid)
getKudos in interface ProfileDaopublic boolean updateKudos(org.sakaiproject.profile2.hbm.model.ProfileKudos kudos)
updateKudos in interface ProfileDaokudos - ProfileKudos for the userpublic org.sakaiproject.profile2.model.ExternalIntegrationInfo getExternalIntegrationInfo(String userUuid)
getExternalIntegrationInfo in interface ProfileDaopublic boolean updateExternalIntegrationInfo(org.sakaiproject.profile2.model.ExternalIntegrationInfo info)
updateExternalIntegrationInfo in interface ProfileDaoinfo - ExternalIntegrationInfo for the userpublic boolean addNewWallItemForUser(String userUuid, org.sakaiproject.profile2.model.WallItem item)
addNewWallItemForUser in interface ProfileDaouserUuid - the user ID.item - the wall item to add.true on success, false on failure.public boolean removeWallItemFromWall(org.sakaiproject.profile2.model.WallItem item)
removeWallItemFromWall in interface ProfileDaoitem - the wall item to remove.true on success, false on failure.public List<org.sakaiproject.profile2.model.WallItem> getWallItemsForUser(String userUuid)
getWallItemsForUser in interface ProfileDaouserUuid - the user ID.public boolean addNewCommentToWallItem(org.sakaiproject.profile2.model.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 void init()
Copyright © 2008-2014 The Sakai Foundation. All Rights Reserved.