com.atlassian.confluence.pages.persistence.dao.hibernate
Class HibernateCommentDao

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.ConfluenceHibernateObjectDao
                      extended by com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateCommentDao
All Implemented Interfaces:
ObjectDao, VersionedObjectDao, CommentDao, org.springframework.beans.factory.InitializingBean

public class HibernateCommentDao
extends ConfluenceHibernateObjectDao
implements CommentDao


Field Summary
 
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
HibernateCommentDao()
           
 
Method Summary
 java.util.Map<com.atlassian.bonnie.Searchable,java.lang.Integer> countComments(java.util.Collection<? extends com.atlassian.bonnie.Searchable> searchables)
           
 int countComments(com.atlassian.bonnie.Searchable searchable)
           
protected  Comment getByClassId(long id)
          Retrieve the object with a particular id from the database.
 Comment getById(long id)
           
 PageResponse<Comment> getChildren(Comment comment, LimitedRequest pageRequest, Depth depth)
           
 java.util.List<Comment> getPageComments(long pageId, java.util.Date since)
           
 java.util.List<Comment> getPageComments(long pageId, java.util.Date since, java.lang.String ignoreUsername)
           
 PageResponse<Comment> getPageComments(long pageId, LimitedRequest pageRequest, Depth depth)
           
 java.lang.Class getPersistentClass()
           
 java.util.Iterator getRecentlyUpdatedComments(long spaceId, int maxResults)
           
 
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 bucket.core.persistence.ObjectDao
findAll, findAllSorted, findAllSorted, refresh, remove, replicate, save, saveRaw
 

Constructor Detail

HibernateCommentDao

public HibernateCommentDao()
Method Detail

getPersistentClass

public java.lang.Class getPersistentClass()
Specified by:
getPersistentClass in interface ObjectDao

getById

public Comment getById(long id)
Specified by:
getById in interface CommentDao

getByClassId

protected Comment 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 HibernateObjectDao
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.

getRecentlyUpdatedComments

public java.util.Iterator getRecentlyUpdatedComments(long spaceId,
                                                     int maxResults)
Specified by:
getRecentlyUpdatedComments in interface CommentDao

getPageComments

public java.util.List<Comment> getPageComments(long pageId,
                                               java.util.Date since)
Specified by:
getPageComments in interface CommentDao

getPageComments

public java.util.List<Comment> getPageComments(long pageId,
                                               java.util.Date since,
                                               java.lang.String ignoreUsername)
Specified by:
getPageComments in interface CommentDao

countComments

public java.util.Map<com.atlassian.bonnie.Searchable,java.lang.Integer> countComments(java.util.Collection<? extends com.atlassian.bonnie.Searchable> searchables)
Specified by:
countComments in interface CommentDao

countComments

public int countComments(com.atlassian.bonnie.Searchable searchable)
Specified by:
countComments in interface CommentDao

getPageComments

public PageResponse<Comment> getPageComments(long pageId,
                                             LimitedRequest pageRequest,
                                             Depth depth)
Specified by:
getPageComments in interface CommentDao

getChildren

public PageResponse<Comment> getChildren(Comment comment,
                                         LimitedRequest pageRequest,
                                         Depth depth)
Specified by:
getChildren in interface CommentDao


Copyright © 2003-2014 Atlassian. All Rights Reserved.