Class HibernatePersonalInformationDao
java.lang.Object
org.springframework.dao.support.DaoSupport
com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<PersonalInformation>
com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao<PersonalInformation>
com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao<PersonalInformation>
com.atlassian.confluence.user.persistence.dao.hibernate.HibernatePersonalInformationDao
- All Implemented Interfaces:
PersonalInformationBulkDao,PersonalInformationDaoInternal,PersonalInformationDao,org.springframework.beans.factory.InitializingBean
@ParametersAreNonnullByDefault
public class HibernatePersonalInformationDao
extends VersionedHibernateObjectDao<PersonalInformation>
implements PersonalInformationDaoInternal, PersonalInformationBulkDao
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
HibernateObjectDao.Cacheability -
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbulkFetchPersonalInformation(Collection<com.atlassian.sal.api.user.UserKey> userKeys) Bulk-fetches all PersonalInformation entities for the given UserKeys.getAllByUser(@Nullable ConfluenceUser user) Workaround for duplicate personal information.protected PersonalInformationgetByClassId(long id) Retrieve the object with a particular id from the database.getById(long id) Returns the personal information object with the given ID.getByUser(@Nullable ConfluenceUser user) Fetches a personal information object for the specified user.voidremove(PersonalInformation personalInformation) Remove an object from the databaseMethods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
applyChildVersioningPolicy, findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, saveMethods inherited from class com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao
findNamedQueryStringParams, getContentStatusStringList, getStatusNames, scanFilteredContents, scanFilteredContents, updateModificationDataMethods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getCountResult, getHibernateTemplate, getSessionFactory, publishEvent, reIndex, save, saveEntity, saveRaw, setHibernateTemplate, setSessionFactory, uniqueResultMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDaoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.internal.user.persistence.PersonalInformationDaoInternal
findAll, save
-
Constructor Details
-
HibernatePersonalInformationDao
public HibernatePersonalInformationDao()
-
-
Method Details
-
getByUser
Fetches a personal information object for the specified user. To get a properly initialized personal information object, please usePersonalInformationManager.getOrCreatePersonalInformation(User).- Specified by:
getByUserin interfacePersonalInformationDao- Since:
- 5.2
-
getAllByUser
Description copied from interface:PersonalInformationDaoWorkaround for duplicate personal information. Remove when that's fixed.- Specified by:
getAllByUserin interfacePersonalInformationDao
-
getById
Description copied from interface:PersonalInformationDaoReturns the personal information object with the given ID.- Specified by:
getByIdin interfacePersonalInformationDao
-
findIdsWithAssociatedUser
- Specified by:
findIdsWithAssociatedUserin interfacePersonalInformationDao- Returns:
- all personal information ids having associated user
-
getByClassId
Description copied from class:HibernateObjectDaoRetrieve the object with a particular id from the database. The object must be of the same class as the DAO's getPersistentClass() method returns.- Overrides:
getByClassIdin classHibernateObjectDao<PersonalInformation>- Parameters:
id- the id of the object to look up- Returns:
- the corresponding object, or null if the object does not exist with the appropriate class and id.
-
getPersistentClass
- Specified by:
getPersistentClassin classHibernateObjectDao<PersonalInformation>
-
bulkFetchPersonalInformation
public Collection<PersonalInformation> bulkFetchPersonalInformation(Collection<com.atlassian.sal.api.user.UserKey> userKeys) Bulk-fetches all PersonalInformation entities for the given UserKeys. This query also does an eager fetch on the associated ConfluenceUserImpl object.- Specified by:
bulkFetchPersonalInformationin interfacePersonalInformationBulkDao- Returns:
- a collection containing at-most one
PersonalInformationobject for each user
-
remove
Description copied from class:HibernateObjectDaoRemove an object from the database- Specified by:
removein interfacePersonalInformationDaoInternal- Overrides:
removein classVersionedHibernateObjectDao<PersonalInformation>- Parameters:
personalInformation- the object to remove
-