Class MongoRankDao
java.lang.Object
dev.getelements.elements.dao.mongo.MongoRankDao
- All Implemented Interfaces:
RankDao
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondev.morphia.aggregation.Aggregation
<?> aggregateScoresForMutualFollowers
(MongoProfile mongoProfile, MongoLeaderboard mongoLeaderboard, long leaderboardEpoch) dev.morphia.Datastore
getRanks
(String leaderboardNameOrId, int offset, int count, long leaderboardEpoch, Function<dev.morphia.query.Query<MongoScore>, dev.morphia.query.Query<MongoScore>> queryTransformer) getRanksForFriends
(String leaderboardNameOrId, String profileId, int offset, int count, long leaderboardEpoch) Given theLeaderboard
name or ID, this will return allRank
instances sorted in order.getRanksForFriendsRelative
(String leaderboardNameOrId, String profileId, int offset, int count, long leaderboardEpoch) Given theLeaderboard
name or ID, this will return allRank
instances sorted in order.getRanksForGlobal
(String leaderboardNameOrId, int offset, int count, long leaderboardEpoch) Given theLeaderboard
name or ID, this will return allRank
instances sorted in order.getRanksForGlobalRelative
(String leaderboardNameOrId, String profileId, int offset, int count, long leaderboardEpoch) Given theLeaderboard
name or ID, this will return allRank
instances sorted in order.getRanksForGlobalTabular
(String leaderboardNameOrId, long leaderboardEpoch) Gets the ranks for a leaderboard as a tabulation.getRanksForMutualFollowers
(String leaderboardNameOrId, String profileId, int offset, int count, long leaderboardEpoch) Given theLeaderboard
name or ID, this will return allRank
instances sorted in order.getRanksForMutualFollowersRelative
(String leaderboardNameOrId, String profileId, int offset, int count, long leaderboardEpoch) Given theLeaderboard
name or ID, this will return allRank
instances sorted in order.getRanksRelative
(String leaderboardNameOrId, MongoProfile mongoProfile, int offset, int count, long leaderboardEpoch, Function<dev.morphia.query.Query<MongoScore>, dev.morphia.query.Query<MongoScore>> queryTransformer, Function<dev.morphia.query.Query<MongoScore>, dev.morphia.query.Query<MongoScore>> countQueryTransformer) void
setDatastore
(dev.morphia.Datastore datastore) void
setDozerMapper
(MapperRegistry dozerMapperRegistry) void
setMongoDBUtils
(MongoDBUtils mongoDBUtils) void
setMongoFollowerDao
(MongoFollowerDao mongoFollowerDao) void
setMongoFriendDao
(MongoFriendDao mongoFriendDao) void
setMongoLeaderboardDao
(MongoLeaderboardDao mongoLeaderboardDao) void
setMongoProfileDao
(MongoProfileDao mongoProfileDao)
-
Constructor Details
-
MongoRankDao
public MongoRankDao()
-
-
Method Details
-
getRanksForGlobal
public Pagination<Rank> getRanksForGlobal(String leaderboardNameOrId, int offset, int count, long leaderboardEpoch) Description copied from interface:RankDao
Given theLeaderboard
name or ID, this will return allRank
instances sorted in order.- Specified by:
getRanksForGlobal
in interfaceRankDao
- Parameters:
leaderboardNameOrId
- the value ofLeaderboard.getId()
orLeaderboard.getName()
offset
- the offset in the datasetcount
- the number of results to returnleaderboardEpoch
- the epoch timestamp- Returns:
- a
Pagination<Rank>
containing all ranks
-
getRanksForGlobalRelative
public Pagination<Rank> getRanksForGlobalRelative(String leaderboardNameOrId, String profileId, int offset, int count, long leaderboardEpoch) Description copied from interface:RankDao
Given theLeaderboard
name or ID, this will return allRank
instances sorted in order. This allows the the result set to be skipped forward to make the suppliedProfile
appear in= the result set.- Specified by:
getRanksForGlobalRelative
in interfaceRankDao
- Parameters:
leaderboardNameOrId
- the value ofLeaderboard.getId()
orLeaderboard.getName()
profileId
- the value ofProfile.getId()
count
- the number of results to returnleaderboardEpoch
- the epoch timestamp- Returns:
- a
Pagination<Rank>
containing all ranks
-
getRanksForFriends
public Pagination<Rank> getRanksForFriends(String leaderboardNameOrId, String profileId, int offset, int count, long leaderboardEpoch) Description copied from interface:RankDao
Given theLeaderboard
name or ID, this will return allRank
instances sorted in order. This allows the the result set to be skipped forward to make the suppliedProfile
appear int the result set.- Specified by:
getRanksForFriends
in interfaceRankDao
- Parameters:
leaderboardNameOrId
- the value ofLeaderboard.getId()
orLeaderboard.getName()
profileId
- the value ofProfile.getId()
offset
- the offset in the dataset, may be negativecount
- the number of results to returnleaderboardEpoch
- the epoch timestamp- Returns:
- a
Pagination<Rank>
containing all ranks
-
getRanksForFriendsRelative
public Pagination<Rank> getRanksForFriendsRelative(String leaderboardNameOrId, String profileId, int offset, int count, long leaderboardEpoch) Description copied from interface:RankDao
Given theLeaderboard
name or ID, this will return allRank
instances sorted in order. This allows the the result set to be skipped forward to make the suppliedProfile
appear int the result set.Additionally this will filter the results to only include friends of the supplied
Profile
.- Specified by:
getRanksForFriendsRelative
in interfaceRankDao
- Parameters:
leaderboardNameOrId
- the value ofLeaderboard.getId()
orLeaderboard.getName()
profileId
- the value ofProfile.getId()
offset
- the offset in the dataset, may be negativecount
- the number of results to return @return aPagination<Rank>
containing all ranksleaderboardEpoch
- the epoch timestamp
-
getRanksForMutualFollowers
public Pagination<Rank> getRanksForMutualFollowers(String leaderboardNameOrId, String profileId, int offset, int count, long leaderboardEpoch) Description copied from interface:RankDao
Given theLeaderboard
name or ID, this will return allRank
instances sorted in order. This allows the the result set to be skipped forward to make the suppliedProfile
appear int the result set.- Specified by:
getRanksForMutualFollowers
in interfaceRankDao
- Parameters:
leaderboardNameOrId
- the value ofLeaderboard.getId()
orLeaderboard.getName()
profileId
- the value ofProfile.getId()
offset
- the offset in the dataset, may be negativecount
- the number of results to returnleaderboardEpoch
- the epoch timestamp- Returns:
- a
Pagination<Rank>
containing all ranks
-
getRanksForMutualFollowersRelative
public Pagination<Rank> getRanksForMutualFollowersRelative(String leaderboardNameOrId, String profileId, int offset, int count, long leaderboardEpoch) Description copied from interface:RankDao
Given theLeaderboard
name or ID, this will return allRank
instances sorted in order. This allows the the result set to be skipped forward to make the suppliedProfile
appear int the result set.Additionally this will filter the results to only include friends of the supplied
Profile
.- Specified by:
getRanksForMutualFollowersRelative
in interfaceRankDao
- Parameters:
leaderboardNameOrId
- the value ofLeaderboard.getId()
orLeaderboard.getName()
profileId
- the value ofProfile.getId()
offset
- the offset in the dataset, may be negativecount
- the number of results to return @return aPagination<Rank>
containing all ranksleaderboardEpoch
- the epoch timestamp
-
getRanksForGlobalTabular
public Tabulation<RankRow> getRanksForGlobalTabular(String leaderboardNameOrId, long leaderboardEpoch) Description copied from interface:RankDao
Gets the ranks for a leaderboard as a tabulation.- Specified by:
getRanksForGlobalTabular
in interfaceRankDao
- Parameters:
leaderboardNameOrId
- the value ofLeaderboard.getId()
orLeaderboard.getName()
leaderboardEpoch
- the epoch timestamp- Returns:
- the tabular
-
aggregateScoresForMutualFollowers
public dev.morphia.aggregation.Aggregation<?> aggregateScoresForMutualFollowers(MongoProfile mongoProfile, MongoLeaderboard mongoLeaderboard, long leaderboardEpoch) -
getRanks
public Pagination<Rank> getRanks(String leaderboardNameOrId, int offset, int count, long leaderboardEpoch, Function<dev.morphia.query.Query<MongoScore>, dev.morphia.query.Query<MongoScore>> queryTransformer) -
getRanksRelative
public Pagination<Rank> getRanksRelative(String leaderboardNameOrId, MongoProfile mongoProfile, int offset, int count, long leaderboardEpoch, Function<dev.morphia.query.Query<MongoScore>, dev.morphia.query.Query<MongoScore>> queryTransformer, Function<dev.morphia.query.Query<MongoScore>, dev.morphia.query.Query<MongoScore>> countQueryTransformer) -
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getMongoProfileDao
-
setMongoProfileDao
-
getMongoLeaderboardDao
-
setMongoLeaderboardDao
-
getMongoDBUtils
-
setMongoDBUtils
-
getDozerMapper
-
setDozerMapper
-
getMongoFriendDao
-
setMongoFriendDao
-
getMongoFollowerDao
-
setMongoFollowerDao
-