Class MongoScoreId

java.lang.Object
dev.getelements.elements.dao.mongo.model.MongoScoreId
All Implemented Interfaces:
HexableId

@Entity public class MongoScoreId extends Object implements HexableId
  • Field Details

    • ALL_TIME_LEADERBOARD_EPOCH

      public static final long ALL_TIME_LEADERBOARD_EPOCH
      By 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

      public MongoScoreId(String hexString)
    • MongoScoreId

      public MongoScoreId(MongoProfile mongoProfile, MongoLeaderboard mongoLeaderboard)
    • 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

      public Long getLeaderboardEpoch()
    • toByteArray

      public byte[] toByteArray()
    • toHexString

      public String toHexString()
      Description copied from interface: HexableId
      Converts the object to a Hex string.
      Specified by:
      toHexString in interface HexableId
      Returns:
      the hex string representation.