com.atlassian.confluence.user.persistence.dao
Class CachingPersonalInformationDao
java.lang.Object
com.atlassian.confluence.user.persistence.dao.CachingPersonalInformationDao
- All Implemented Interfaces:
- ObjectDao, PersonalInformationDao
public class CachingPersonalInformationDao
- extends Object
- implements PersonalInformationDao
Caches personal information IDs by username to improve performance by using the
Hibernate second-level cache more effectively.
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CachingPersonalInformationDao
public CachingPersonalInformationDao(PersonalInformationDao delegate,
com.atlassian.cache.CacheFactory cacheFactory)
getByUsername
public PersonalInformation getByUsername(String username)
- Description copied from interface:
PersonalInformationDao
- Fetches the personal information object for this username.
- Specified by:
getByUsername
in interface PersonalInformationDao
getById
public PersonalInformation getById(long id)
- Description copied from interface:
PersonalInformationDao
- Returns the personal information object with the given ID.
- Specified by:
getById
in interface PersonalInformationDao
remove
public void remove(com.atlassian.core.bean.EntityObject object)
- Specified by:
remove
in interface ObjectDao
refresh
public void refresh(com.atlassian.core.bean.EntityObject objectToRrfresh)
- Specified by:
refresh
in interface ObjectDao
replicate
public void replicate(Object objectToReplicate)
- Specified by:
replicate
in interface ObjectDao
findAll
public List findAll()
- Specified by:
findAll
in interface ObjectDao
findAllSorted
public List findAllSorted(String s)
- Specified by:
findAllSorted
in interface ObjectDao
findAllSorted
public List findAllSorted(String s,
boolean cached,
int firstRow,
int maxRows)
- Specified by:
findAllSorted
in interface ObjectDao
save
public void save(com.atlassian.core.bean.EntityObject objectToSave)
- Specified by:
save
in interface ObjectDao
getPersistentClass
public Class getPersistentClass()
- Specified by:
getPersistentClass
in interface ObjectDao
saveRaw
public void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
- Specified by:
saveRaw
in interface ObjectDao