@ParametersAreNonnullByDefault public class CachingPersonalInformationDao extends Object implements PersonalInformationDao, PersonalInformationBulkDao
There is a potential race condition in the cache, where creating two personal information objects at approximately the same time will lead to this cache returning the
NON_CACHEABLE| Constructor and Description |
|---|
CachingPersonalInformationDao(PersonalInformationDao delegateDao,
com.atlassian.vcache.VCacheFactory cacheFactory) |
| Modifier and Type | Method and Description |
|---|---|
Collection<PersonalInformation> |
bulkFetchPersonalInformation(Collection<com.atlassian.sal.api.user.UserKey> userKeys)
Delegates immediately to the database, and then adds each of the results to the cache.
|
List |
findAll()
Find all objects currently persisted of a particular type.
|
List |
findAllSorted(String s)
Find all objects currently persisted of a particular type and sort results by named property.
|
List |
findAllSorted(String s,
boolean cached,
int firstRow,
int maxRows)
Find all objects currently persisted of a particular type and sort results by named property.
|
<T> PageResponse<T> |
findByClassIds(Iterable<Long> ids,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<? super T> filter)
Find a list of objects from the same persistent class.
|
List<Long> |
findIdsWithAssociatedUser() |
List<PersonalInformation> |
getAllByUser(ConfluenceUser user)
Workaround for duplicate personal information.
|
PersonalInformation |
getById(long id)
Returns the personal information object with the given ID.
|
PersonalInformation |
getByUser(ConfluenceUser user)
Fetches the personal information object for this user.
|
PersonalInformation |
getByUsername(String username)
Deprecated.
|
Class |
getPersistentClass() |
void |
refresh(com.atlassian.core.bean.EntityObject objectToRrfresh)
Refreshes the object again with the fresh data from db.
|
void |
remove(com.atlassian.core.bean.EntityObject object)
Remove object from persistence.
|
void |
replicate(Object objectToReplicate)
Replicate the object.
|
void |
save(com.atlassian.core.bean.EntityObject objectToSave) |
void |
saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
saves the object.
|
public CachingPersonalInformationDao(PersonalInformationDao delegateDao, com.atlassian.vcache.VCacheFactory cacheFactory)
public PersonalInformation getByUser(ConfluenceUser user)
PersonalInformationDaogetByUser in interface PersonalInformationDaopublic List<PersonalInformation> getAllByUser(ConfluenceUser user)
PersonalInformationDaogetAllByUser in interface PersonalInformationDao@Deprecated public PersonalInformation getByUsername(String username)
getByUsername in interface PersonalInformationDaopublic PersonalInformation getById(long id)
PersonalInformationDaogetById in interface PersonalInformationDao@Nonnull public List<Long> findIdsWithAssociatedUser()
findIdsWithAssociatedUser in interface PersonalInformationDaopublic Collection<PersonalInformation> bulkFetchPersonalInformation(Collection<com.atlassian.sal.api.user.UserKey> userKeys)
bulkFetchPersonalInformation in interface PersonalInformationBulkDaoPersonalInformation object for each userpublic void remove(com.atlassian.core.bean.EntityObject object)
ObjectDaopublic void refresh(com.atlassian.core.bean.EntityObject objectToRrfresh)
ObjectDaopublic void replicate(Object objectToReplicate)
ObjectDao@Nonnull public List findAll()
ObjectDao@Nonnull public List findAllSorted(String s)
ObjectDaofindAllSorted in interface ObjectDaos - the name of the property to be sorted on. This should be null if no sorting is required.@Nonnull public List findAllSorted(String s, boolean cached, int firstRow, int maxRows)
ObjectDaofindAllSorted in interface ObjectDaos - the name of the property to be sorted on. This should be null if no sorting is required.cached - control whether the results should be cachedfirstRow - the index of the first result to be returnedmaxRows - the maximum number of results required. Use -1 to specify no limit.@Nonnull public <T> PageResponse<T> findByClassIds(Iterable<Long> ids, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super T> filter)
ObjectDaofindByClassIds in interface ObjectDaoT - the type of entity to returnids - - the ids of the entities to findlimitedRequest - the pagination request defining the page size to fetchfilter - a predicate to do in memory filtering of the result set before returningpublic void save(com.atlassian.core.bean.EntityObject objectToSave)
public Class getPersistentClass()
getPersistentClass in interface ObjectDaopublic void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
ObjectDaoCopyright © 2003–2018 Atlassian. All rights reserved.