Class DefaultScoreService
- java.lang.Object
-
- org.silverpeas.core.questioncontainer.score.service.DefaultScoreService
-
- All Implemented Interfaces:
ScoreService
@Service @Singleton public class DefaultScoreService extends Object implements ScoreService
Default implementation of Score service
-
-
Constructor Summary
Constructors Constructor Description DefaultScoreService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addScore(ScoreDetail scoreDetail)
void
deleteScore(ScorePK scorePK)
Method: deleteScorevoid
deleteScoreByFatherPK(ScorePK scorePK, String fatherId)
Methode: deleteScoreByFatherPKCollection<ScoreDetail>
getAllScores(ScorePK scorePK)
Method: getAllScoresfloat
getAverageScoreByFatherId(ScorePK scorePK, String fatherId)
Method: getAverageScoreByFatherIdCollection<ScoreDetail>
getBestScoresByFatherId(ScorePK scorePK, int nbBestScores, String fatherId)
Method: getBestScoresByFatherIdint
getNbVotersByFatherId(ScorePK scorePK, String fatherId)
Method: getNbVotersByFatherIdCollection<ScoreDetail>
getScoresByFatherId(ScorePK scorePK, String fatherId)
Method: getScoresByFatherIdint
getUserNbParticipationsByFatherId(ScorePK scorePK, String fatherId, String userId)
ScoreDetail
getUserScoreByFatherIdAndParticipationId(ScorePK scorePK, String fatherId, String userId, int participationId)
Method: getUserScoresByFatherIdAndParticipationIdCollection<ScoreDetail>
getUserScores(ScorePK scorePK, String userId)
Method: getUserScoresCollection<ScoreDetail>
getUserScoresByFatherId(ScorePK scorePK, String fatherId, String userId)
Method: getUserScoresByFatherIdCollection<ScoreDetail>
getWorstScoresByFatherId(ScorePK scorePK, int nbWorstScores, String fatherId)
Method: getWorstScoresByFatherIdvoid
updateScore(ScoreDetail scoreDetail)
-
-
-
Method Detail
-
getUserNbParticipationsByFatherId
public int getUserNbParticipationsByFatherId(ScorePK scorePK, String fatherId, String userId)
- Specified by:
getUserNbParticipationsByFatherId
in interfaceScoreService
- Parameters:
scorePK
- the score identifierfatherId
- the father identifieruserId
- the user identifier- Returns:
- See Also:
ScoreService.getUserNbParticipationsByFatherId(org.silverpeas.core.questioncontainer.score.model.ScorePK, java.lang.String, java.lang.String)
-
addScore
public void addScore(ScoreDetail scoreDetail)
- Specified by:
addScore
in interfaceScoreService
- Parameters:
scoreDetail
- the scrore detail to add- See Also:
ScoreService.addScore(org.silverpeas.core.questioncontainer.score.model.ScoreDetail)
-
updateScore
public void updateScore(ScoreDetail scoreDetail)
- Specified by:
updateScore
in interfaceScoreService
- Parameters:
scoreDetail
- the score detail to update- See Also:
ScoreService.updateScore(org.silverpeas.core.questioncontainer.score.model.ScoreDetail)
-
deleteScore
public void deleteScore(ScorePK scorePK)
Description copied from interface:ScoreService
Method: deleteScore- Specified by:
deleteScore
in interfaceScoreService
- Parameters:
scorePK
- the score identifier- See Also:
ScoreService.deleteScore(org.silverpeas.core.questioncontainer.score.model.ScorePK)
-
deleteScoreByFatherPK
public void deleteScoreByFatherPK(ScorePK scorePK, String fatherId)
Description copied from interface:ScoreService
Methode: deleteScoreByFatherPK- Specified by:
deleteScoreByFatherPK
in interfaceScoreService
- Parameters:
scorePK
- the score identifierfatherId
- the father identifier- See Also:
ScoreService.deleteScoreByFatherPK(org.silverpeas.core.questioncontainer.score.model.ScorePK, java.lang.String)
-
getAllScores
public Collection<ScoreDetail> getAllScores(ScorePK scorePK)
Description copied from interface:ScoreService
Method: getAllScores- Specified by:
getAllScores
in interfaceScoreService
- Parameters:
scorePK
- the score identifier- Returns:
- See Also:
ScoreService.getAllScores(org.silverpeas.core.questioncontainer.score.model.ScorePK)
-
getUserScores
public Collection<ScoreDetail> getUserScores(ScorePK scorePK, String userId)
Description copied from interface:ScoreService
Method: getUserScores- Specified by:
getUserScores
in interfaceScoreService
- Parameters:
scorePK
- the score identifieruserId
- the user identifier- Returns:
- See Also:
ScoreService.getUserScores(org.silverpeas.core.questioncontainer.score.model.ScorePK, java.lang.String)
-
getUserScoresByFatherId
public Collection<ScoreDetail> getUserScoresByFatherId(ScorePK scorePK, String fatherId, String userId)
Description copied from interface:ScoreService
Method: getUserScoresByFatherId- Specified by:
getUserScoresByFatherId
in interfaceScoreService
- Parameters:
scorePK
- the score identifierfatherId
- the father identifieruserId
- the user identifier- Returns:
- See Also:
ScoreService.getUserScoresByFatherId(org.silverpeas.core.questioncontainer.score.model.ScorePK, java.lang.String, java.lang.String)
-
getBestScoresByFatherId
public Collection<ScoreDetail> getBestScoresByFatherId(ScorePK scorePK, int nbBestScores, String fatherId)
Description copied from interface:ScoreService
Method: getBestScoresByFatherId- Specified by:
getBestScoresByFatherId
in interfaceScoreService
- Parameters:
scorePK
- the score identifierfatherId
- the father identifier- Returns:
- See Also:
ScoreService.getBestScoresByFatherId(org.silverpeas.core.questioncontainer.score.model.ScorePK, int, java.lang.String)
-
getWorstScoresByFatherId
public Collection<ScoreDetail> getWorstScoresByFatherId(ScorePK scorePK, int nbWorstScores, String fatherId)
Description copied from interface:ScoreService
Method: getWorstScoresByFatherId- Specified by:
getWorstScoresByFatherId
in interfaceScoreService
- Parameters:
scorePK
- the score identifierfatherId
- the father identifier- Returns:
- See Also:
ScoreService.getWorstScoresByFatherId(org.silverpeas.core.questioncontainer.score.model.ScorePK, int, java.lang.String)
-
getNbVotersByFatherId
public int getNbVotersByFatherId(ScorePK scorePK, String fatherId)
Description copied from interface:ScoreService
Method: getNbVotersByFatherId- Specified by:
getNbVotersByFatherId
in interfaceScoreService
- Parameters:
scorePK
- the score identifierfatherId
- the father identifier- Returns:
- See Also:
ScoreService.getNbVotersByFatherId(org.silverpeas.core.questioncontainer.score.model.ScorePK, java.lang.String)
-
getAverageScoreByFatherId
public float getAverageScoreByFatherId(ScorePK scorePK, String fatherId)
Description copied from interface:ScoreService
Method: getAverageScoreByFatherId- Specified by:
getAverageScoreByFatherId
in interfaceScoreService
- Parameters:
scorePK
- the score identifierfatherId
- the father identifier- Returns:
- See Also:
ScoreService.getAverageScoreByFatherId(org.silverpeas.core.questioncontainer.score.model.ScorePK, java.lang.String)
-
getUserScoreByFatherIdAndParticipationId
public ScoreDetail getUserScoreByFatherIdAndParticipationId(ScorePK scorePK, String fatherId, String userId, int participationId)
Description copied from interface:ScoreService
Method: getUserScoresByFatherIdAndParticipationId- Specified by:
getUserScoreByFatherIdAndParticipationId
in interfaceScoreService
- Parameters:
scorePK
- the score identifierfatherId
- the father identifieruserId
- the user identifier- Returns:
- See Also:
ScoreService.getUserScoreByFatherIdAndParticipationId(org.silverpeas.core.questioncontainer.score.model.ScorePK, java.lang.String, java.lang.String, int)
-
getScoresByFatherId
public Collection<ScoreDetail> getScoresByFatherId(ScorePK scorePK, String fatherId)
Description copied from interface:ScoreService
Method: getScoresByFatherId- Specified by:
getScoresByFatherId
in interfaceScoreService
- Parameters:
scorePK
- the score identifierfatherId
- the father identifier- Returns:
- See Also:
ScoreService.getScoresByFatherId(org.silverpeas.core.questioncontainer.score.model.ScorePK, java.lang.String)
-
-