Examples of StaticOperand


Examples of org.jboss.dna.graph.query.model.StaticOperand

                        constraint = new SetCriteria(left, staticOperands);
                        if (not) constraint = new Not(constraint);
                    } else if (tokens.matches("BETWEEN") || tokens.matches("NOT", "BETWEEN")) {
                        boolean not = tokens.canConsume("NOT");
                        tokens.consume("BETWEEN");
                        StaticOperand lowerBound = parseStaticOperand(tokens, typeSystem);
                        boolean lowerInclusive = !tokens.canConsume("EXCLUSIVE");
                        tokens.consume("AND");
                        StaticOperand upperBound = parseStaticOperand(tokens, typeSystem);
                        boolean upperInclusive = !tokens.canConsume("EXCLUSIVE");
                        constraint = new Between(left, lowerBound, upperBound, lowerInclusive, upperInclusive);
                        if (not) constraint = new Not(constraint);
                    } else {
                        Operator operator = parseComparisonOperator(tokens);
                        StaticOperand right = parseStaticOperand(tokens, typeSystem);
                        constraint = new Comparison(left, operator, right);
                    }
                }
                // else continue ...
            }
View Full Code Here

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

    // parseStaticOperand
    // ----------------------------------------------------------------------------------------------------------------

    @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
Copyright © 2018 www.massapi.com. 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.