Class UserScoreService
java.lang.Object
dev.getelements.elements.service.leaderboard.UserScoreService
- All Implemented Interfaces:
ScoreService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdateScore
(String leaderboardNameOrId, Score score) Creates, or updates, a newScore
.void
setCurrentProfileSupplier
(Supplier<Profile> currentProfileSupplier) void
setScoreDao
(ScoreDao scoreDao)
-
Constructor Details
-
UserScoreService
public UserScoreService()
-
-
Method Details
-
createOrUpdateScore
Description copied from interface:ScoreService
Creates, or updates, a newScore
. If the profile submitted with the theScore
matches an existingLeaderboard
andProfile
, then the existing record will be updated.- Specified by:
createOrUpdateScore
in interfaceScoreService
- Parameters:
leaderboardNameOrId
- the value ofLeaderboard.getId()
orLeaderboard.getName()
score
- theScore
- Returns:
- the
Score
as it was written to the database
-
getScoreDao
-
setScoreDao
-
getCurrentProfileSupplier
-
setCurrentProfileSupplier
-