|
||||||||||
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 |
---|
Fields inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao |
---|
cacheFactory, log |
Fields inherited from class org.springframework.dao.support.DaoSupport |
---|
logger |
Constructor Summary | |
---|---|
HibernateSpaceDao()
|
Method Summary | |
---|---|
java.util.List |
findAllGlobalSpaces()
|
java.util.List |
findAllSpacesSorted(java.lang.String sortField,
SpaceType type)
Like findAllSorted, but allows you to query for a specific type of space |
int |
findPageTotal(Space space)
Fast way to count pages in a space without loading them. |
protected com.atlassian.core.bean.EntityObject |
getByClassId(long l)
|
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.util.List |
getPermittedSpacesForUser(com.atlassian.user.User user,
java.lang.String permission)
Find all spaces on which the given user has the given permission |
java.util.List |
getPermittedSpacesForUserByType(com.atlassian.user.User user,
java.lang.String permission,
SpaceType type)
Query for spaces by type. |
java.util.List |
getPermittedSpacesForUserInSpaceGroup(com.atlassian.user.User user,
java.lang.String permission,
SpaceGroup spaceGroup)
Query for spaces by type. |
java.lang.Class |
getPersistentClass()
|
Space |
getSpace(java.lang.String spaceKey)
first tries to fetch the space from the cache by space id if not, fetch it from database |
java.util.List |
getSpacesContainingCommentsByUser(java.lang.String username)
Find all spaces containing comments by a particular user. |
java.util.List |
getSpacesContainingPagesEditedByUser(java.lang.String username)
Find all spaces containing pages that were edited by a particular user. |
java.util.List |
getSpacesCreatedAfter(java.util.Date creationDate)
|
java.util.List |
getSpacesCreatedByUser(java.lang.String username)
Find all the spaces created by a given user. |
java.util.List |
getSpacesCreatedOrUpdatedSinceDate(java.util.Date previousLoginDate)
|
java.util.List |
getSpacesInSpaceGroup(SpaceGroup spaceGroup)
Find all spaces within a given spaceGroup |
UserAccessor |
getUserAccessor()
|
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 |
setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
|
void |
setUserAccessor(UserAccessor userAccessor)
|
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao |
---|
findByQuery |
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao |
---|
findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, save, setCacheFactory, updateModificationData |
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao |
---|
findAll, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, index, refresh, reIndex, replicate, save, saveRaw, setIndexer, unIndex |
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, refresh, replicate, save, saveRaw |
Constructor Detail |
---|
public HibernateSpaceDao()
Method Detail |
---|
public java.util.List findAllGlobalSpaces()
findAllGlobalSpaces
in interface SpaceDao
public java.util.List findAllSpacesSorted(java.lang.String sortField, SpaceType type)
findAllSpacesSorted
in interface SpaceDao
sortField
-
protected com.atlassian.core.bean.EntityObject getByClassId(long l)
getByClassId
in class com.atlassian.hibernate.HibernateObjectDao
public Space getById(long id)
getById
in interface SpaceDao
public Space getSpace(java.lang.String spaceKey)
getSpace
in interface SpaceDao
spaceKey
- public java.util.List getSpacesInSpaceGroup(SpaceGroup spaceGroup)
SpaceDao
getSpacesInSpaceGroup
in interface SpaceDao
public java.util.List getSpacesCreatedByUser(java.lang.String username)
SpaceDao
getSpacesCreatedByUser
in interface SpaceDao
public java.util.List getSpacesContainingPagesEditedByUser(java.lang.String username)
SpaceDao
getSpacesContainingPagesEditedByUser
in interface SpaceDao
username
- the name of the user to track down
public java.util.List getSpacesContainingCommentsByUser(java.lang.String username)
SpaceDao
getSpacesContainingCommentsByUser
in interface SpaceDao
username
- the name of the user to track down
public java.util.List 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 bucket.core.persistence.ObjectDao
remove
in class com.atlassian.hibernate.HibernateObjectDao
entity
- public void setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
public java.lang.Class getPersistentClass()
getPersistentClass
in interface bucket.core.persistence.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 getSpacesCreatedAfter(java.util.Date creationDate)
getSpacesCreatedAfter
in interface SpaceDao
public java.util.List getPermittedSpacesForUser(com.atlassian.user.User user, java.lang.String permission)
SpaceDao
getPermittedSpacesForUser
in interface SpaceDao
public java.util.List getPermittedSpacesForUserByType(com.atlassian.user.User user, java.lang.String permission, SpaceType type)
getPermittedSpacesForUserByType
in interface SpaceDao
user
- permission
- type
- public java.util.List getPermittedSpacesForUserInSpaceGroup(com.atlassian.user.User user, java.lang.String permission, SpaceGroup spaceGroup)
getPermittedSpacesForUserInSpaceGroup
in interface SpaceDao
user
- permission
- spaceGroup
- public void setUserAccessor(UserAccessor userAccessor)
public UserAccessor getUserAccessor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |