Class MongoProgressDao
java.lang.Object
dev.getelements.elements.dao.mongo.mission.MongoProgressDao
- All Implemented Interfaces:
ProgressDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadvanceProgress
(Progress progress, int actionsPerformed) AdvancesProgress
by the specified number of actions.createOrGetExistingProgress
(Progress progress) Creates a progress.void
deleteProgress
(String progressId) Deletes a progress.findProgress
(String identifier) Gets the progress with the id, or throws aNotFoundException
if the progress can't be found.findProgressForProfileAndMission
(Profile profile, String missionNameOrId) generateMissionProgressMetadata
(Progress progress, Step step) dev.morphia.Datastore
com.fasterxml.jackson.databind.ObjectMapper
getProgresses
(int offset, int count, List<String> tags) Gets progresses specifying the offset and the count.getProgresses
(int offset, int count, List<String> tags, String search) Gets progresses specifying the offset and the count, specifying a search filter.getProgresses
(Profile profile, int offset, int count, List<String> tags) Gets progresses specifying the user, offset and the count.getProgresses
(Profile profile, int offset, int count, List<String> tags, String search) Gets progresses specifying the user, offset and the count, specifying a search filter.Gets Progress instances in a tabular fashion.void
setBooleanQueryParser
(BooleanQueryParser booleanQueryParser) void
setDatastore
(dev.morphia.Datastore datastore) void
setMapperRegistry
(MapperRegistry dozerMapperRegistry) void
setMongoConcurrentUtils
(MongoConcurrentUtils mongoConcurrentUtils) void
setMongoDBUtils
(MongoDBUtils mongoDBUtils) void
setMongoMissionDao
(MongoMissionDao mongoMissionDao) void
setMongoProfileDao
(MongoProfileDao mongoProfileDao) void
setObjectMapper
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) void
setRewardIssuanceDao
(MongoRewardIssuanceDao rewardIssuanceDao) void
setValidationHelper
(ValidationHelper validationHelper) updateProgress
(Progress progress) Updates the progress, or throws aNotFoundException
if the progress can't be found.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.ProgressDao
getProgress, getProgressForProfileAndMission
-
Constructor Details
-
MongoProgressDao
public MongoProgressDao()
-
-
Method Details
-
getProgresses
public Pagination<Progress> getProgresses(Profile profile, int offset, int count, List<String> tags) Description copied from interface:ProgressDao
Gets progresses specifying the user, offset and the count.- Specified by:
getProgresses
in interfaceProgressDao
- Parameters:
profile
-Profile
offset
- the offsetcount
- the counttags
-- Returns:
- a
Pagination
ofProgress
objects.
-
getProgresses
public Pagination<Progress> getProgresses(Profile profile, int offset, int count, List<String> tags, String search) Description copied from interface:ProgressDao
Gets progresses specifying the user, offset and the count, specifying a search filter.- Specified by:
getProgresses
in interfaceProgressDao
- Parameters:
profile
-Profile
offset
- the offsetcount
- the counttags
-search
- a query to filter the results- Returns:
- a
Pagination
ofProgress
objects.
-
getProgresses
Description copied from interface:ProgressDao
Gets progresses specifying the offset and the count.- Specified by:
getProgresses
in interfaceProgressDao
- Parameters:
offset
- the offsetcount
- the counttags
- the tags- Returns:
- a
Pagination
ofProgress
objects.
-
getProgresses
Description copied from interface:ProgressDao
Gets progresses specifying the offset and the count, specifying a search filter.- Specified by:
getProgresses
in interfaceProgressDao
- Parameters:
offset
- the offsetcount
- the counttags
- the tagssearch
- a query to filter the results- Returns:
- a
Pagination
ofProgress
objects.
-
getProgressesTabular
Description copied from interface:ProgressDao
Gets Progress instances in a tabular fashion.- Specified by:
getProgressesTabular
in interfaceProgressDao
- Returns:
- a
Tabulation
ofProgressRow
instances
-
findProgress
Description copied from interface:ProgressDao
Gets the progress with the id, or throws aNotFoundException
if the progress can't be found.- Specified by:
findProgress
in interfaceProgressDao
- Returns:
- the
Progress
that was requested, never null
-
findProgressForProfileAndMission
Description copied from interface:ProgressDao
- Specified by:
findProgressForProfileAndMission
in interfaceProgressDao
- Parameters:
profile
- theProfile
linked to the progressmissionNameOrId
- theMission
linked to the progress- Returns:
- the
Progress
instances
-
updateProgress
Description copied from interface:ProgressDao
Updates the progress, or throws aNotFoundException
if the progress can't be found. TheProgress.getId()
is used to key the progress being updated.- Specified by:
updateProgress
in interfaceProgressDao
- Returns:
- the
Progress
as it was written into the database
-
createOrGetExistingProgress
Description copied from interface:ProgressDao
Creates a progress. The value ofProgress.getId()
will be ignored.- Specified by:
createOrGetExistingProgress
in interfaceProgressDao
- Returns:
- the
Progress
as it was written into the database
-
deleteProgress
Description copied from interface:ProgressDao
Deletes a progress.- Specified by:
deleteProgress
in interfaceProgressDao
- Parameters:
progressId
- the progress ID
-
advanceProgress
Description copied from interface:ProgressDao
AdvancesProgress
by the specified number of actions.- Specified by:
advanceProgress
in interfaceProgressDao
- Parameters:
progress
- theProgress
actionsPerformed
- the amount of actions to apply- Returns:
-
generateMissionProgressMetadata
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getMapperRegistry
-
setMapperRegistry
-
getValidationHelper
-
setValidationHelper
-
getMongoDBUtils
-
setMongoDBUtils
-
getMongoConcurrentUtils
-
setMongoConcurrentUtils
-
getMongoMissionDao
-
setMongoMissionDao
-
getMongoProfileDao
-
setMongoProfileDao
-
getRewardIssuanceDao
-
setRewardIssuanceDao
-
getBooleanQueryParser
-
setBooleanQueryParser
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
setObjectMapper
@Inject public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-