|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate.support.HibernateDaoSupport
com.atlassian.hibernate.HibernateObjectDao
com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao
com.atlassian.confluence.spaces.persistence.dao.hibernate.HibernateSpaceDao
public class HibernateSpaceDao
Field Summary | |
---|---|
static java.lang.String |
CACHE_KEY_SPACE_KEY_TO_SPACEID
|
Fields inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao |
---|
cacheFactory, confluenceUserDao |
Fields inherited from class org.springframework.dao.support.DaoSupport |
---|
logger |
Constructor Summary | |
---|---|
HibernateSpaceDao()
|
Method Summary | |
---|---|
int |
countPermittedSpacesForUser(com.atlassian.user.User user,
java.util.List<com.atlassian.user.Group> groups,
java.lang.String permission)
Deprecated. |
int |
countSpaces(SpacesQuery query)
Count the spaces specified by the SpacesQuery . |
int |
findPageTotal(Space space)
Fast way to count pages in a space without loading them. |
java.util.Collection<java.lang.String> |
findSpaceKeysWithStatus(java.lang.String status)
find all space keys where the space status is equal to the given status. |
java.lang.String |
findUniqueVersionOfSpaceKey(java.lang.String spaceKey)
Return a unique version of the supplied spaceKey. |
protected com.atlassian.core.bean.EntityObject |
getByClassId(long l)
Retrieve the object with a particular id from the database. |
Space |
getById(long id)
|
int |
getNumberOfBlogPosts(Space space)
Fast way to count blog posts in a space without loading them. |
int |
getNumberOfMail(Space space)
Fast way to count pages in a space without loading them. |
java.lang.Class<Space> |
getPersistentClass()
|
Space |
getPersonalSpace(ConfluenceUser user)
|
Space |
getSpace(java.lang.String spaceKey)
first tries to fetch the space from the cache by space id if not, fetch it from database |
Space |
getSpaceByContentId(long contentId)
Get the space that some content belongs to in a single db query. |
java.util.List<Space> |
getSpaces(SpacesQuery query)
Get a list of spaces specified by the SpacesQuery . |
java.util.List<Space> |
getSpaces(SpacesQuery query,
int offset,
int maxResults)
Get a list of spaces specified by the SpacesQuery . |
java.util.List<Space> |
getSpacesContainingCommentsByUser(java.lang.String username)
Find all spaces containing comments by a particular user. |
java.util.List<Space> |
getSpacesContainingPagesEditedByUser(java.lang.String username)
Find all spaces containing pages that were edited by a particular user. |
java.util.List<Space> |
getSpacesCreatedAfter(java.util.Date creationDate)
|
java.util.List<Space> |
getSpacesCreatedByUser(java.lang.String username)
Find all the spaces created by a given user. |
java.util.List<Space> |
getSpacesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)
|
void |
remove(com.atlassian.core.bean.EntityObject entity)
Override the parent remove method as we want to remove the object out of the cache as well |
void |
setUserAccessor(UserAccessor userAccessor)
|
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao |
---|
findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, save, setCacheFactory, setConfluenceUserDao, updateModificationData |
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport |
---|
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
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 bucket.core.persistence.ObjectDao |
---|
findAll, findAllSorted, findAllSorted, refresh, replicate, save, saveRaw |
Field Detail |
---|
public static final java.lang.String CACHE_KEY_SPACE_KEY_TO_SPACEID
Constructor Detail |
---|
public HibernateSpaceDao()
Method Detail |
---|
protected com.atlassian.core.bean.EntityObject getByClassId(long l)
HibernateObjectDao
getByClassId
in class HibernateObjectDao
l
- the id of the object to look up
public Space getById(long id)
getById
in interface SpaceDao
public Space getSpace(java.lang.String spaceKey)
getSpace
in interface SpaceDao
public Space getPersonalSpace(ConfluenceUser user)
getPersonalSpace
in interface SpaceDao
user
- the user who's personal space is to be retrieved
public java.util.List<Space> getSpacesCreatedByUser(java.lang.String username)
SpaceDao
getSpacesCreatedByUser
in interface SpaceDao
public java.util.List<Space> getSpacesContainingPagesEditedByUser(java.lang.String username)
SpaceDao
getSpacesContainingPagesEditedByUser
in interface SpaceDao
username
- the name of the user to track down
public java.util.List<Space> getSpacesContainingCommentsByUser(java.lang.String username)
SpaceDao
getSpacesContainingCommentsByUser
in interface SpaceDao
username
- the name of the user to track down
public java.util.List<Space> getSpacesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)
getSpacesCreatedOrUpdatedSinceDate
in interface SpaceDao
public int findPageTotal(Space space)
SpaceDao
findPageTotal
in interface SpaceDao
public void remove(com.atlassian.core.bean.EntityObject entity)
remove
in interface ObjectDao
remove
in class HibernateObjectDao
entity
- the object to removepublic java.lang.Class<Space> getPersistentClass()
getPersistentClass
in interface ObjectDao
public int getNumberOfBlogPosts(Space space)
SpaceDao
getNumberOfBlogPosts
in interface SpaceDao
public int getNumberOfMail(Space space)
SpaceDao
getNumberOfMail
in interface SpaceDao
public java.util.List<Space> getSpacesCreatedAfter(java.util.Date creationDate)
getSpacesCreatedAfter
in interface SpaceDao
@Deprecated public int countPermittedSpacesForUser(com.atlassian.user.User user, java.util.List<com.atlassian.user.Group> groups, java.lang.String permission)
countPermittedSpacesForUser
in interface SpaceDao
public java.util.List<Space> getSpaces(SpacesQuery query, int offset, int maxResults)
SpaceDao
SpacesQuery
.
getSpaces
in interface SpaceDao
public java.util.List<Space> getSpaces(SpacesQuery query)
SpaceDao
SpacesQuery
. Its recommended to use the
SpaceDao.getSpaces(com.atlassian.confluence.spaces.SpacesQuery, int, int)
form of this method where ever
possible.
getSpaces
in interface SpaceDao
public int countSpaces(SpacesQuery query)
SpaceDao
SpacesQuery
.
countSpaces
in interface SpaceDao
public Space getSpaceByContentId(long contentId)
SpaceDao
getSpaceByContentId
in interface SpaceDao
contentId
- the ID of the content
public java.util.Collection<java.lang.String> findSpaceKeysWithStatus(java.lang.String status)
SpaceDao
findSpaceKeysWithStatus
in interface SpaceDao
status
- the status to search for
public java.lang.String findUniqueVersionOfSpaceKey(java.lang.String spaceKey)
SpaceDao
findUniqueVersionOfSpaceKey
in interface SpaceDao
spaceKey
- the space key to create a unique version of
public void setUserAccessor(UserAccessor userAccessor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |