Interface RankDao

All Known Implementing Classes:
RankDaoImpl

@Transactional public interface RankDao
Responsible for persisting and loading issue rank data from/to persistent storage
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    insert(Long customFieldId, Long issueId, Long newNext, Long newPrevious)
    Insert a new rank.
    void
    loadAll(Long customFieldId, com.atlassian.jira.util.Consumer<IssueRankingAO> consumer)
    Loads all data for a given field into the provided consumer
    void
    move(Long customFieldId, Long issueId, Long oldNext, Long oldPrevious, Long newNext, Long newPrevious)
    Move a rank to a new position.
    void
    remove(Long customFieldId, Long issueId, Long oldNext, Long oldPrevious)
    Remove a rank.
  • Method Details

    • loadAll

      void loadAll(Long customFieldId, com.atlassian.jira.util.Consumer<IssueRankingAO> consumer)
      Loads all data for a given field into the provided consumer
      Parameters:
      customFieldId - the ID of the rank custom field
    • insert

      void insert(Long customFieldId, Long issueId, Long newNext, Long newPrevious)
      Insert a new rank. This involves two operations: wire the new previous and the issue => issue becomes child of new previous wire the new next and the issue => new next (former child of new previous) becomes child of issue
      Parameters:
      customFieldId - the ID of the rank custom field
      issueId - : the issueId of the issue to insert
      newNext - : the next issue from the new position, after the move. Can be null if moved to the last position.
      newPrevious - : the previous issue from the new position, after the move. Can be null if moved to the first position.
    • move

      void move(Long customFieldId, Long issueId, Long oldNext, Long oldPrevious, Long newNext, Long newPrevious)
      Move a rank to a new position. This involves three operations: wire the old previous and next issues to fill the gap => old next becomes child of old previous wire the new previous and the issue => issue becomes child of new previous wire the new next and the issue => new next (former child of new previous) becomes child of issue
      Parameters:
      customFieldId - the ID of the rank custom field
      issueId - : the issueId of the issue to move
      oldNext - : the next issue from the former position, before the move. Can be null in case the last issue is moved.
      oldPrevious - : the previous issue from the former position, before the move. Can be null in case the first issue is moved.
      newNext - : the next issue from the new position, after the move. Can be null if moved to the last position.
      newPrevious - : the previous issue from the new position, after the move. Can be null if moved to the first position.
    • remove

      void remove(Long customFieldId, Long issueId, Long oldNext, Long oldPrevious)
      Remove a rank. This involves two operations: remove the issue wire the old previous and next issues to fill the gap => old next becomes child of old previous
      Parameters:
      customFieldId - the ID of the rank custom field
      issueId - : the issueId of the issue to remove
      oldNext - : the next issue from the former position, before the removal. Can be null in case the last issue is removed.
      oldPrevious - : the previous issue from the former position, before the removal. Can be null in case the first issue is removed.