|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.user.persistence.dao.CachingPersonalInformationDao
public class CachingPersonalInformationDao
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 | |
---|---|
java.util.List |
findAll()
Find all objects currently persisted of a particular type. |
java.util.List |
findAllSorted(java.lang.String s)
Find all objects currently persisted of a particular type and sort results by named property. |
java.util.List |
findAllSorted(java.lang.String s,
boolean cached,
int firstRow,
int maxRows)
Find all objects currently persisted of a particular type and sort results by named property. |
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(java.lang.String username)
Deprecated. |
java.lang.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(java.lang.Object objectToReplicate)
Replicate the object. |
void |
save(com.atlassian.core.bean.EntityObject objectToSave)
|
void |
saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
saves the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachingPersonalInformationDao(PersonalInformationDao delegate, com.atlassian.cache.CacheFactory cacheFactory)
Method Detail |
---|
public PersonalInformation getByUser(ConfluenceUser user)
PersonalInformationDao
getByUser
in interface PersonalInformationDao
@Deprecated public PersonalInformation getByUsername(java.lang.String username)
getByUsername
in interface PersonalInformationDao
public PersonalInformation getById(long id)
PersonalInformationDao
getById
in interface PersonalInformationDao
public void remove(com.atlassian.core.bean.EntityObject object)
ObjectDao
remove
in interface ObjectDao
public void refresh(com.atlassian.core.bean.EntityObject objectToRrfresh)
ObjectDao
refresh
in interface ObjectDao
public void replicate(java.lang.Object objectToReplicate)
ObjectDao
replicate
in interface ObjectDao
public java.util.List findAll()
ObjectDao
findAll
in interface ObjectDao
public java.util.List findAllSorted(java.lang.String s)
ObjectDao
findAllSorted
in interface ObjectDao
s
- the name of the property to be sorted on. This should be null if no sorting is required.public java.util.List findAllSorted(java.lang.String s, boolean cached, int firstRow, int maxRows)
ObjectDao
findAllSorted
in interface ObjectDao
s
- 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.public void save(com.atlassian.core.bean.EntityObject objectToSave)
save
in interface ObjectDao
public java.lang.Class getPersistentClass()
getPersistentClass
in interface ObjectDao
public void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
ObjectDao
saveRaw
in interface ObjectDao
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |