Class MongoMissionDao
java.lang.Object
dev.getelements.elements.dao.mongo.mission.MongoMissionDao
- All Implemented Interfaces:
MissionDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateMission(Mission mission) Creates a mission.voiddeleteMission(String missionNameOrID) Deletes a mission.findMissionByNameOrId(String missionNameOrId) findMongoMissionByNameOrId(String missionNameOrId) dev.morphia.DatastoregetMissionByNameOrId(String identifier) Gets the mission with the id, or throws aNotFoundExceptionif the mission can't be found.getMissions(int offset, int count, String search) Gets missions specifying the offset and the count, specifying a search filter.getMissions(int offset, int count, List<String> tags) Gets missions specifying the offset and the count.getMissionsMatching(Collection<String> missionNamesOrIds) Gets allMissions matching the list of names or ids.getMongoMissionByNameOrId(String missionNameOrId) dev.morphia.query.Query<MongoMission> getQueryForNameOrId(String missionNameOrId) voidsetBooleanQueryParser(BooleanQueryParser booleanQueryParser) voidsetDatastore(dev.morphia.Datastore datastore) voidsetDozerMapper(MapperRegistry dozerMapperRegistry) voidsetMongoDBUtils(MongoDBUtils mongoDBUtils) voidsetMongoItemDao(MongoItemDao mongoItemDao) voidsetValidationHelper(ValidationHelper validationHelper) updateMission(Mission mission) Updates the mission, or throws aNotFoundExceptionif the mission can't be found.
-
Constructor Details
-
MongoMissionDao
public MongoMissionDao()
-
-
Method Details
-
getMissions
Description copied from interface:MissionDaoGets missions specifying the offset and the count.- Specified by:
getMissionsin interfaceMissionDao- Parameters:
offset- the offsetcount- the counttags-- Returns:
- a
PaginationofMissionobjects.
-
getMissions
Description copied from interface:MissionDaoGets missions specifying the offset and the count, specifying a search filter.- Specified by:
getMissionsin interfaceMissionDao- Parameters:
offset- the offsetcount- the countsearch- a query to filter the results- Returns:
- a
PaginationofMissionobjects.
-
findMissionByNameOrId
- Specified by:
findMissionByNameOrIdin interfaceMissionDao
-
findMongoMissionByNameOrId
-
getQueryForNameOrId
-
getMissionByNameOrId
Description copied from interface:MissionDaoGets the mission with the id, or throws aNotFoundExceptionif the mission can't be found.- Specified by:
getMissionByNameOrIdin interfaceMissionDao- Returns:
- the
Missionthat was requested, never null
-
getMongoMissionByNameOrId
-
getMissionsMatching
Description copied from interface:MissionDaoGets allMissions matching the list of names or ids.- Specified by:
getMissionsMatchingin interfaceMissionDao- Parameters:
missionNamesOrIds- a list containing missions or ids- Returns:
- the
List<Mission>
-
updateMission
Description copied from interface:MissionDaoUpdates the mission, or throws aNotFoundExceptionif the mission can't be found. TheMission.getId()is used to key the mission being updated.- Specified by:
updateMissionin interfaceMissionDao- Returns:
- the
Missionas it was written into the database
-
createMission
Description copied from interface:MissionDaoCreates a mission. The value ofMission.getId()will be ignored.- Specified by:
createMissionin interfaceMissionDao- Returns:
- the
Missionas it was written into the database
-
deleteMission
Description copied from interface:MissionDaoDeletes a mission.- Specified by:
deleteMissionin interfaceMissionDao- Parameters:
missionNameOrID- the mission ID
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getDozerMapper
-
setDozerMapper
-
getValidationHelper
-
setValidationHelper
-
getMongoDBUtils
-
setMongoDBUtils
-
getMongoItemDao
-
setMongoItemDao
-
getBooleanQueryParser
-
setBooleanQueryParser
-