public Object visit(DerefQueryNode node, Object data) throws RepositoryException { return node.acceptOperands(this, data); } }
public Object visit(DerefQueryNode node, Object data) throws RepositoryException { return node.acceptOperands(this, data); } }
public Query createPredicateDeref(Query subQuery, DerefQueryNode node, Object data) throws RepositoryException { Query context = (Query) data; if (context == null) { exceptions.add(new IllegalArgumentException("Unsupported query")); } try { String refProperty = resolver.getJCRName(node.getRefProperty()); context = new PredicateDerefQuery(subQuery, refProperty, node.getNameTest(), indexFormatVersion, nsMappings); // attach predicates Object[] predicates = node.acceptOperands(this, data); if (predicates.length > 0) { BooleanQuery andQuery = new BooleanQuery(); for (Object predicate : predicates) { andQuery.add((Query) predicate, Occur.MUST); } andQuery.add(context, Occur.MUST); context = andQuery; } } catch (NamespaceException e) { // should never happen exceptions.add(e); } return context; }
public Query createPredicateDeref(Query subQuery, DerefQueryNode node, Object data) throws RepositoryException { Query context = (Query) data; if (context == null) { exceptions.add(new IllegalArgumentException("Unsupported query")); } try { String refProperty = resolver.getJCRName(node.getRefProperty()); context = new PredicateDerefQuery(subQuery, refProperty, node.getNameTest(), indexFormatVersion, nsMappings); // attach predicates Object[] predicates = node.acceptOperands(this, data); if (predicates.length > 0) { BooleanQuery andQuery = new BooleanQuery(); for (Object predicate : predicates) { andQuery.add((Query) predicate, Occur.MUST); } andQuery.add(context, Occur.MUST); context = andQuery; } } catch (NamespaceException e) { // should never happen exceptions.add(e); } return context; }
public Object visit(DerefQueryNode node, Object data) throws RepositoryException { Query context = (Query) data; if (context == null) { exceptions.add(new IllegalArgumentException("Unsupported query")); } try { String refProperty = resolver.getJCRName(node.getRefProperty()); if (node.getIncludeDescendants()) { Query refPropQuery = Util.createMatchAllQuery(refProperty, indexFormatVersion, cache); context = new DescendantSelfAxisQuery(context, refPropQuery, false); } context = new DerefQuery(context, refProperty, node.getNameTest(), indexFormatVersion, nsMappings); // attach predicates Object[] predicates = node.acceptOperands(this, data); if (predicates.length > 0) { BooleanQuery andQuery = new BooleanQuery(); for (Object predicate : predicates) { andQuery.add((Query) predicate, Occur.MUST); } andQuery.add(context, Occur.MUST); context = andQuery; } } catch (NamespaceException e) { // should never happen exceptions.add(e); } return context; }
public Object visit(DerefQueryNode node, Object data) throws RepositoryException { Query context = (Query) data; if (context == null) { exceptions.add(new IllegalArgumentException("Unsupported query")); } try { String refProperty = resolver.getJCRName(node.getRefProperty()); if (node.getIncludeDescendants()) { Query refPropQuery = Util.createMatchAllQuery(refProperty, indexFormatVersion, cache); context = new DescendantSelfAxisQuery(context, refPropQuery, false); } context = new DerefQuery(context, refProperty, node.getNameTest(), indexFormatVersion, nsMappings); // attach predicates Object[] predicates = node.acceptOperands(this, data); if (predicates.length > 0) { BooleanQuery andQuery = new BooleanQuery(); for (Object predicate : predicates) { andQuery.add((Query) predicate, Occur.MUST); } andQuery.add(context, Occur.MUST); context = andQuery; } } catch (NamespaceException e) { // should never happen exceptions.add(e); } return context; }