Interface ProjectSubscriptionRepository

    • Method Detail

      • findAllProjectSubscriptionsByUser

        @Query("from ProjectSubscription ps where ps.user = ?1")
        org.springframework.data.domain.Page<ProjectSubscription> findAllProjectSubscriptionsByUser​(User user,
                                                                                                    org.springframework.data.domain.Pageable page)
        Find all the ProjectSubscription for the given user.
        Parameters:
        user - the user associated with project subscriptions
        page - the page request
        Returns:
        a page of ProjectSubscription.
      • findProjectSubscriptionByUserAndProject

        @Query("from ProjectSubscription ps where ps.user = ?1 and ps.project = ?2")
        ProjectSubscription findProjectSubscriptionByUserAndProject​(User user,
                                                                    Project project)
        Find the ProjectSubscription for the given user and project.
        Parameters:
        user - the the user associated with the project subscription
        project - the project associated with the project subscription
        Returns:
        a ProjectSubscription.
      • getUsersWithSubscriptions

        @Query("Select distinct ps.user from ProjectSubscription ps where ps.emailSubscription = true")
        java.util.List<User> getUsersWithSubscriptions()
        Get a list of all Users who are subscribed to any Project.
        Returns:
        A List of User
      • getProjectsForUserWithSubscriptions

        @Query("Select ps.project from ProjectSubscription ps where ps.user = ?1 and ps.emailSubscription = true")
        java.util.List<Project> getProjectsForUserWithSubscriptions​(User user)
        Get a List of all Projects that a given User is subscribed to.
        Parameters:
        user - the user to show project subscriptions for
        Returns:
        A List of Projects