Package org.modeshape.jcr.query.model

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


         *
         * @param literal the literal value;
         * @return the constraint builder; never null
         */
        public ConstraintBuilder literal( boolean literal ) {
            return comparisonBuilder.isBetween(lowerBound, new Literal(literal));
        }
View Full Code Here


        public ConstraintBuilder isIn( Object... literals ) {
            CheckArg.isNotNull(literals, "literals");
            Collection<StaticOperand> right = new ArrayList<StaticOperand>();
            for (Object literal : literals) {
                right.add(literal instanceof Literal ? (Literal)literal : new Literal(literal));
            }
            return this.constraintBuilder.setConstraint(new SetCriteria(left, right));
        }
View Full Code Here

        public ConstraintBuilder isIn( Iterable<Object> literals ) {
            CheckArg.isNotNull(literals, "literals");
            Collection<StaticOperand> right = new ArrayList<StaticOperand>();
            for (Object literal : literals) {
                right.add(literal instanceof Literal ? (Literal)literal : new Literal(literal));
            }
            return this.constraintBuilder.setConstraint(new SetCriteria(left, right));
        }
View Full Code Here

                return (Subquery)literalOrSubquery;
            }
            if (literalOrSubquery instanceof Literal) {
                return (Literal)literalOrSubquery;
            }
            return new Literal(literalOrSubquery);
        }
View Full Code Here

                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);
                        addValues(operand, matchedKeys);
                    }
                } else {
                    StaticOperand operand = new Literal(varValue);
                    addValues(operand, matchedKeys);
                }
                // Not a value we know what to do with ...
                return;
            }
View Full Code Here

         *
         * @param literal the literal value;
         * @return the constraint builder; never null
         */
        public AndBuilder<UpperBoundary> literal( String literal ) {
            return new AndBuilder<UpperBoundary>(new UpperBoundary(comparisonBuilder, new Literal(literal)));
        }
View Full Code Here

         *
         * @param literal the literal value;
         * @return the constraint builder; never null
         */
        public AndBuilder<UpperBoundary> literal( int literal ) {
            return new AndBuilder<UpperBoundary>(new UpperBoundary(comparisonBuilder, new Literal(literal)));
        }
View Full Code Here

         *
         * @param literal the literal value;
         * @return the constraint builder; never null
         */
        public AndBuilder<UpperBoundary> literal( long literal ) {
            return new AndBuilder<UpperBoundary>(new UpperBoundary(comparisonBuilder, new Literal(literal)));
        }
View Full Code Here

         *
         * @param literal the literal value;
         * @return the constraint builder; never null
         */
        public AndBuilder<UpperBoundary> literal( float literal ) {
            return new AndBuilder<UpperBoundary>(new UpperBoundary(comparisonBuilder, new Literal(literal)));
        }
View Full Code Here

         *
         * @param literal the literal value;
         * @return the constraint builder; never null
         */
        public AndBuilder<UpperBoundary> literal( double literal ) {
            return new AndBuilder<UpperBoundary>(new UpperBoundary(comparisonBuilder, new Literal(literal)));
        }
View Full Code Here

TOP

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

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.