Package org.modeshape.jcr.query.model

Examples of org.modeshape.jcr.query.model.And.right()


                                                PlanNode node ) {
        if (constraint instanceof And) {
            And and = (And)constraint;
            Constraint left = replaceReferences(context, and.left(), mapping, node);
            Constraint right = replaceReferences(context, and.right(), mapping, node);
            if (left == and.left() && right == and.right()) return and;
            return new And(left, right);
        }
        if (constraint instanceof Or) {
            Or or = (Or)constraint;
            Constraint left = replaceReferences(context, or.left(), mapping, node);
View Full Code Here


                                                           Map<String, String> propertyByAlias ) {
        if (propertyByAlias.isEmpty()) return constraint;
        if (constraint instanceof And) {
            And and = (And)constraint;
            Constraint left = replaceAliasesWithProperties(context, and.left(), propertyByAlias);
            Constraint right = replaceAliasesWithProperties(context, and.right(), propertyByAlias);
            if (left == and.left() && right == and.right()) return and;
            return new And(left, right);
        }
        if (constraint instanceof Or) {
            Or or = (Or)constraint;
View Full Code Here

        if (propertyByAlias.isEmpty()) return constraint;
        if (constraint instanceof And) {
            And and = (And)constraint;
            Constraint left = replaceAliasesWithProperties(context, and.left(), propertyByAlias);
            Constraint right = replaceAliasesWithProperties(context, and.right(), propertyByAlias);
            if (left == and.left() && right == and.right()) return and;
            return new And(left, right);
        }
        if (constraint instanceof Or) {
            Or or = (Or)constraint;
            Constraint left = replaceAliasesWithProperties(context, or.left(), propertyByAlias);
View Full Code Here

                                                                 Constraint constraint,
                                                                 Map<String, Subquery> subqueriesByVariableName ) {
        if (constraint instanceof And) {
            And and = (And)constraint;
            Constraint left = replaceSubqueriesWithBindVariables(context, and.left(), subqueriesByVariableName);
            Constraint right = replaceSubqueriesWithBindVariables(context, and.right(), subqueriesByVariableName);
            if (left == and.left() && right == and.right()) return and;
            return new And(left, right);
        }
        if (constraint instanceof Or) {
            Or or = (Or)constraint;
View Full Code Here

                                                                 Map<String, Subquery> subqueriesByVariableName ) {
        if (constraint instanceof And) {
            And and = (And)constraint;
            Constraint left = replaceSubqueriesWithBindVariables(context, and.left(), subqueriesByVariableName);
            Constraint right = replaceSubqueriesWithBindVariables(context, and.right(), subqueriesByVariableName);
            if (left == and.left() && right == and.right()) return and;
            return new And(left, right);
        }
        if (constraint instanceof Or) {
            Or or = (Or)constraint;
            Constraint left = replaceSubqueriesWithBindVariables(context, or.left(), subqueriesByVariableName);
View Full Code Here

        assertThat(and.left(), is(instanceOf(SameNode.class)));
        SameNode second = (SameNode)and.left();
        assertThat(second.selectorName(), is(selectorName("tableA")));
        assertThat(second.getPath(), is("/c/d"));

        assertThat(and.right(), is(instanceOf(SameNode.class)));
        SameNode third = (SameNode)and.right();
        assertThat(third.selectorName(), is(selectorName("tableA")));
        assertThat(third.getPath(), is("/e/f"));
    }
View Full Code Here

        SameNode second = (SameNode)and.left();
        assertThat(second.selectorName(), is(selectorName("tableA")));
        assertThat(second.getPath(), is("/c/d"));

        assertThat(and.right(), is(instanceOf(SameNode.class)));
        SameNode third = (SameNode)and.right();
        assertThat(third.selectorName(), is(selectorName("tableA")));
        assertThat(third.getPath(), is("/e/f"));
    }

    // ----------------------------------------------------------------------------------------------------------------
View Full Code Here

        assertThat(and.left(), is(instanceOf(SameNode.class)));
        SameNode same = (SameNode)and.left();
        assertThat(same.selectorName(), is(selectorName("tableA")));
        assertThat(same.getPath(), is("/a/b/c"));

        assertThat(and.right(), is(instanceOf(FullTextSearch.class)));
        FullTextSearch search = (FullTextSearch)and.right();
        assertThat(search.selectorName(), is(selectorName("tableA")));
        assertThat(search.getPropertyName(), is("p1"));
        assertThat(search.fullTextSearchExpression(), is("term1"));
    }
View Full Code Here

        SameNode same = (SameNode)and.left();
        assertThat(same.selectorName(), is(selectorName("tableA")));
        assertThat(same.getPath(), is("/a/b/c"));

        assertThat(and.right(), is(instanceOf(FullTextSearch.class)));
        FullTextSearch search = (FullTextSearch)and.right();
        assertThat(search.selectorName(), is(selectorName("tableA")));
        assertThat(search.getPropertyName(), is("p1"));
        assertThat(search.fullTextSearchExpression(), is("term1"));
    }
View Full Code Here

        assertThat(and.left(), is(instanceOf(SameNode.class)));
        SameNode same = (SameNode)and.left();
        assertThat(same.selectorName(), is(selectorName("tableA")));
        assertThat(same.getPath(), is("/a/b/c"));

        assertThat(and.right(), is(instanceOf(And.class)));
        And secondAnd = (And)and.right();

        assertThat(secondAnd.left(), is(instanceOf(FullTextSearch.class)));
        FullTextSearch search1 = (FullTextSearch)secondAnd.left();
        assertThat(search1.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.