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.void
deleteMission
(String missionNameOrID) Deletes a mission.findMissionByNameOrId
(String missionNameOrId) findMongoMissionByNameOrId
(String missionNameOrId) dev.morphia.Datastore
getMissionByNameOrId
(String identifier) Gets the mission with the id, or throws aNotFoundException
if 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 allMission
s matching the list of names or ids.getMongoMissionByNameOrId
(String missionNameOrId) dev.morphia.query.Query
<MongoMission> getQueryForNameOrId
(String missionNameOrId) void
setBooleanQueryParser
(BooleanQueryParser booleanQueryParser) void
setDatastore
(dev.morphia.Datastore datastore) void
setDozerMapper
(MapperRegistry dozerMapperRegistry) void
setMongoDBUtils
(MongoDBUtils mongoDBUtils) void
setMongoItemDao
(MongoItemDao mongoItemDao) void
setValidationHelper
(ValidationHelper validationHelper) updateMission
(Mission mission) Updates the mission, or throws aNotFoundException
if the mission can't be found.
-
Constructor Details
-
MongoMissionDao
public MongoMissionDao()
-
-
Method Details
-
getMissions
Description copied from interface:MissionDao
Gets missions specifying the offset and the count.- Specified by:
getMissions
in interfaceMissionDao
- Parameters:
offset
- the offsetcount
- the counttags
-- Returns:
- a
Pagination
ofMission
objects.
-
getMissions
Description copied from interface:MissionDao
Gets missions specifying the offset and the count, specifying a search filter.- Specified by:
getMissions
in interfaceMissionDao
- Parameters:
offset
- the offsetcount
- the countsearch
- a query to filter the results- Returns:
- a
Pagination
ofMission
objects.
-
findMissionByNameOrId
- Specified by:
findMissionByNameOrId
in interfaceMissionDao
-
findMongoMissionByNameOrId
-
getQueryForNameOrId
-
getMissionByNameOrId
Description copied from interface:MissionDao
Gets the mission with the id, or throws aNotFoundException
if the mission can't be found.- Specified by:
getMissionByNameOrId
in interfaceMissionDao
- Returns:
- the
Mission
that was requested, never null
-
getMongoMissionByNameOrId
-
getMissionsMatching
Description copied from interface:MissionDao
Gets allMission
s matching the list of names or ids.- Specified by:
getMissionsMatching
in interfaceMissionDao
- Parameters:
missionNamesOrIds
- a list containing missions or ids- Returns:
- the
List<Mission>
-
updateMission
Description copied from interface:MissionDao
Updates the mission, or throws aNotFoundException
if the mission can't be found. TheMission.getId()
is used to key the mission being updated.- Specified by:
updateMission
in interfaceMissionDao
- Returns:
- the
Mission
as it was written into the database
-
createMission
Description copied from interface:MissionDao
Creates a mission. The value ofMission.getId()
will be ignored.- Specified by:
createMission
in interfaceMissionDao
- Returns:
- the
Mission
as it was written into the database
-
deleteMission
Description copied from interface:MissionDao
Deletes a mission.- Specified by:
deleteMission
in 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
-