Package org.graylog.scheduler
Class DBJobDefinitionService
java.lang.Object
org.graylog2.database.PaginatedDbService<JobDefinitionDto>
org.graylog.scheduler.DBJobDefinitionService
-
Field Summary
Fields inherited from class org.graylog2.database.PaginatedDbService
db
-
Constructor Summary
ConstructorDescriptionDBJobDefinitionService
(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper) -
Method Summary
Modifier and TypeMethodDescriptiongetAllByConfigField
(String configField, Collection<? extends Object> values) Returns all job definitions that have the given config field values, grouped by config field value.getAllPaginated
(String sortByField, int page, int perPage) getByConfigField
(String configField, Object value) Returns the job definition that has the given config field value.getByQuery
(org.mongojack.DBQuery.Query query) Methods inherited from class org.graylog2.database.PaginatedDbService
asImmutableList, delete, findPaginatedWithQueryAndSort, findPaginatedWithQueryFilterAndSort, findPaginatedWithQueryFilterAndSortWithGrandTotal, get, getMultiFieldSortBuilder, getPage, getSortBuilder, save, streamAll, streamByIds, streamQuery, streamQueryWithSort
-
Field Details
-
COLLECTION_NAME
- See Also:
-
-
Constructor Details
-
DBJobDefinitionService
@Inject public DBJobDefinitionService(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper)
-
-
Method Details
-
getAllPaginated
-
getByConfigField
Returns the job definition that has the given config field value.- Parameters:
configField
- the config fieldvalue
- the value of the config field- Returns:
- the job definition with the given config field, or an empty optional
-
getByQuery
-
getAllByConfigField
public Map<String,List<JobDefinitionDto>> getAllByConfigField(String configField, Collection<? extends Object> values) Returns all job definitions that have the given config field values, grouped by config field value.- Parameters:
configField
- the config fieldvalues
- the values of the config field- Returns:
- the job definitions grouped by the given values
-