use of uk.gov.gchq.gaffer.accumulostore.retriever.impl.AccumuloSingleIDRetriever in project Gaffer by gchq.
the class GetAdjacentEntitySeedsHandler method doOperation.
public CloseableIterable<EntitySeed> doOperation(final GetAdjacentEntitySeeds operation, final User user, final AccumuloStore store) throws OperationException {
operation.addOption(AccumuloStoreConstants.OPERATION_RETURN_MATCHED_SEEDS_AS_EDGE_SOURCE, "true");
final AccumuloRetriever<?> edgeRetriever;
try {
operation.setIncludeEntities(false);
if (IncludeEdgeType.NONE == operation.getIncludeEdges()) {
operation.setIncludeEdges(IncludeEdgeType.ALL);
}
final IteratorSettingFactory iteratorFactory = store.getKeyPackage().getIteratorFactory();
edgeRetriever = new AccumuloSingleIDRetriever(store, operation, user, iteratorFactory.getElementPreAggregationFilterIteratorSetting(operation.getView(), store), iteratorFactory.getElementPostAggregationFilterIteratorSetting(operation.getView(), store), iteratorFactory.getEdgeEntityDirectionFilterIteratorSetting(operation), iteratorFactory.getQueryTimeAggregatorIteratorSetting(operation.getView(), store));
} catch (IteratorSettingException | StoreException e) {
throw new OperationException(e.getMessage(), e);
}
return new ExtractDestinationEntitySeed(edgeRetriever);
}
Aggregations