com.atlassian.confluence.spaces.persistence.dao.hibernate
Class HibernateSpaceGroupDao
java.lang.Object
org.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.HibernateSpaceGroupDao
- All Implemented Interfaces:
- ObjectDao, VersionedObjectDao, SpaceGroupDao, org.springframework.beans.factory.InitializingBean
public class HibernateSpaceGroupDao
- extends ConfluenceHibernateObjectDao
- implements SpaceGroupDao
Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
Method Summary |
int |
findSpaceTotal(SpaceGroup spaceGroup)
Fast way to count Spaces in a SpaceGroup without loading them. |
protected com.atlassian.core.bean.EntityObject |
getByClassId(long l)
Retrieve the object with a particular id from the database. |
SpaceGroup |
getById(long id)
|
java.lang.Class |
getPersistentClass()
|
SpaceGroup |
getSpaceGroup(java.lang.String spaceGroupKey)
first tries to fetch the spaceGroup from the cache by space id
if not, fetch it from database |
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 |
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao |
findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getCountResult, index, refresh, reIndex, replicate, save, saveRaw, setIndexer, unIndex, uniqueResult |
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 |
CACHE_KEY_SPACEGROUP_KEY_TO_SPACEGROUPID
public static final java.lang.String CACHE_KEY_SPACEGROUP_KEY_TO_SPACEGROUPID
HibernateSpaceGroupDao
public HibernateSpaceGroupDao()
getByClassId
protected com.atlassian.core.bean.EntityObject getByClassId(long l)
- Description copied from class:
HibernateObjectDao
- Retrieve the object with a particular id from the database. The object must be of
the same class as the DAO's getPersistentClass() method returns.
- Overrides:
getByClassId
in class HibernateObjectDao
- Parameters:
l
- the id of the object to look up
- Returns:
- the corresponding object, or null if the object does not exist with the
appropriate class and id.
getById
public SpaceGroup getById(long id)
- Specified by:
getById
in interface SpaceGroupDao
getSpaceGroup
public SpaceGroup getSpaceGroup(java.lang.String spaceGroupKey)
- first tries to fetch the spaceGroup from the cache by space id
if not, fetch it from database
- Specified by:
getSpaceGroup
in interface SpaceGroupDao
findSpaceTotal
public int findSpaceTotal(SpaceGroup spaceGroup)
- Description copied from interface:
SpaceGroupDao
- Fast way to count Spaces in a SpaceGroup without loading them.
- Specified by:
findSpaceTotal
in interface SpaceGroupDao
- Returns:
- returns the number of all spaces within a spaceGroup
remove
public 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
- Specified by:
remove
in interface ObjectDao
- Overrides:
remove
in class HibernateObjectDao
- Parameters:
entity
- the object to remove
getPersistentClass
public java.lang.Class getPersistentClass()
- Specified by:
getPersistentClass
in interface ObjectDao
Copyright © 2003-2014 Atlassian. All Rights Reserved.