Package org.modeshape.jcr.query.model

Examples of org.modeshape.jcr.query.model.BindVariableName


            }
            variableName = variableName + i;
            subqueriesByVariableName.put(variableName, subquery);
            context.getVariables().put(variableName, null);
            // Replace with a variable substitution ...
            return new BindVariableName(variableName);
        }
        return staticOperand;
    }
View Full Code Here


         *         complete already-started clauses; never null
         */
        public ConstraintBuilder isVariable( Operator operator,
                                             String variableName ) {
            CheckArg.isNotNull(operator, "operator");
            return this.constraintBuilder.setConstraint(new Comparison(left, operator, new BindVariableName(variableName)));
        }
View Full Code Here

        private void addValues( StaticOperand valueOperand,
                                Set<String> matchedKeys ) {
            if (valueOperand instanceof BindVariableName) {
                // We have to resolve the variable ...
                BindVariableName varName = (BindVariableName)valueOperand;
                String varNameStr = varName.getBindVariableName();
                Object varValue = this.variables.get(varNameStr);
                if (varValue instanceof Collection) {
                    Collection<?> collection = (Collection<?>)varValue;
                    for (Object value : collection) {
                        StaticOperand operand = new Literal(value);
View Full Code Here

         *
         * @param variableName the name of the variable
         * @return the constraint builder; never null
         */
        public AndBuilder<UpperBoundary> variable( String variableName ) {
            return new AndBuilder<UpperBoundary>(new UpperBoundary(comparisonBuilder, new BindVariableName(variableName)));
        }
View Full Code Here

    @Test
    public void shouldParseStaticOperandFromStringWithBindVariable() {
        StaticOperand operand = parser.parseStaticOperand(tokens("$VAR"), typeSystem);
        assertThat(operand, is(instanceOf(BindVariableName.class)));
        BindVariableName var = (BindVariableName)operand;
        assertThat(var.getBindVariableName(), is("VAR"));
    }
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.query.model.BindVariableName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.