Class MongoScoreId
java.lang.Object
dev.getelements.elements.dao.mongo.model.MongoScoreId
- All Implemented Interfaces:
HexableId
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longBy convention, if the leaderboard is global instead of epochal, we record the leaderboardEpoch as 0L. -
Constructor Summary
ConstructorsConstructorDescriptionMongoScoreId(MongoProfile mongoProfile, MongoLeaderboard mongoLeaderboard) MongoScoreId(MongoProfile mongoProfile, MongoLeaderboard mongoLeaderboard, Long leaderboardEpoch) MongoScoreId(String hexString) MongoScoreId(org.bson.types.ObjectId profileId, org.bson.types.ObjectId leaderboardId) MongoScoreId(org.bson.types.ObjectId profileId, org.bson.types.ObjectId leaderboardId, Long leaderboardEpoch) -
Method Summary
Modifier and TypeMethodDescriptionorg.bson.types.ObjectIdorg.bson.types.ObjectIdbyte[]Converts the object to a Hex string.
-
Field Details
-
ALL_TIME_LEADERBOARD_EPOCH
public static final long ALL_TIME_LEADERBOARD_EPOCHBy convention, if the leaderboard is global instead of epochal, we record the leaderboardEpoch as 0L. This is to maintain consistency across all mongo scores, i.e. all mongo score ids will always be composed of three non-null elements.- See Also:
-
-
Constructor Details
-
MongoScoreId
public MongoScoreId() -
MongoScoreId
-
MongoScoreId
-
MongoScoreId
public MongoScoreId(org.bson.types.ObjectId profileId, org.bson.types.ObjectId leaderboardId) -
MongoScoreId
public MongoScoreId(MongoProfile mongoProfile, MongoLeaderboard mongoLeaderboard, Long leaderboardEpoch) -
MongoScoreId
public MongoScoreId(org.bson.types.ObjectId profileId, org.bson.types.ObjectId leaderboardId, Long leaderboardEpoch)
-
-
Method Details
-
getProfileId
public org.bson.types.ObjectId getProfileId() -
getLeaderboardId
public org.bson.types.ObjectId getLeaderboardId() -
getLeaderboardEpoch
-
toByteArray
public byte[] toByteArray() -
toHexString
Description copied from interface:HexableIdConverts the object to a Hex string.- Specified by:
toHexStringin interfaceHexableId- Returns:
- the hex string representation.
-