public class SearchDbService extends Object
Subclasses can add more sophisticated search methods by access the protected "db" property.
Indices can be added in the constructor.
| Modifier and Type | Field and Description |
|---|---|
protected org.mongojack.JacksonDBCollection<Search,org.bson.types.ObjectId> |
db |
| Modifier | Constructor and Description |
|---|---|
protected |
SearchDbService(MongoConnection mongoConnection,
MongoJackObjectMapperProvider mapper,
ViewService viewService,
ViewSharingService viewSharingService,
IsViewSharedForUser isViewSharedForUser,
SearchRequirements.Factory searchRequirementsFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String id) |
Collection<Search> |
findByIds(Set<String> idSet) |
PaginatedList<Search> |
findPaginated(org.mongojack.DBQuery.Query search,
org.mongojack.DBSort.SortBuilder sort,
int page,
int perPage) |
Optional<Search> |
get(String id) |
Optional<Search> |
getForUser(String id,
User user,
Predicate<String> permissionChecker) |
Search |
save(Search search) |
Stream<Search> |
streamAll() |
protected final org.mongojack.JacksonDBCollection<Search,org.bson.types.ObjectId> db
@Inject protected SearchDbService(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper, ViewService viewService, ViewSharingService viewSharingService, IsViewSharedForUser isViewSharedForUser, SearchRequirements.Factory searchRequirementsFactory)
public Optional<Search> getForUser(String id, User user, Predicate<String> permissionChecker)
public PaginatedList<Search> findPaginated(org.mongojack.DBQuery.Query search, org.mongojack.DBSort.SortBuilder sort, int page, int perPage)
public void delete(String id)
public Collection<Search> findByIds(Set<String> idSet)
Copyright © 2012–2020 Graylog, Inc.. All rights reserved.