Interface ScoreService

  • All Known Implementing Classes:
    DefaultScoreService

    public interface ScoreService
    Score service interface which allow to manage a score
    • Method Detail

      • addScore

        void addScore​(ScoreDetail scoreDetail)
        Parameters:
        scoreDetail - the scrore detail to add
      • deleteScore

        void deleteScore​(ScorePK scorePK)
        Method: deleteScore
        Parameters:
        scorePK - the score identifier
      • deleteScoreByFatherPK

        void deleteScoreByFatherPK​(ScorePK scorePK,
                                   String fatherId)
        Methode: deleteScoreByFatherPK
        Parameters:
        scorePK - the score identifier
        fatherId - the father identifier
      • getAllScores

        Collection<ScoreDetail> getAllScores​(ScorePK scorePK)
        Method: getAllScores
        Parameters:
        scorePK - the score identifier
        Returns:
      • getUserScores

        Collection<ScoreDetail> getUserScores​(ScorePK scorePK,
                                              String userId)
        Method: getUserScores
        Parameters:
        scorePK - the score identifier
        userId - the user identifier
        Returns:
      • getUserScoresByFatherId

        Collection<ScoreDetail> getUserScoresByFatherId​(ScorePK scorePK,
                                                        String fatherId,
                                                        String userId)
        Method: getUserScoresByFatherId
        Parameters:
        scorePK - the score identifier
        fatherId - the father identifier
        userId - the user identifier
        Returns:
      • getBestScoresByFatherId

        Collection<ScoreDetail> getBestScoresByFatherId​(ScorePK scorePK,
                                                        int nbBestScores,
                                                        String fatherId)
        Method: getBestScoresByFatherId
        Parameters:
        scorePK - the score identifier
        nbBestScores -
        fatherId - the father identifier
        Returns:
      • getWorstScoresByFatherId

        Collection<ScoreDetail> getWorstScoresByFatherId​(ScorePK scorePK,
                                                         int nbWorstScores,
                                                         String fatherId)
        Method: getWorstScoresByFatherId
        Parameters:
        scorePK - the score identifier
        nbWorstScores -
        fatherId - the father identifier
        Returns:
      • getNbVotersByFatherId

        int getNbVotersByFatherId​(ScorePK scorePK,
                                  String fatherId)
        Method: getNbVotersByFatherId
        Parameters:
        scorePK - the score identifier
        fatherId - the father identifier
        Returns:
      • getAverageScoreByFatherId

        float getAverageScoreByFatherId​(ScorePK scorePK,
                                        String fatherId)
        Method: getAverageScoreByFatherId
        Parameters:
        scorePK - the score identifier
        fatherId - the father identifier
        Returns:
      • getUserScoreByFatherIdAndParticipationId

        ScoreDetail getUserScoreByFatherIdAndParticipationId​(ScorePK scorePK,
                                                             String fatherId,
                                                             String userId,
                                                             int participationId)
        Method: getUserScoresByFatherIdAndParticipationId
        Parameters:
        scorePK - the score identifier
        fatherId - the father identifier
        userId - the user identifier
        participationId -
        Returns:
      • getScoresByFatherId

        Collection<ScoreDetail> getScoresByFatherId​(ScorePK scorePK,
                                                    String fatherId)
        Method: getScoresByFatherId
        Parameters:
        scorePK - the score identifier
        fatherId - the father identifier
        Returns:
      • getUserNbParticipationsByFatherId

        int getUserNbParticipationsByFatherId​(ScorePK scorePK,
                                              String fatherId,
                                              String userId)
        Parameters:
        scorePK - the score identifier
        fatherId - the father identifier
        userId - the user identifier
        Returns:
      • updateScore

        void updateScore​(ScoreDetail scoreDetail)
        Parameters:
        scoreDetail - the score detail to update