/** * Calls accept on each of the attached constraints of the AND node. */ @Override public boolean visit(AndImpl node) { for (ConstraintImpl constraint : node.getConstraints()) { constraint.accept(this); } return true; }
/** * Calls accept on each of the attached constraints of the AND node. */ @Override public boolean visit(AndImpl node) { for (ConstraintImpl constraint : node.getConstraints()) { constraint.accept(this); } return true; }
/** * Calls accept on each of the attached constraints of the AND node. */ @Override public boolean visit(AndImpl node) { for (ConstraintImpl constraint : node.getConstraints()) { constraint.accept(this); } return true; }
private static Set<String> extractFulltext(ConstraintImpl c) { Set<String> tokens = new HashSet<String>(); // TODO instanceof should not be used, // as it will break without us noticing if we extend the AST if (c instanceof FullTextSearchImpl) { FullTextSearchImpl f = (FullTextSearchImpl) c; if (f.getFullTextSearchExpression() instanceof LiteralImpl) { LiteralImpl l = (LiteralImpl) f.getFullTextSearchExpression(); tokens.add(l.getLiteralValue().getValue(Type.STRING)); } } if (c instanceof AndImpl) { for (ConstraintImpl constraint : ((AndImpl) c).getConstraints()) { tokens.addAll(extractFulltext(constraint)); } } if (c instanceof OrImpl) { for (ConstraintImpl constraint : ((OrImpl) c).getConstraints()) { tokens.addAll(extractFulltext(constraint)); } } return tokens; }
private static Set<String> extractFulltext(ConstraintImpl c) { Set<String> tokens = new HashSet<String>(); // TODO instanceof should not be used, // as it will break without us noticing if we extend the AST if (c instanceof FullTextSearchImpl) { FullTextSearchImpl f = (FullTextSearchImpl) c; if (f.getFullTextSearchExpression() instanceof LiteralImpl) { LiteralImpl l = (LiteralImpl) f.getFullTextSearchExpression(); tokens.add(l.getLiteralValue().getValue(Type.STRING)); } } if (c instanceof AndImpl) { for (ConstraintImpl constraint : ((AndImpl) c).getConstraints()) { tokens.addAll(extractFulltext(constraint)); } } if (c instanceof OrImpl) { for (ConstraintImpl constraint : ((OrImpl) c).getConstraints()) { tokens.addAll(extractFulltext(constraint)); } } return tokens; }
private static Set<String> extractFulltext(ConstraintImpl c) { Set<String> tokens = new HashSet<String>(); // TODO instanceof should not be used, // as it will break without us noticing if we extend the AST if (c instanceof FullTextSearchImpl) { FullTextSearchImpl f = (FullTextSearchImpl) c; if (f.getFullTextSearchExpression() instanceof LiteralImpl) { LiteralImpl l = (LiteralImpl) f.getFullTextSearchExpression(); tokens.add(l.getLiteralValue().getValue(Type.STRING)); } } if (c instanceof AndImpl) { for (ConstraintImpl constraint : ((AndImpl) c).getConstraints()) { tokens.addAll(extractFulltext(constraint)); } } if (c instanceof OrImpl) { for (ConstraintImpl constraint : ((OrImpl) c).getConstraints()) { tokens.addAll(extractFulltext(constraint)); } } return tokens; }
for (ConstraintImpl constraint : and.getConstraints()) { if (constraint instanceof InImpl) { InImpl in = (InImpl) constraint;
for (ConstraintImpl constraint : and.getConstraints()) { if (constraint instanceof InImpl) { InImpl in = (InImpl) constraint;
for (ConstraintImpl constraint : and.getConstraints()) { if (constraint instanceof InImpl) { InImpl in = (InImpl) constraint;