Interface ConnectionDao

  • All Known Implementing Classes:
    HibernateConnectionDao

    @Transactional(readOnly=true)
    public interface ConnectionDao
    DAO for connections between followers and followees.
    • Method Detail

      • isUserFollowing

        boolean isUserFollowing​(com.atlassian.user.User follower,
                                com.atlassian.user.User followee)
        True if the follower is following the followee
        Parameters:
        follower - the proposed follower
        followee - the proposed followee
        Returns:
        true if the follower is following the followee
      • followUser

        @Transactional
        void followUser​(com.atlassian.user.User follower,
                        com.atlassian.user.User followee)
        Sets the follower to follow the specified user. If the follow is alreading following the followee then this method does nothing.
        Parameters:
        follower - the follower
        followee - the new followee
      • unfollowUser

        @Transactional
        void unfollowUser​(com.atlassian.user.User follower,
                          com.atlassian.user.User followee)
        Unsets the follower from following the specified user. If the follow is not following the followee then this method does nothing.
        Parameters:
        follower - the follower
        followee - the new followee
      • removeAllConnectionsFor

        @Transactional
        void removeAllConnectionsFor​(com.atlassian.user.User user)
        Removes all connections for this user (as a follower and as a followee).
        Parameters:
        user - the user