com.atlassian.confluence.content.persistence.hibernate
Class PluginContentHibernateDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.hibernate.HibernateObjectDao
              extended by com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
                  extended by com.atlassian.confluence.core.persistence.hibernate.ContentEntityObjectHibernateDao
                      extended by com.atlassian.confluence.content.persistence.hibernate.PluginContentHibernateDao
All Implemented Interfaces:
ObjectDao, CustomContentDao, ContentEntityObjectDao, VersionedObjectDao, org.springframework.beans.factory.InitializingBean

public class PluginContentHibernateDao
extends ContentEntityObjectHibernateDao
implements CustomContentDao, org.springframework.beans.factory.InitializingBean

Hibernate Implementation of the CustomContentDao


Field Summary
 
Fields inherited from class com.atlassian.confluence.core.persistence.hibernate.ContentEntityObjectHibernateDao
ONE_DAY
 
Fields inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
cacheFactory, confluenceUserDao
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Fields inherited from interface bucket.core.persistence.ObjectDao
NON_CACHEABLE
 
Constructor Summary
PluginContentHibernateDao()
           
 
Method Summary
 long countChildrenOfType(long parentId, String pluginModuleKey)
           
 Iterator<CustomContentEntityObject> findAll(String pluginContentKey)
          Retrieves an iterator of CustomContentEntityObject with the specified pluginContentKey
 Iterator<CustomContentEntityObject> findAllChildren(long parentId)
          Retrieves all children of the specified content.
 Iterator<CustomContentEntityObject> findAllInSpace(long spaceId)
           
 Iterator<CustomContentEntityObject> findAllInSpace(String pluginModuleKey, long spaceId)
           
 Iterator<CustomContentEntityObject> findAllInSpaceWithAttachments(long spaceId)
           
 Iterator<CustomContentEntityObject> findAllInSpaceWithAttachments(String pluginModuleKey, long spaceId)
           
 Iterator<CustomContentEntityObject> findAllWithAttachments(String pluginContentKey)
          Retrieves an iterator of CustomContentEntityObject with the specified pluginContentKey.
<T> PageResponse<T>
findByQuery(ContentQuery<T> contentQuery, boolean cacheable, LimitedRequest limitedRequest, com.google.common.base.Predicate<T> predicate)
           
<T> Iterator<T>
findByQuery(ContentQuery<T> contentQuery, int offset, int maxResults)
           
 Iterator<CustomContentEntityObject> findChildrenOfType(long parentId, String pluginModuleKey, int offset, int maxResults, CustomContentManager.SortField sortField, CustomContentManager.SortOrder sortOrder)
           
 Iterator<CustomContentEntityObject> findCurrentInSpace(long spaceId, String pluginModuleKey, int offset, int maxResults, CustomContentManager.SortField sortField, CustomContentManager.SortOrder sortOrder)
           
 int findTotalInSpace(long spaceId, String pluginModuleKey)
           
protected  CustomContentEntityObject getByClassId(long id)
          Retrieve the object with a particular id from the database.
 CustomContentEntityObject getById(long id)
           
 Class getPersistentClass()
           
 void setConfluenceHibernateConfig(ConfluenceHibernateConfig confluenceHibernateConfig)
           
 void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
           
 
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.ContentEntityObjectHibernateDao
countContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findHistoricalVersionsAfterVersion, findPreviousVersions, getAllCurrentEntities, getContentAuthoredByUser, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getLockedContentBySpace, getObjectType, getOldestPageCreationDate, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getVersion, getVersionHistorySummary
 
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, findNamedQueryStringParams, save, setCacheFactory, setConfluenceUserDao, updateModificationData
 
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, remove, 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
 
Methods inherited from interface com.atlassian.confluence.core.persistence.ContentEntityObjectDao
countContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findContentBySpaceIdAndStatus, findHistoricalVersionsAfterVersion, findPreviousVersions, getAllCurrentEntities, getContentAuthoredByUser, getFirstVersionAfter, getFirstVersionBefore, getLastEditedVersionsOf, getLockedContentBySpace, getObjectType, getOldestPageCreationDate, getRecentlyAddedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntities, getRecentlyModifiedEntitiesForUser, getRecentlyModifiedForChangeDigest, getTrashedContent, getVersion, getVersionHistorySummary
 
Methods inherited from interface com.atlassian.confluence.core.persistence.VersionedObjectDao
findLatestVersionsCount, findLatestVersionsIterator, save
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, findAllSorted, refresh, remove, replicate, save, saveRaw
 
Methods inherited from interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
 

Constructor Detail

PluginContentHibernateDao

public PluginContentHibernateDao()
Method Detail

getById

public CustomContentEntityObject getById(long id)
Specified by:
getById in interface ContentEntityObjectDao
Overrides:
getById in class ContentEntityObjectHibernateDao

getByClassId

protected CustomContentEntityObject getByClassId(long id)
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 ContentEntityObjectHibernateDao
Parameters:
id - 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.

getPersistentClass

public Class getPersistentClass()
Specified by:
getPersistentClass in interface ObjectDao
Overrides:
getPersistentClass in class ContentEntityObjectHibernateDao

setPluginAccessor

public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)

setConfluenceHibernateConfig

public void setConfluenceHibernateConfig(ConfluenceHibernateConfig confluenceHibernateConfig)

findByQuery

public <T> Iterator<T> findByQuery(ContentQuery<T> contentQuery,
                                   int offset,
                                   int maxResults)
Specified by:
findByQuery in interface CustomContentDao

findByQuery

public <T> PageResponse<T> findByQuery(ContentQuery<T> contentQuery,
                                       boolean cacheable,
                                       LimitedRequest limitedRequest,
                                       com.google.common.base.Predicate<T> predicate)
Specified by:
findByQuery in interface CustomContentDao

findTotalInSpace

public int findTotalInSpace(long spaceId,
                            String pluginModuleKey)
Specified by:
findTotalInSpace in interface CustomContentDao

findCurrentInSpace

public Iterator<CustomContentEntityObject> findCurrentInSpace(long spaceId,
                                                              String pluginModuleKey,
                                                              int offset,
                                                              int maxResults,
                                                              CustomContentManager.SortField sortField,
                                                              CustomContentManager.SortOrder sortOrder)
Specified by:
findCurrentInSpace in interface CustomContentDao

findAllInSpaceWithAttachments

public Iterator<CustomContentEntityObject> findAllInSpaceWithAttachments(String pluginModuleKey,
                                                                         long spaceId)
Specified by:
findAllInSpaceWithAttachments in interface CustomContentDao

findAllInSpace

public Iterator<CustomContentEntityObject> findAllInSpace(String pluginModuleKey,
                                                          long spaceId)
Specified by:
findAllInSpace in interface CustomContentDao

findAllInSpaceWithAttachments

public Iterator<CustomContentEntityObject> findAllInSpaceWithAttachments(long spaceId)
Specified by:
findAllInSpaceWithAttachments in interface CustomContentDao

findAllInSpace

public Iterator<CustomContentEntityObject> findAllInSpace(long spaceId)
Specified by:
findAllInSpace in interface CustomContentDao

findAll

public Iterator<CustomContentEntityObject> findAll(String pluginContentKey)
Description copied from interface: CustomContentDao
Retrieves an iterator of CustomContentEntityObject with the specified pluginContentKey

Specified by:
findAll in interface CustomContentDao
Parameters:
pluginContentKey - CustomContentEntityObject with this plugin content key will be returned
Returns:
iterator of CustomContentEntityObject

findAllWithAttachments

public Iterator<CustomContentEntityObject> findAllWithAttachments(String pluginContentKey)
Description copied from interface: CustomContentDao
Retrieves an iterator of CustomContentEntityObject with the specified pluginContentKey. We are loading

Specified by:
findAllWithAttachments in interface CustomContentDao
Parameters:
pluginContentKey - CustomContentEntityObject with this plugin content key will be returned
Returns:
iterator of CustomContentEntityObject

findAllChildren

public Iterator<CustomContentEntityObject> findAllChildren(long parentId)
Description copied from interface: CustomContentDao
Retrieves all children of the specified content.

Specified by:
findAllChildren in interface CustomContentDao
Parameters:
parentId - children of this content entity will be returned
Returns:
iterator of CustomContentEntityObject

findChildrenOfType

public Iterator<CustomContentEntityObject> findChildrenOfType(long parentId,
                                                              String pluginModuleKey,
                                                              int offset,
                                                              int maxResults,
                                                              CustomContentManager.SortField sortField,
                                                              CustomContentManager.SortOrder sortOrder)
Specified by:
findChildrenOfType in interface CustomContentDao

countChildrenOfType

public long countChildrenOfType(long parentId,
                                String pluginModuleKey)
Specified by:
countChildrenOfType in interface CustomContentDao


Copyright © 2003–2015 Atlassian. All rights reserved.