Class MongoLeaderboardDao
java.lang.Object
dev.getelements.elements.dao.mongo.MongoLeaderboardDao
- All Implemented Interfaces:
LeaderboardDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateLeaderboard(Leaderboard leaderboard) Creates aLeaderboardand returns the instance as it was written to the database.voiddeleteLeaderboard(String leaderboardNameOrId) Deletes theLeaderboardwith the name or identifier.dev.morphia.DatastoregetLeaderboard(String nameOrId) Gets a singleLeaderboardusing the specified identifier or name.getLeaderboards(int offset, int count) Lists all leaderboards, specifying offset and count.getLeaderboards(int offset, int count, String search) Lists all leaderboards, specifying offset and count, as well as a search query.getMongoLeaderboard(String nameOrId) voidsetBeanMapper(MapperRegistry beanMapperRegistry) voidsetDatastore(dev.morphia.Datastore datastore) voidsetMongoDBUtils(MongoDBUtils mongoDBUtils) voidsetValidationHelper(ValidationHelper validationHelper) updateLeaderboard(String leaderboardNameOrId, Leaderboard leaderboard) Updates an existingLeaderboardinstance.
-
Constructor Details
-
MongoLeaderboardDao
public MongoLeaderboardDao()
-
-
Method Details
-
createLeaderboard
Description copied from interface:LeaderboardDaoCreates aLeaderboardand returns the instance as it was written to the database.- Specified by:
createLeaderboardin interfaceLeaderboardDao- Parameters:
leaderboard- theLeaderboard- Returns:
- the
Leaderboard
-
getLeaderboards
Description copied from interface:LeaderboardDaoLists all leaderboards, specifying offset and count.- Specified by:
getLeaderboardsin interfaceLeaderboardDao- Parameters:
offset- the offset in the datasetcount- the number or results to return- Returns:
- the
Pagination<Leaderboard>
-
getLeaderboards
Description copied from interface:LeaderboardDaoLists all leaderboards, specifying offset and count, as well as a search query.- Specified by:
getLeaderboardsin interfaceLeaderboardDao- Parameters:
offset- the offset in the datasetcount- the number or results to return- Returns:
- the
Pagination<Leaderboard>
-
getLeaderboard
Description copied from interface:LeaderboardDaoGets a singleLeaderboardusing the specified identifier or name. Throws anLeaderboardNotFoundExceptionif not found.- Specified by:
getLeaderboardin interfaceLeaderboardDao- Parameters:
nameOrId- the name or identifierLeaderboard.getId(),Leaderboard.getName()- Returns:
- the
Leaderboardinstance, never null
-
getMongoLeaderboard
-
updateLeaderboard
Description copied from interface:LeaderboardDaoUpdates an existingLeaderboardinstance. Throwing an instance ofLeaderboardNotFoundExceptionif theLeaderboarddoes not exist.- Specified by:
updateLeaderboardin interfaceLeaderboardDao- Parameters:
leaderboardNameOrId- the name or identifierLeaderboard.getId(),Leaderboard.getName()leaderboard- theLeaderboard- Returns:
- the
Leaderboard
-
deleteLeaderboard
Description copied from interface:LeaderboardDaoDeletes theLeaderboardwith the name or identifier.- Specified by:
deleteLeaderboardin interfaceLeaderboardDao- Parameters:
leaderboardNameOrId- the name or identifierLeaderboard.getId(),Leaderboard.getName()
-
getValidationHelper
-
setValidationHelper
-
getMongoDBUtils
-
setMongoDBUtils
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getBeanMapper
-
setBeanMapper
-