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.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 TypeMethodDescriptionvoidanonymizeUserComments(@NotNull String username) Anonymizes all comments related to the specified username.voiddeleteByEntityId(long entityId) Delete Comments related to an entity.intdeleteByEntityId(@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) longscrollCommentsForExport(@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, findAll, findById, merge, save, saveAllMethods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
-
Constructor Details
-
CommentHibernateDao
-
-
Method Details
-
findById
- Specified by:
findByIdin interfaceCommentDao
-
getCommentsForEntity
- Specified by:
getCommentsForEntityin interfaceCommentDao
-
deleteByEntityId
public void deleteByEntityId(long entityId) Description copied from interface:CommentDaoDelete Comments related to an entity.- Specified by:
deleteByEntityIdin interfaceCommentDao
-
findCommentByUser
- Specified by:
findCommentByUserin interfaceCommentDao
-
getCommentsForBuildResults
@NotNull public @NotNull List<Comment> getCommentsForBuildResults(@NotNull @NotNull PlanKey planKey) - Specified by:
getCommentsForBuildResultsin interfaceCommentDao
-
getCommentsForJobResults
@NotNull public @NotNull List<Comment> getCommentsForJobResults(@NotNull @NotNull ChainResultsSummary chainResultsSummary) - Specified by:
getCommentsForJobResultsin interfaceCommentDao
-
anonymizeUserComments
Description copied from interface:CommentDaoAnonymizes all comments related to the specified username.This method will remove any user reference from the comments associated with the given username.
- Specified by:
anonymizeUserCommentsin interfaceCommentDao- Parameters:
username- the username whose comments are to be anonymized
-
scrollCommentsForExport
Description copied from interface:CommentDaoScroll 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:
scrollCommentsForExportin interfaceCommentDao- Parameters:
consumer- consumer that will accept each of the Comments- Returns:
- number of traversed rows
-
deleteByEntityId
Description copied from interface:CommentDaoDelete Comments related to an entity.- Specified by:
deleteByEntityIdin interfaceCommentDao- Parameters:
deletionAdapter-
-