Class MongoMultiMatchDao
java.lang.Object
dev.getelements.elements.dao.mongo.match.MongoMultiMatchDao
- All Implemented Interfaces:
MultiMatchDao
-
Field Summary
Fields inherited from interface dev.getelements.elements.sdk.dao.MultiMatchDao
MULTI_MATCH_ADD_PROFILE, MULTI_MATCH_CREATED, MULTI_MATCH_DELETED, MULTI_MATCH_EXPIRED, MULTI_MATCH_REMOVE_PROFILE, MULTI_MATCH_UPDATED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddProfile(String multiMatchId, Profile profile) Adds a newProfileto theMultiMatch.createMultiMatch(MultiMatch multiMatch) Creates a newMultiMatchwith no players.findMongoMultiMatch(String multiMatchId) findMultiMatch(String multiMatchId) Finds aMultiMatchby its ID.getAllMultiMatches(String search) Gets allMultiMatchinstances.dev.morphia.DatastoregetProfiles(String multiMatchId) Gets allProfileinstances in theMultiMatch.removeProfile(String multiMatchId, Profile profile) Removes theProfileto theMultiMatch.voidsetBooleanQueryParser(BooleanQueryParser booleanQueryParser) voidsetDatastore(dev.morphia.Datastore datastore) voidsetElementRegistry(ElementRegistry elementRegistry) voidsetMapperRegistry(MapperRegistry mapperRegistry) voidsetMongoApplicationConfigurationDao(MongoApplicationConfigurationDao mongoApplicationConfigurationDao) voidsetMongoApplicationDao(MongoApplicationDao mongoApplicationDao) voidsetMongoDBUtils(MongoDBUtils mongoDBUtils) voidsetMongoProfileDao(MongoProfileDao mongoProfileDao) voidsetValidationHelper(ValidationHelper validationHelper) booleantryDeleteMultiMatch(String multiMatchId) Deletes theMultiMatchwith the given ID, returning true if it was deleted, false if it did not exist.booleantryExpireMultiMatch(String multiMatchId) Expires aMultiMatchby its ID, setting its status to expired flagging it for removal at a later date.updateMultiMatch(MultiMatch multiMatch) Creates a newMultiMatchwith no players.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.getelements.elements.sdk.dao.MultiMatchDao
deleteMultiMatch, expireMultiMatch, getAllMultiMatches, getMultiMatch
-
Constructor Details
-
MongoMultiMatchDao
public MongoMultiMatchDao()
-
-
Method Details
-
getAllMultiMatches
Description copied from interface:MultiMatchDaoGets allMultiMatchinstances.- Specified by:
getAllMultiMatchesin interfaceMultiMatchDao- Parameters:
search- the query to execute- Returns:
- a
ListofMultiMatchinstances
-
findMultiMatch
Description copied from interface:MultiMatchDaoFinds aMultiMatchby its ID.- Specified by:
findMultiMatchin interfaceMultiMatchDao- Parameters:
multiMatchId- the ID of the multi-match to find.- Returns:
- the found
MultiMatch, or an empty Optional if not found.
-
findMongoMultiMatch
-
addProfile
Description copied from interface:MultiMatchDaoAdds a newProfileto theMultiMatch.- Specified by:
addProfilein interfaceMultiMatchDao- Parameters:
multiMatchId- the multi-match id receiving the profileprofile- the profile to add- Returns:
- the updated
MultiMatch
-
removeProfile
Description copied from interface:MultiMatchDaoRemoves theProfileto theMultiMatch.- Specified by:
removeProfilein interfaceMultiMatchDao- Parameters:
multiMatchId- the multi-match id receiving the profileprofile- the profile to add- Returns:
- the updated
MultiMatch
-
getProfiles
Description copied from interface:MultiMatchDaoGets allProfileinstances in theMultiMatch.- Specified by:
getProfilesin interfaceMultiMatchDao- Parameters:
multiMatchId- tbe multi-match id to get profiles from- Returns:
- the
ListofProfileinstances in theMultiMatch
-
createMultiMatch
Description copied from interface:MultiMatchDaoCreates a newMultiMatchwith no players.- Specified by:
createMultiMatchin interfaceMultiMatchDao- Parameters:
multiMatch- theMultiMatchto create- Returns:
- the newly created
MultiMatch
-
updateMultiMatch
Description copied from interface:MultiMatchDaoCreates a newMultiMatchwith no players.- Specified by:
updateMultiMatchin interfaceMultiMatchDao- Parameters:
multiMatch- theMatchmakingApplicationConfigurationto use- Returns:
- the newly created
MultiMatch
-
tryDeleteMultiMatch
Description copied from interface:MultiMatchDaoDeletes theMultiMatchwith the given ID, returning true if it was deleted, false if it did not exist.- Specified by:
tryDeleteMultiMatchin interfaceMultiMatchDao
-
tryExpireMultiMatch
Description copied from interface:MultiMatchDaoExpires aMultiMatchby its ID, setting its status to expired flagging it for removal at a later date.- Specified by:
tryExpireMultiMatchin interfaceMultiMatchDao- Parameters:
multiMatchId- the ID of theMultiMatch- Returns:
- true if the multi-match was expired, false if it did not exist or was already expired.
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getMongoDBUtils
-
setMongoDBUtils
-
getMapperRegistry
-
setMapperRegistry
-
getBooleanQueryParser
-
setBooleanQueryParser
-
getValidationHelper
-
setValidationHelper
-
getMongoProfileDao
-
setMongoProfileDao
-
getMongoApplicationDao
-
setMongoApplicationDao
-
getMongoApplicationConfigurationDao
-
setMongoApplicationConfigurationDao
@Inject public void setMongoApplicationConfigurationDao(MongoApplicationConfigurationDao mongoApplicationConfigurationDao) -
getElementRegistry
-
setElementRegistry
@Inject public void setElementRegistry(@Named("dev.getelements.elements.sdk.element.registry.root") ElementRegistry elementRegistry)
-