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
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
anonymizeUserComments
(@NotNull String username) Anonymizes all comments related to the specified username.void
deleteByEntityId
(long entityId) Delete Comments related to an entity.int
deleteByEntityId
(@NotNull DeletionSQLAdapter deletionAdapter) Delete Comments related to an entity.findById
(long id) findCommentByUser
(String userName) getCommentsForBuildResults
(@NotNull PlanKey planKey) getCommentsForEntity
(long entityId) 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 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
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
Constructor Details
-
CommentHibernateDao
-
-
Method Details
-
findById
- Specified by:
findById
in interfaceCommentDao
-
getCommentsForEntity
- 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
- 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
-
anonymizeUserComments
Description copied from interface:CommentDao
Anonymizes all comments related to the specified username.This method will remove any user reference from the comments associated with the given username.
- Specified by:
anonymizeUserComments
in interfaceCommentDao
- Parameters:
username
- the username whose comments are to be anonymized
-
scrollCommentsForExport
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
Description copied from interface:CommentDao
Delete Comments related to an entity.- Specified by:
deleteByEntityId
in interfaceCommentDao
-