Class HibernatePersonalInformationDao
java.lang.Object
org.springframework.dao.support.DaoSupport
com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<T>
com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao<T>
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 PersonalInformation
getByClassId
(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.void
remove
(PersonalInformation personalInformation) Remove an object from the databaseMethods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
applyChildVersioningPolicy, findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, save
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao
findNamedQueryStringParams, getContentStatusStringList, getStatusNames, scanFilteredContents, scanFilteredContents, updateModificationData
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, 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, uniqueResult
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
Methods 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:
getByUser
in interfacePersonalInformationDao
- Since:
- 5.2
-
getAllByUser
Description copied from interface:PersonalInformationDao
Workaround for duplicate personal information. Remove when that's fixed.- Specified by:
getAllByUser
in interfacePersonalInformationDao
-
getById
Description copied from interface:PersonalInformationDao
Returns the personal information object with the given ID.- Specified by:
getById
in interfacePersonalInformationDao
-
findIdsWithAssociatedUser
- Specified by:
findIdsWithAssociatedUser
in interfacePersonalInformationDao
- Returns:
- all personal information ids having associated user
-
getByClassId
Description copied from class:HibernateObjectDao
Retrieve 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:
getByClassId
in 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:
getPersistentClass
in 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:
bulkFetchPersonalInformation
in interfacePersonalInformationBulkDao
- Returns:
- a collection containing at-most one
PersonalInformation
object for each user
-
remove
Description copied from class:HibernateObjectDao
Remove an object from the database- Specified by:
remove
in interfacePersonalInformationDaoInternal
- Overrides:
remove
in classVersionedHibernateObjectDao<PersonalInformation>
- Parameters:
personalInformation
- the object to remove
-