Examples of selectorName()


Examples of javax.jcr.Value.selectorName()

                    problems.addError(GraphI18n.nameOperandRequiresNameLiteralType, readable(operand), op.symbol(), readable(rhs));
                }
            }
        } else if (operand instanceof ReferenceValue) {
            ReferenceValue value = (ReferenceValue)operand;
            verifyOperator(value.selectorName(), value.getPropertyName(), op);
        } else if (operand instanceof Length) {
            Length length = (Length)operand;
            verifyComparison(length.getPropertyValue(), op, rhs);
            // Verify that the rhs is a long or convertable to a long ...
            if (rhs instanceof Literal) {
View Full Code Here

Examples of org.modeshape.jcr.query.model.ChildCount.selectorName()

            if (replacement == null) return operand;
            return new NodePath(replacement);
        }
        if (operand instanceof ChildCount) {
            ChildCount count = (ChildCount)operand;
            SelectorName replacement = rewrittenSelectors.get(count.selectorName());
            if (replacement == null) return operand;
            return new ChildCount(replacement);
        }
        return operand;
    }
View Full Code Here

Examples of org.modeshape.jcr.query.model.ChildNode.selectorName()

            }
            return not;
        }
        if (constraint instanceof ChildNode) {
            ChildNode childNode = (ChildNode)constraint;
            return new ChildNode(childNode.selectorName(), childNode.getParentPath());
        }
        if (constraint instanceof DescendantNode) {
            DescendantNode descNode = (DescendantNode)constraint;
            return new DescendantNode(descNode.selectorName(), descNode.getAncestorPath());
        }
View Full Code Here

Examples of org.modeshape.jcr.query.model.Column.selectorName()

        AllNodes allNodes = new AllNodes(selector(alias));
        SelectorName oldName = this.source instanceof Selector ? ((Selector)source).name() : null;
        // Go through the columns and change the selector name to use the new alias ...
        for (int i = 0; i != columns.size(); ++i) {
            Column old = columns.get(i);
            if (old.selectorName().equals(oldName)) {
                columns.set(i, new Column(allNodes.aliasOrName(), old.getPropertyName(), old.getColumnName()));
            }
        }
        this.source = allNodes;
        return this;
View Full Code Here

Examples of org.modeshape.jcr.query.model.Column.selectorName()

        Selector selector = namedSelector(tableNameWithOptionalAlias);
        SelectorName oldName = this.source instanceof Selector ? ((Selector)source).name() : null;
        // Go through the columns and change the selector name to use the new alias ...
        for (int i = 0; i != columns.size(); ++i) {
            Column old = columns.get(i);
            if (old.selectorName().equals(oldName)) {
                columns.set(i, new Column(selector.aliasOrName(), old.getPropertyName(), old.getColumnName()));
            }
        }
        this.source = selector;
        return this;
View Full Code Here

Examples of org.modeshape.jcr.query.model.DescendantNode.selectorName()

    public void shouldParseConstraintFromStringWithIsDescendantNodeExpressionWithPathOnlyIfThereIsOneSelectorSource() {
        NamedSelector selector = new NamedSelector(selectorName("tableA"));
        Constraint constraint = parser.parseConstraint(tokens("ISDESCENDANTNODE('/a/b/c')"), typeSystem, selector);
        assertThat(constraint, is(instanceOf(DescendantNode.class)));
        DescendantNode descendant = (DescendantNode)constraint;
        assertThat(descendant.selectorName(), is(selectorName("tableA")));
        assertThat(descendant.getAncestorPath(), is("/a/b/c"));
    }

    @Test
    public void shouldParseConstraintFromStringWithIsDescendantNodeExpressionWithSelectorNameAndPath() {
View Full Code Here

Examples of org.modeshape.jcr.query.model.DescendantNode.selectorName()

        Constraint constraint = parser.parseConstraint(tokens("ISDESCENDANTNODE(tableA,'/a/b/c')"),
                                                       typeSystem,
                                                       mock(Source.class));
        assertThat(constraint, is(instanceOf(DescendantNode.class)));
        DescendantNode descendant = (DescendantNode)constraint;
        assertThat(descendant.selectorName(), is(selectorName("tableA")));
        assertThat(descendant.getAncestorPath(), is("/a/b/c"));
    }

    @Test( expected = ParsingException.class )
    public void shouldFailToParseConstraintFromStringWithIsDescendantNodeExpressionWithNoCommaAfterSelectorName() {
View Full Code Here

Examples of org.modeshape.jcr.query.model.FullTextSearch.selectorName()

        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"));
    }

    @Test
View Full Code Here

Examples of org.modeshape.jcr.query.model.FullTextSearch.selectorName()

        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")));
        assertThat(search1.getPropertyName(), is("p1"));
        assertThat(search1.fullTextSearchExpression(), is("term1"));

        assertThat(secondAnd.right(), is(instanceOf(FullTextSearch.class)));
        FullTextSearch search2 = (FullTextSearch)secondAnd.right();
View Full Code Here

Examples of org.modeshape.jcr.query.model.FullTextSearch.selectorName()

        assertThat(search1.getPropertyName(), is("p1"));
        assertThat(search1.fullTextSearchExpression(), is("term1"));

        assertThat(secondAnd.right(), is(instanceOf(FullTextSearch.class)));
        FullTextSearch search2 = (FullTextSearch)secondAnd.right();
        assertThat(search2.selectorName(), is(selectorName("tableA")));
        assertThat(search2.getPropertyName(), is("p2"));
        assertThat(search2.fullTextSearchExpression(), is("term2"));
    }

    @Test( expected = ParsingException.class )
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.