|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
org.sakaiproject.profile2.dao.impl.ProfileDaoImpl
public class ProfileDaoImpl
Internal DAO Interface for Profile2
| Field Summary |
|---|
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
ProfileDaoImpl()
|
|
| Method Summary | |
|---|---|
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 |
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 |
List<WallItem> |
getWallItemsForUser(String userUuid)
Retrieves all wall items for the specified user. |
void |
init()
|
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 |
| Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
|---|
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
| Methods inherited from class org.springframework.dao.support.DaoSupport |
|---|
afterPropertiesSet, initDao |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProfileDaoImpl()
| Method Detail |
|---|
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 on
public 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 user
public 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 user
public CompanyProfile getCompanyProfile(String userId,
long companyProfileId)
getCompanyProfile in interface ProfileDaouserId - uuid of the usercompanyProfileId - id of the company
public GalleryImage getGalleryImageRecord(String userId,
long imageId)
getGalleryImageRecord in interface ProfileDaouserId - uuid of the userimageId - id of the image
public ProfileImageOfficial getOfficialImageRecordForUser(String userUuid)
getOfficialImageRecordForUser in interface ProfileDaouserUuid - uuid of the user
public boolean addNewConnection(ProfileFriend profileFriend)
addNewConnection in interface ProfileDaoprofileFriend - ProfileFriend record
public boolean updateConnection(ProfileFriend profileFriend)
updateConnection in interface ProfileDaoprofileFriend - ProfileFriend record
public boolean removeConnection(ProfileFriend profileFriend)
removeConnection in interface ProfileDaoprofileFriend - ProfileFriend record
public ProfileFriend getPendingConnection(String userId,
String friendId)
getPendingConnection in interface ProfileDaouserId - uuid of the userfriendId - uuid of the friend
public ProfileStatus getUserStatus(String userId,
Date oldestDate)
getUserStatus in interface ProfileDaouserId - uuid of the useroldestDate - oldest date to search until
public boolean setUserStatus(ProfileStatus profileStatus)
setUserStatus in interface ProfileDaoprofileStatus - ProfileStatus object
public boolean clearUserStatus(ProfileStatus profileStatus)
clearUserStatus in interface ProfileDaoprofileStatus - ProfileStatus object
public int getStatusUpdatesCount(String userId)
getStatusUpdatesCount in interface ProfileDaouserId - uuid of the user
public ProfilePrivacy addNewPrivacyRecord(ProfilePrivacy privacy)
addNewPrivacyRecord in interface ProfileDaoprivacy - ProfilePrivacy object
public ProfilePrivacy getPrivacyRecord(String userId)
getPrivacyRecord in interface ProfileDaouserId - uuid of the user
public boolean updatePrivacyRecord(ProfilePrivacy privacy)
updatePrivacyRecord in interface ProfileDaoprivacy - ProfilePrivacy object
public boolean addNewCompanyProfile(CompanyProfile companyProfile)
addNewCompanyProfile in interface ProfileDaocompanyProfile - CompanyProfile record
public boolean updateCompanyProfile(CompanyProfile companyProfile)
updateCompanyProfile in interface ProfileDaocompanyProfile - CompanyProfile record
public List<CompanyProfile> getCompanyProfiles(String userId)
getCompanyProfiles in interface ProfileDaouserId - uuid of the user
public boolean removeCompanyProfile(CompanyProfile companyProfile)
removeCompanyProfile in interface ProfileDaocompanyProfile - CompanyProfile record
public boolean addNewGalleryImage(GalleryImage galleryImage)
addNewGalleryImage in interface ProfileDaogalleryImage - GalleryImage record
public List<GalleryImage> getGalleryImages(String userId)
getGalleryImages in interface ProfileDaouserId - uuid of the user
public boolean removeGalleryImage(GalleryImage galleryImage)
removeGalleryImage in interface ProfileDaogalleryImage - GalleryImage record
public int getGalleryImagesCount(String userId)
getGalleryImagesCount in interface ProfileDaouserId - uuid of the user
public SocialNetworkingInfo getSocialNetworkingInfo(String userId)
getSocialNetworkingInfo in interface ProfileDaouserId - uuid of the user
public boolean saveSocialNetworkingInfo(SocialNetworkingInfo socialNetworkingInfo)
saveSocialNetworkingInfo in interface ProfileDaosocialNetworkingInfo - SocialNetworkingInfo object
public boolean addNewProfileImage(ProfileImageUploaded profileImage)
addNewProfileImage in interface ProfileDaoprofileImage - ProfileImageUploaded objpublic List<String> getAllSakaiPersonIds()
getAllSakaiPersonIds in interface ProfileDaopublic int getAllSakaiPersonIdsCount()
getAllSakaiPersonIdsCount in interface ProfileDao
public List<UserProfile> getUserProfiles(int start,
int count)
getUserProfiles in interface ProfileDaostart - first recordcount - total number of records
public ProfileImageExternal getExternalImageRecordForUser(String userId)
getExternalImageRecordForUser in interface ProfileDaouserId - uuid of the user
public boolean saveExternalImage(ProfileImageExternal externalImage)
saveExternalImage in interface ProfileDaoexternalImage - ProfileImageExternal record
public ProfilePreferences addNewPreferencesRecord(ProfilePreferences prefs)
addNewPreferencesRecord in interface ProfileDaoprefs - complete ProfilePreferences recordpublic ProfilePreferences getPreferencesRecordForUser(String userId)
getPreferencesRecordForUser in interface ProfileDaouserId - uuid for the user
public boolean savePreferencesRecord(ProfilePreferences prefs)
savePreferencesRecord in interface ProfileDaoprefs - ProfilePreferences record
public int getAllUnreadMessagesCount(String userId)
getAllUnreadMessagesCount in interface ProfileDaouserId - uuid of the user
public int getThreadsWithUnreadMessagesCount(String userId)
getThreadsWithUnreadMessagesCount in interface ProfileDaouserId - uuid of the user
public List<MessageThread> getMessageThreads(String userId)
getMessageThreads in interface ProfileDaouserId - uuid of the user
public int getMessageThreadsCount(String userId)
getMessageThreadsCount in interface ProfileDaouserId - uuid of the user
public int getSentMessagesCount(String userId)
getSentMessagesCount in interface ProfileDaouserId - uuid of the user
public List<Message> getMessagesInThread(String threadId)
getMessagesInThread in interface ProfileDaothreadId - id of the thread
public int getMessagesInThreadCount(String threadId)
getMessagesInThreadCount in interface ProfileDaothreadId - id of the thread
public Message getMessage(String id)
getMessage in interface ProfileDaoid - uuid of the Message
public MessageThread getMessageThread(String threadId)
getMessageThread in interface ProfileDaothreadId - id of the thread
public Message getLatestMessageInThread(String threadId)
getLatestMessageInThread in interface ProfileDaothreadId - id of the thread
public boolean toggleMessageRead(MessageParticipant participant,
boolean read)
toggleMessageRead in interface ProfileDaoparticipant - MessageParticipantread - true/false for read/unread
public MessageParticipant getMessageParticipant(String messageId,
String userUuid)
getMessageParticipant in interface ProfileDaomessageId - uuid of the messageuserUuid - uuid of the user
public List<String> getThreadParticipants(String threadId)
getThreadParticipants in interface ProfileDaothreadId - id of the thread
public 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 object
public ProfileKudos getKudos(String userUuid)
getKudos in interface ProfileDaopublic boolean updateKudos(ProfileKudos kudos)
updateKudos in interface ProfileDaokudos - ProfileKudos for the user
public ExternalIntegrationInfo getExternalIntegrationInfo(String userUuid)
getExternalIntegrationInfo in interface ProfileDaopublic boolean updateExternalIntegrationInfo(ExternalIntegrationInfo info)
updateExternalIntegrationInfo in interface ProfileDaoinfo - ExternalIntegrationInfo for the user
public 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 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 void init()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||