Examples of StaticOperandImpl


Examples of org.apache.jackrabbit.oak.query.ast.StaticOperandImpl

        } else if (readIf("FALSE")) {
            LiteralImpl literal = getUncastLiteral(PropertyValues.newBoolean(false));
            return literal;
        } else if (readIf("CAST")) {
            read("(");
            StaticOperandImpl op = parseStaticOperand();
            if (!(op instanceof LiteralImpl)) {
                throw getSyntaxError("literal");
            }
            LiteralImpl literal = (LiteralImpl) op;
            PropertyValue value = literal.getLiteralValue();
            read("AS");
            value = parseCastAs(value);
            read(")");
            // CastLiteral
            literal = factory.literal(value);
            return literal;
        } else {
            if (supportSQL1) {
                if (readIf("TIMESTAMP")) {
                    StaticOperandImpl op = parseStaticOperand();
                    if (!(op instanceof LiteralImpl)) {
                        throw getSyntaxError("literal");
                    }
                    LiteralImpl literal = (LiteralImpl) op;
                    PropertyValue value = literal.getLiteralValue();
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.ast.StaticOperandImpl

                a = parseCondition(factory.propertyValue(name, readName()));
            } else {
                a = parseCondition(factory.propertyValue(getOnlySelectorName(), name));
            }
        } else if (supportSQL1) {
            StaticOperandImpl left = parseStaticOperand();
            if (readIf("IN")) {
                DynamicOperandImpl right = parseDynamicOperand();
                ConstraintImpl c = factory.comparison(right, Operator.EQUAL, left);
                return c;
            } else {
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.ast.StaticOperandImpl

            c = factory.comparison(left, Operator.GREATER_OR_EQUAL, parseStaticOperand());
        } else if (readIf("LIKE")) {
            c = factory.comparison(left, Operator.LIKE, parseStaticOperand());
            if (supportSQL1) {
                if (readIf("ESCAPE")) {
                    StaticOperandImpl esc = parseStaticOperand();
                    if (!(esc instanceof LiteralImpl)) {
                        throw getSyntaxError("only ESCAPE '\' is supported");
                    }
                    PropertyValue v = ((LiteralImpl) esc).getLiteralValue();
                    if (!v.getValue(Type.STRING).equals("\\")) {
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.ast.StaticOperandImpl

        } else if (readIf("FALSE")) {
            LiteralImpl literal = getUncastLiteral(PropertyValues.newBoolean(false));
            return literal;
        } else if (readIf("CAST")) {
            read("(");
            StaticOperandImpl op = parseStaticOperand();
            if (!(op instanceof LiteralImpl)) {
                throw getSyntaxError("literal");
            }
            LiteralImpl literal = (LiteralImpl) op;
            PropertyValue value = literal.getLiteralValue();
            read("AS");
            value = parseCastAs(value);
            read(")");
            // CastLiteral
            literal = factory.literal(value);
            return literal;
        } else {
            if (supportSQL1) {
                if (readIf("TIMESTAMP")) {
                    StaticOperandImpl op = parseStaticOperand();
                    if (!(op instanceof LiteralImpl)) {
                        throw getSyntaxError("literal");
                    }
                    LiteralImpl literal = (LiteralImpl) op;
                    PropertyValue value = literal.getLiteralValue();
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.ast.StaticOperandImpl

        } else if (readIf("FALSE")) {
            LiteralImpl literal = getUncastLiteral(valueFactory.createValue(false));
            return literal;
        } else if (readIf("CAST")) {
            read("(");
            StaticOperandImpl op = parseStaticOperand();
            if (!(op instanceof LiteralImpl)) {
                throw getSyntaxError("literal");
            }
            LiteralImpl literal = (LiteralImpl) op;
            CoreValue value = literal.getLiteralValue();
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.query.qom.StaticOperandImpl

        }

        public Object visit(ComparisonImpl node, Object data) throws Exception {
            DynamicOperandImpl op1 = (DynamicOperandImpl) node.getOperand1();
            Operator operator = node.getOperatorInstance();
            StaticOperandImpl op2 = ((StaticOperandImpl) node.getOperand2());
            Value staticValue = (Value) op2.accept(this, null);

            DynamicOperand dynOp = (DynamicOperand) op1.accept(this, staticValue);
            SelectorImpl selector = getSelector(op1.getSelectorQName());
            if (operator == Operator.LIKE) {
                return new LikeConstraint(dynOp, staticValue, selector);
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.query.qom.StaticOperandImpl

        }

        public Object visit(ComparisonImpl node, Object data) throws Exception {
            DynamicOperandImpl op1 = (DynamicOperandImpl) node.getOperand1();
            Operator operator = node.getOperatorInstance();
            StaticOperandImpl op2 = ((StaticOperandImpl) node.getOperand2());
            Value staticValue = (Value) op2.accept(this, null);

            DynamicOperand dynOp = (DynamicOperand) op1.accept(this, staticValue);
            SelectorImpl selector = getSelector(op1.getSelectorQName());
            if (operator == Operator.LIKE) {
                return new LikeConstraint(dynOp, staticValue, selector);
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.query.qom.StaticOperandImpl

        }

        public Object visit(ComparisonImpl node, Object data) throws Exception {
            DynamicOperandImpl op1 = (DynamicOperandImpl) node.getOperand1();
            Operator operator = node.getOperatorInstance();
            StaticOperandImpl op2 = ((StaticOperandImpl) node.getOperand2());
            Value staticValue = (Value) op2.accept(this, null);

            DynamicOperand dynOp = (DynamicOperand) op1.accept(this, staticValue);
            SelectorImpl selector = getSelector(op1.getSelectorQName());
            if (operator == Operator.LIKE) {
                return new LikeConstraint(dynOp, staticValue, selector);
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.query.qom.StaticOperandImpl

        }

        public Object visit(ComparisonImpl node, Object data) throws Exception {
            DynamicOperandImpl op1 = (DynamicOperandImpl) node.getOperand1();
            Operator operator = node.getOperatorInstance();
            StaticOperandImpl op2 = ((StaticOperandImpl) node.getOperand2());
            Value staticValue = (Value) op2.accept(this, null);

            DynamicOperand dynOp = (DynamicOperand) op1.accept(this, staticValue);
            SelectorImpl selector = getSelector(op1.getSelectorQName());
            if (operator == Operator.LIKE) {
                return new LikeConstraint(dynOp, staticValue, selector);
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.query.qom.StaticOperandImpl

        }

        public Object visit(ComparisonImpl node, Object data) throws Exception {
            DynamicOperandImpl op1 = (DynamicOperandImpl) node.getOperand1();
            Operator operator = node.getOperatorInstance();
            StaticOperandImpl op2 = ((StaticOperandImpl) node.getOperand2());
            Value staticValue = (Value) op2.accept(this, null);

            DynamicOperand dynOp = (DynamicOperand) op1.accept(this, staticValue);
            SelectorImpl selector = getSelector(op1.getSelectorQName());
            if (operator == Operator.LIKE) {
                return new LikeConstraint(dynOp, staticValue, selector);
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.