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) AdvancesProgressby the specified number of actions.createOrGetExistingProgress(Progress progress) Creates a progress.voiddeleteProgress(String progressId) Deletes a progress.findProgress(String identifier) Gets the progress with the id, or throws aNotFoundExceptionif the progress can't be found.findProgressForProfileAndMission(Profile profile, String missionNameOrId) generateMissionProgressMetadata(Progress progress, Step step) dev.morphia.Datastorecom.fasterxml.jackson.databind.ObjectMappergetProgresses(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.voidsetBooleanQueryParser(BooleanQueryParser booleanQueryParser) voidsetDatastore(dev.morphia.Datastore datastore) voidsetMapperRegistry(MapperRegistry dozerMapperRegistry) voidsetMongoConcurrentUtils(MongoConcurrentUtils mongoConcurrentUtils) voidsetMongoDBUtils(MongoDBUtils mongoDBUtils) voidsetMongoMissionDao(MongoMissionDao mongoMissionDao) voidsetMongoProfileDao(MongoProfileDao mongoProfileDao) voidsetObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) voidsetRewardIssuanceDao(MongoRewardIssuanceDao rewardIssuanceDao) voidsetValidationHelper(ValidationHelper validationHelper) updateProgress(Progress progress) Updates the progress, or throws aNotFoundExceptionif the progress can't be found.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.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:ProgressDaoGets progresses specifying the user, offset and the count.- Specified by:
getProgressesin interfaceProgressDao- Parameters:
profile-Profileoffset- the offsetcount- the counttags-- Returns:
- a
PaginationofProgressobjects.
-
getProgresses
public Pagination<Progress> getProgresses(Profile profile, int offset, int count, List<String> tags, String search) Description copied from interface:ProgressDaoGets progresses specifying the user, offset and the count, specifying a search filter.- Specified by:
getProgressesin interfaceProgressDao- Parameters:
profile-Profileoffset- the offsetcount- the counttags-search- a query to filter the results- Returns:
- a
PaginationofProgressobjects.
-
getProgresses
Description copied from interface:ProgressDaoGets progresses specifying the offset and the count.- Specified by:
getProgressesin interfaceProgressDao- Parameters:
offset- the offsetcount- the counttags- the tags- Returns:
- a
PaginationofProgressobjects.
-
getProgresses
Description copied from interface:ProgressDaoGets progresses specifying the offset and the count, specifying a search filter.- Specified by:
getProgressesin interfaceProgressDao- Parameters:
offset- the offsetcount- the counttags- the tagssearch- a query to filter the results- Returns:
- a
PaginationofProgressobjects.
-
getProgressesTabular
Description copied from interface:ProgressDaoGets Progress instances in a tabular fashion.- Specified by:
getProgressesTabularin interfaceProgressDao- Returns:
- a
TabulationofProgressRowinstances
-
findProgress
Description copied from interface:ProgressDaoGets the progress with the id, or throws aNotFoundExceptionif the progress can't be found.- Specified by:
findProgressin interfaceProgressDao- Returns:
- the
Progressthat was requested, never null
-
findProgressForProfileAndMission
Description copied from interface:ProgressDao- Specified by:
findProgressForProfileAndMissionin interfaceProgressDao- Parameters:
profile- theProfilelinked to the progressmissionNameOrId- theMissionlinked to the progress- Returns:
- the
Progressinstances
-
updateProgress
Description copied from interface:ProgressDaoUpdates the progress, or throws aNotFoundExceptionif the progress can't be found. TheProgress.getId()is used to key the progress being updated.- Specified by:
updateProgressin interfaceProgressDao- Returns:
- the
Progressas it was written into the database
-
createOrGetExistingProgress
Description copied from interface:ProgressDaoCreates a progress. The value ofProgress.getId()will be ignored.- Specified by:
createOrGetExistingProgressin interfaceProgressDao- Returns:
- the
Progressas it was written into the database
-
deleteProgress
Description copied from interface:ProgressDaoDeletes a progress.- Specified by:
deleteProgressin interfaceProgressDao- Parameters:
progressId- the progress ID
-
advanceProgress
Description copied from interface:ProgressDaoAdvancesProgressby the specified number of actions.- Specified by:
advanceProgressin interfaceProgressDao- Parameters:
progress- theProgressactionsPerformed- 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)
-