|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.orm.hibernate.support.HibernateDaoSupport
com.atlassian.hibernate.HibernateObjectDao
bucket.core.persistence.hibernate.CachableHibernateObjectDao
com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao
com.atlassian.confluence.spaces.persistence.dao.hibernate.HibernateSpaceDao
Field Summary |
Fields inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao |
log |
Fields inherited from class bucket.core.persistence.hibernate.CachableHibernateObjectDao |
cacheManager |
Fields inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport |
logger |
Constructor Summary | |
HibernateSpaceDao()
|
Method Summary | |
List |
findAllGlobalSpaces()
|
List |
findAllSpacesSorted(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 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. |
List |
getPermittedSpacesForUser(User user,
String permission)
Find all spaces on which the given user has the given permission |
List |
getPermittedSpacesForUserByType(User user,
String permission,
SpaceType type)
Query for spaces by type. |
List |
getPermittedSpacesForUserInSpaceGroup(User user,
String permission,
SpaceGroup spaceGroup)
Query for spaces by type. |
Class |
getPersistentClass()
|
Space |
getSpace(String spaceKey)
first tries to fetch the space from the cache by space id if not, fetch it from database |
List |
getSpacesContainingCommentsByUser(String username)
Find all spaces containing comments by a particular user. |
List |
getSpacesContainingPagesEditedByUser(String username)
Find all spaces containing pages that were edited by a particular user. |
List |
getSpacesCreatedAfter(Date creationDate)
|
List |
getSpacesCreatedByUser(String username)
Find all the spaces created by a given user. |
List |
getSpacesCreatedOrUpdatedSinceDate(Date previousLoginDate)
|
List |
getSpacesInSpaceGroup(SpaceGroup spaceGroup)
Find all spaces within a given spaceGroup |
UserAccessor |
getUserAccessor()
|
void |
remove(EntityObject entity)
Override the parent remove method as we want to remove the object out of the cache as well |
void |
setHibernateConfig(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, updateModificationData |
Methods inherited from class bucket.core.persistence.hibernate.CachableHibernateObjectDao |
setCacheManager |
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport |
afterPropertiesSet, closeSessionIfNecessary, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, initDao, setHibernateTemplate, setSessionFactory |
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 List findAllGlobalSpaces()
findAllGlobalSpaces
in interface SpaceDao
public List findAllSpacesSorted(String sortField, SpaceType type)
findAllSpacesSorted
in interface SpaceDao
sortField
-
protected EntityObject getByClassId(long l)
public Space getById(long id)
getById
in interface SpaceDao
public Space getSpace(String spaceKey)
getSpace
in interface SpaceDao
spaceKey
- public List getSpacesInSpaceGroup(SpaceGroup spaceGroup)
SpaceDao
getSpacesInSpaceGroup
in interface SpaceDao
spaceGroup
-
public List getSpacesCreatedByUser(String username)
SpaceDao
getSpacesCreatedByUser
in interface SpaceDao
public List getSpacesContainingPagesEditedByUser(String username)
SpaceDao
getSpacesContainingPagesEditedByUser
in interface SpaceDao
username
- the name of the user to track down
public List getSpacesContainingCommentsByUser(String username)
SpaceDao
getSpacesContainingCommentsByUser
in interface SpaceDao
username
- the name of the user to track down
public List getSpacesCreatedOrUpdatedSinceDate(Date previousLoginDate)
getSpacesCreatedOrUpdatedSinceDate
in interface SpaceDao
public int findPageTotal(Space space)
SpaceDao
findPageTotal
in interface SpaceDao
public void remove(EntityObject entity)
remove
in interface ObjectDao
entity
- public void setHibernateConfig(HibernateConfig hibernateConfig)
public Class 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 List getSpacesCreatedAfter(Date creationDate)
getSpacesCreatedAfter
in interface SpaceDao
public List getPermittedSpacesForUser(User user, String permission)
SpaceDao
getPermittedSpacesForUser
in interface SpaceDao
public List getPermittedSpacesForUserByType(User user, String permission, SpaceType type)
getPermittedSpacesForUserByType
in interface SpaceDao
user
- permission
- type
- public List getPermittedSpacesForUserInSpaceGroup(User user, 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 |