com.atlassian.confluence.user.persistence.dao
Class CachingPersonalInformationDao

java.lang.Object
  extended by 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


Constructor Summary
CachingPersonalInformationDao(PersonalInformationDao delegate, com.atlassian.cache.CacheFactory cacheFactory)
           
 
Method Summary
 List findAll()
           
 List findAllSorted(String s)
           
 List findAllSorted(String s, boolean cached, int firstRow, int maxRows)
           
 PersonalInformation getById(long id)
          Returns the personal information object with the given ID.
 PersonalInformation getByUsername(String username)
          Fetches the personal information object for this username.
 Class getPersistentClass()
           
 void refresh(com.atlassian.core.bean.EntityObject objectToRrfresh)
           
 void remove(com.atlassian.core.bean.EntityObject object)
           
 void replicate(Object objectToReplicate)
           
 void save(com.atlassian.core.bean.EntityObject objectToSave)
           
 void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingPersonalInformationDao

public CachingPersonalInformationDao(PersonalInformationDao delegate,
                                     com.atlassian.cache.CacheFactory cacheFactory)
Method Detail

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


Confluence is developed by Atlassian.