com.atlassian.bamboo.comment
Class CommentHibernateDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
              extended by com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<Comment>
                  extended by com.atlassian.bamboo.comment.CommentHibernateDao
All Implemented Interfaces:
CommentDao, BambooObjectDao<Comment>, org.springframework.beans.factory.InitializingBean

public class CommentHibernateDao
extends BambooHibernateObjectDao<Comment>
implements CommentDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
CommentHibernateDao()
           
 
Method Summary
 int deleteByEntityId(DeletionSQLAdapter deletionAdapter)
          Delete Comments related to an entity.
 Comment findById(long id)
           
 java.util.List<Comment> findCommentByUser(java.lang.String userName)
           
 java.util.List<Comment> getCommentsByUserForPlans(java.lang.String userName, java.util.List<? extends Plan> plans)
           
 java.util.List<Comment> getCommentsForEntity(long entityId)
           
 java.util.List<Comment> getPlanResultComments(ResultsSummary resultsSummary)
          Deprecated. 
 boolean hasPlanResultComments(ResultsSummary resultsSummary)
          Deprecated. 
 long scrollCommentsForExport(com.google.common.base.Function<Comment,java.lang.Void> function)
          Scroll through and execute function for each of Comment Objects passed to function are not fully initialized.
 
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
delete, deleteAll, execute, executeCountQuery, executeFind, executeReturnLong, findAll, findById, save, saveAll
 
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
 
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.bamboo.persistence3.BambooObjectDao
delete, deleteAll, executeReturnLong, findAll, findById, save, saveAll
 

Constructor Detail

CommentHibernateDao

public CommentHibernateDao()
Method Detail

findById

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

getCommentsForEntity

@NotNull
public java.util.List<Comment> getCommentsForEntity(long entityId)
Specified by:
getCommentsForEntity in interface CommentDao

findCommentByUser

@NotNull
public java.util.List<Comment> findCommentByUser(java.lang.String userName)
Specified by:
findCommentByUser in interface CommentDao

hasPlanResultComments

@Deprecated
public boolean hasPlanResultComments(@NotNull
                                                ResultsSummary resultsSummary)
Deprecated. 

Specified by:
hasPlanResultComments in interface CommentDao

getPlanResultComments

@NotNull
@Deprecated
public java.util.List<Comment> getPlanResultComments(@NotNull
                                                                        ResultsSummary resultsSummary)
Deprecated. 

Specified by:
getPlanResultComments in interface CommentDao

getCommentsByUserForPlans

@NotNull
public java.util.List<Comment> getCommentsByUserForPlans(@NotNull
                                                                 java.lang.String userName,
                                                                 @NotNull
                                                                 java.util.List<? extends Plan> plans)
Specified by:
getCommentsByUserForPlans in interface CommentDao

scrollCommentsForExport

public long scrollCommentsForExport(@NotNull
                                    com.google.common.base.Function<Comment,java.lang.Void> function)
Description copied from interface: CommentDao
Scroll through and execute function for each of Comment Objects passed to function are not fully initialized. Collections are empty and related objects have only id set.

Specified by:
scrollCommentsForExport in interface CommentDao
Parameters:
function - function to be executed on each of the Comment
Returns:
number of traversed rows

deleteByEntityId

public int deleteByEntityId(@NotNull
                            DeletionSQLAdapter deletionAdapter)
Description copied from interface: CommentDao
Delete Comments related to an entity.

Specified by:
deleteByEntityId in interface CommentDao


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.