/** * @see org.xcmis.search.QueryObjectModelVisitor#visit(org.xcmis.search.model.operand.BindVariableName) */ public void visit(BindVariableName node) throws VisitException { final Object variableValue = bindVariablesValues.get(nameConverter.convertName(node.getVariableName())); if (variableValue == null) { throw new VisitException("No value bound for " + node.getVariableName()); } queryBuilderStack.push(variableValue); }
/** * Define the right-hand-side of the constraint using the supplied * operator. * * @param operator * the operator; may not be null * @param variableName * the name of the variable * @return the builder used to create the constraint clause, ready to be * used to create other constraints clauses or complete * already-started clauses; never null */ public ConstraintBuilder isVariable(Operator operator, String variableName) { Validate.notNull(operator, "The operator argument may not be null"); return this.constraintBuilder .setConstraint(new Comparison(left, operator, new BindVariableName(variableName))); }
/** * {@inheritDoc} * * @see QueryObjectModelVisitor#visit(BindVariableName) */ public void visit(BindVariableName variable) { append('$').append(variable.getVariableName()); }