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 newProfile
to theMultiMatch
.createMultiMatch
(MultiMatch multiMatch) Creates a newMultiMatch
with no players.findMongoMultiMatch
(String multiMatchId) findMultiMatch
(String multiMatchId) Finds aMultiMatch
by its ID.getAllMultiMatches
(String search) Gets allMultiMatch
instances.dev.morphia.Datastore
getProfiles
(String multiMatchId) Gets allProfile
instances in theMultiMatch
.removeProfile
(String multiMatchId, Profile profile) Removes theProfile
to theMultiMatch
.void
setBooleanQueryParser
(BooleanQueryParser booleanQueryParser) void
setDatastore
(dev.morphia.Datastore datastore) void
setElementRegistry
(ElementRegistry elementRegistry) void
setMapperRegistry
(MapperRegistry mapperRegistry) void
setMongoApplicationConfigurationDao
(MongoApplicationConfigurationDao mongoApplicationConfigurationDao) void
setMongoApplicationDao
(MongoApplicationDao mongoApplicationDao) void
setMongoDBUtils
(MongoDBUtils mongoDBUtils) void
setMongoProfileDao
(MongoProfileDao mongoProfileDao) void
setValidationHelper
(ValidationHelper validationHelper) boolean
tryDeleteMultiMatch
(String multiMatchId) Deletes theMultiMatch
with the given ID, returning true if it was deleted, false if it did not exist.boolean
tryExpireMultiMatch
(String multiMatchId) Expires aMultiMatch
by its ID, setting its status to expired flagging it for removal at a later date.updateMultiMatch
(MultiMatch multiMatch) Creates a newMultiMatch
with no players.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:MultiMatchDao
Gets allMultiMatch
instances.- Specified by:
getAllMultiMatches
in interfaceMultiMatchDao
- Parameters:
search
- the query to execute- Returns:
- a
List
ofMultiMatch
instances
-
findMultiMatch
Description copied from interface:MultiMatchDao
Finds aMultiMatch
by its ID.- Specified by:
findMultiMatch
in 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:MultiMatchDao
Adds a newProfile
to theMultiMatch
.- Specified by:
addProfile
in interfaceMultiMatchDao
- Parameters:
multiMatchId
- the multi-match id receiving the profileprofile
- the profile to add- Returns:
- the updated
MultiMatch
-
removeProfile
Description copied from interface:MultiMatchDao
Removes theProfile
to theMultiMatch
.- Specified by:
removeProfile
in interfaceMultiMatchDao
- Parameters:
multiMatchId
- the multi-match id receiving the profileprofile
- the profile to add- Returns:
- the updated
MultiMatch
-
getProfiles
Description copied from interface:MultiMatchDao
Gets allProfile
instances in theMultiMatch
.- Specified by:
getProfiles
in interfaceMultiMatchDao
- Parameters:
multiMatchId
- tbe multi-match id to get profiles from- Returns:
- the
List
ofProfile
instances in theMultiMatch
-
createMultiMatch
Description copied from interface:MultiMatchDao
Creates a newMultiMatch
with no players.- Specified by:
createMultiMatch
in interfaceMultiMatchDao
- Parameters:
multiMatch
- theMultiMatch
to create- Returns:
- the newly created
MultiMatch
-
updateMultiMatch
Description copied from interface:MultiMatchDao
Creates a newMultiMatch
with no players.- Specified by:
updateMultiMatch
in interfaceMultiMatchDao
- Parameters:
multiMatch
- theMatchmakingApplicationConfiguration
to use- Returns:
- the newly created
MultiMatch
-
tryDeleteMultiMatch
Description copied from interface:MultiMatchDao
Deletes theMultiMatch
with the given ID, returning true if it was deleted, false if it did not exist.- Specified by:
tryDeleteMultiMatch
in interfaceMultiMatchDao
-
tryExpireMultiMatch
Description copied from interface:MultiMatchDao
Expires aMultiMatch
by its ID, setting its status to expired flagging it for removal at a later date.- Specified by:
tryExpireMultiMatch
in 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)
-