use of com.enonic.xp.repo.impl.SingleRepoStorageSource in project xp by enonic.
the class BranchServiceImpl method getIgnoreOrder.
private NodeBranchEntries getIgnoreOrder(final NodeIds nodeIds, final InternalContext context) {
if (nodeIds.isEmpty()) {
return NodeBranchEntries.empty();
}
final SearchResult results = this.searchDao.search(SearchRequest.create().query(NodeBranchQuery.create().addQueryFilter(ValueFilter.create().fieldName(BranchIndexPath.BRANCH_NAME.getPath()).addValue(ValueFactory.newString(context.getBranch().getValue())).build()).addQueryFilter(IdFilter.create().fieldName(BranchIndexPath.NODE_ID.getPath()).values(nodeIds).build()).size(nodeIds.getSize()).build()).returnFields(BRANCH_RETURN_FIELDS).searchSource(new SingleRepoStorageSource(context.getRepositoryId(), SingleRepoStorageSource.Type.BRANCH)).searchPreference(context.getSearchPreference()).build());
final NodeBranchQueryResult nodeBranchEntries = NodeBranchQueryResultFactory.create(results);
return NodeBranchEntries.from(nodeBranchEntries.getList());
}
Aggregations