Examples of UpperCase


Examples of org.apache.jackrabbit.core.query.jsr283.qom.UpperCase

    /**
     * Test case for {@link QueryObjectModelFactory#upperCase(DynamicOperand)}
     */
    public void testUpperCase() throws RepositoryException {
        PropertyValue propValue = qomFactory.propertyValue(propertyName1);
        UpperCase upper = qomFactory.upperCase(propValue);
        assertTrue("Not a property value operand", upper.getOperand() instanceof PropertyValue);
    }
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.query.jsr283.qom.UpperCase

    /**
     * Test case for {@link QueryObjectModelFactory#upperCase(DynamicOperand)}
     */
    public void testUpperCase() throws RepositoryException {
        PropertyValue propValue = qomFactory.propertyValue(propertyName1);
        UpperCase upper = qomFactory.upperCase(propValue);
        assertTrue("Not a property value operand", upper.getOperand() instanceof PropertyValue);
    }
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.query.jsr283.qom.UpperCase

    /**
     * Test case for {@link QueryObjectModelFactory#upperCase(DynamicOperand)}
     */
    public void testUpperCase() throws RepositoryException {
        PropertyValue propValue = qomFactory.propertyValue(propertyName1);
        UpperCase upper = qomFactory.upperCase(propValue);
        assertTrue("Not a property value operand", upper.getOperand() instanceof PropertyValue);
    }
View Full Code Here

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

            SelectorName replacement = rewrittenSelectors.get(operation.getSelectorName());
            if (replacement == null) return operand;
            return new LowerCase(replaceReferencesToRemovedSource(context, operation.getOperand(), rewrittenSelectors));
        }
        if (operand instanceof UpperCase) {
            UpperCase operation = (UpperCase)operand;
            SelectorName replacement = rewrittenSelectors.get(operation.getSelectorName());
            if (replacement == null) return operand;
            return new UpperCase(replaceReferencesToRemovedSource(context, operation.getOperand(), rewrittenSelectors));
        }
        if (operand instanceof NodeName) {
            NodeName name = (NodeName)operand;
            SelectorName replacement = rewrittenSelectors.get(name.getSelectorName());
            if (replacement == null) return name;
View Full Code Here

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

        if (operand instanceof LowerCase) {
            LowerCase operation = (LowerCase)operand;
            return new LowerCase(replaceViewReferences(context, operation.getOperand(), mapping, node));
        }
        if (operand instanceof UpperCase) {
            UpperCase operation = (UpperCase)operand;
            return new UpperCase(replaceViewReferences(context, operation.getOperand(), mapping, node));
        }
        if (operand instanceof NodeName) {
            NodeName name = (NodeName)operand;
            if (!mapping.getOriginalName().equals(name.getSelectorName())) return name;
            if (!mapping.isMappedToSingleSelector()) return name;
View Full Code Here

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

                 *
                 * @see org.jboss.dna.graph.query.QueryBuilder.SingleOrderByOperandBuilder#addOrdering(org.jboss.dna.graph.query.model.DynamicOperand)
                 */
                @Override
                protected OrderByBuilder addOrdering( DynamicOperand operand ) {
                    return super.addOrdering(new UpperCase(operand));
                }
            };
        }
View Full Code Here

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

        }

        @Override
        protected ConstraintBuilder setConstraint( Constraint constraint ) {
            Comparison comparison = (Comparison)constraint;
            return delegate.setConstraint(new Comparison(new UpperCase(comparison.getOperand1()), comparison.getOperator(),
                                                         comparison.getOperand2()));
        }
View Full Code Here

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

            tokens.consume(")");
        } else if (tokens.canConsume("LOWER", "(")) {
            result = new LowerCase(parseDynamicOperand(tokens, typeSystem, source));
            tokens.consume(")");
        } else if (tokens.canConsume("UPPER", "(")) {
            result = new UpperCase(parseDynamicOperand(tokens, typeSystem, source));
            tokens.consume(")");
        } else if (tokens.canConsume("NAME", "(")) {
            if (tokens.canConsume(")")) {
                if (source instanceof Selector) {
                    return new NodeName(((Selector)source).getName());
View Full Code Here

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

                    return result != null ? result.toLowerCase() : null;
                }
            };
        }
        if (operand instanceof UpperCase) {
            UpperCase upperCase = (UpperCase)operand;
            final DynamicOperation delegate = createDynamicOperation(typeSystem, schemata, columns, upperCase.getOperand());
            return new DynamicOperation() {
                public String getExpectedType() {
                    return stringFactory.getTypeName();
                }
View Full Code Here

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

                                                            mock(Source.class));
        assertThat(operand, is(instanceOf(LowerCase.class)));
        LowerCase lower = (LowerCase)operand;
        assertThat(lower.selectorName(), is(selectorName("tableA")));
        assertThat(lower.getOperand(), is(instanceOf(UpperCase.class)));
        UpperCase upper = (UpperCase)lower.getOperand();
        assertThat(upper.selectorName(), is(selectorName("tableA")));
        assertThat(upper.getOperand(), is(instanceOf(PropertyValue.class)));
        PropertyValue value = (PropertyValue)upper.getOperand();
        assertThat(value.getPropertyName(), is("property"));
        assertThat(value.selectorName(), is(selectorName("tableA")));
    }
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.