use of org.mongojack.DBCursor in project graylog2-server by Graylog2.
the class ContentPackInstallationPersistenceService method findByContentPackIds.
public Set<ContentPackInstallation> findByContentPackIds(Set<ModelId> ids) {
final Set<String> stringIds = ids.stream().map(x -> x.toString()).collect(Collectors.toSet());
final DBObject query = BasicDBObjectBuilder.start().push(ContentPackInstallation.FIELD_CONTENT_PACK_ID).append("$in", stringIds).get();
final DBCursor<ContentPackInstallation> result = dbCollection.find(query);
return ImmutableSet.copyOf((Iterable<ContentPackInstallation>) result);
}
Aggregations