Package com.atlassian.bamboo.comment
Class CommentHibernateDao
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.orm.hibernate5.support.HibernateDaoSupport
-
- com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
-
- com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<Comment>
-
- com.atlassian.bamboo.comment.CommentHibernateDao
-
- All Implemented Interfaces:
CommentDao
,BambooObjectDao<Comment>
,org.springframework.beans.factory.InitializingBean
public class CommentHibernateDao extends BambooHibernateObjectDao<Comment> implements CommentDao
-
-
Constructor Summary
Constructors Constructor Description CommentHibernateDao(TransactionAndHibernateTemplate transactionTemplate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteByEntityId(long entityId)
Delete Comments related to an entity.int
deleteByEntityId(@NotNull DeletionSQLAdapter deletionAdapter)
Delete Comments related to an entity.Comment
findById(long id)
@NotNull List<Comment>
findCommentByUser(String userName)
@NotNull List<Comment>
getCommentsForBuildResults(@NotNull PlanKey planKey)
@NotNull List<Comment>
getCommentsForEntity(long entityId)
@NotNull List<Comment>
getCommentsForJobResults(@NotNull ChainResultsSummary chainResultsSummary)
long
scrollCommentsForExport(@NotNull Consumer<Comment> consumer)
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
convertSearchTermToLikeExpression, countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAll
-
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
-
Methods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
-
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
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
-
-
-
Constructor Detail
-
CommentHibernateDao
public CommentHibernateDao(TransactionAndHibernateTemplate transactionTemplate)
-
-
Method Detail
-
findById
public Comment findById(long id)
- Specified by:
findById
in interfaceCommentDao
-
getCommentsForEntity
@NotNull public @NotNull List<Comment> getCommentsForEntity(long entityId)
- Specified by:
getCommentsForEntity
in interfaceCommentDao
-
deleteByEntityId
public void deleteByEntityId(long entityId)
Description copied from interface:CommentDao
Delete Comments related to an entity.- Specified by:
deleteByEntityId
in interfaceCommentDao
-
findCommentByUser
@NotNull public @NotNull List<Comment> findCommentByUser(String userName)
- Specified by:
findCommentByUser
in interfaceCommentDao
-
getCommentsForBuildResults
@NotNull public @NotNull List<Comment> getCommentsForBuildResults(@NotNull @NotNull PlanKey planKey)
- Specified by:
getCommentsForBuildResults
in interfaceCommentDao
-
getCommentsForJobResults
@NotNull public @NotNull List<Comment> getCommentsForJobResults(@NotNull @NotNull ChainResultsSummary chainResultsSummary)
- Specified by:
getCommentsForJobResults
in interfaceCommentDao
-
scrollCommentsForExport
public long scrollCommentsForExport(@NotNull @NotNull Consumer<Comment> consumer)
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 interfaceCommentDao
- Parameters:
consumer
- consumer that will accept each of the Comments- Returns:
- number of traversed rows
-
deleteByEntityId
public int deleteByEntityId(@NotNull @NotNull DeletionSQLAdapter deletionAdapter)
Description copied from interface:CommentDao
Delete Comments related to an entity.- Specified by:
deleteByEntityId
in interfaceCommentDao
-
-