Class CommentHibernateDao

java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
All Implemented Interfaces:
CommentDao, BambooObjectDao<Comment>, org.springframework.beans.factory.InitializingBean

public class CommentHibernateDao extends BambooHibernateObjectDao<Comment> implements CommentDao
  • Constructor Details

  • Method Details

    • findById

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

      @NotNull public @NotNull List<Comment> getCommentsForEntity(long entityId)
      Specified by:
      getCommentsForEntity in interface CommentDao
    • deleteByEntityId

      public void deleteByEntityId(long entityId)
      Description copied from interface: CommentDao
      Delete Comments related to an entity.
      Specified by:
      deleteByEntityId in interface CommentDao
    • findCommentByUser

      @NotNull public @NotNull List<Comment> findCommentByUser(String userName)
      Specified by:
      findCommentByUser in interface CommentDao
    • getCommentsForBuildResults

      @NotNull public @NotNull List<Comment> getCommentsForBuildResults(@NotNull @NotNull PlanKey planKey)
      Specified by:
      getCommentsForBuildResults in interface CommentDao
    • getCommentsForJobResults

      @NotNull public @NotNull List<Comment> getCommentsForJobResults(@NotNull @NotNull ChainResultsSummary chainResultsSummary)
      Specified by:
      getCommentsForJobResults in interface CommentDao
    • anonymizeUserComments

      public void anonymizeUserComments(@NotNull @NotNull String username)
      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 interface CommentDao
      Parameters:
      username - the username whose comments are to be anonymized
    • 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 interface CommentDao
      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 interface CommentDao