Examples of selector()


Examples of javax.jcr.query.qom.QueryObjectModelFactory.selector()

     *
     * @throws Exception
     */
    public void testGetChildrenApiDirect() throws Exception {
        QueryObjectModelFactory qomf = qm.getQOMFactory();
        Source source1 = qomf.selector(NodeType.NT_BASE, "selector");
        Column[] columns = new Column[] { qomf.column("selector", null, null) };
        Constraint constraint2 = qomf.childNode("selector", n1.getPath());
        QueryObjectModel qom = qomf.createQuery(source1, constraint2, null,
                columns);
        checkResult(qom.execute(), 2);
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModelFactory.selector()

     * @throws Exception
     */
    public void testGetChildrenApiStatement() throws Exception {

        QueryObjectModelFactory qomf = qm.getQOMFactory();
        Source source1 = qomf.selector(NodeType.NT_BASE, "selector");
        Column[] columns = new Column[] { qomf.column("selector", null, null) };
        Constraint constraint2 = qomf.childNode("selector", n1.getPath());
        QueryObjectModel qom = qomf.createQuery(source1, constraint2, null,
                columns);
        checkResult(executeSQL2Query(qom.getStatement()), 2);
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModelFactory.selector()

    // query Trash Structure 2
    QueryObjectModelFactory fac = session.getWorkspace().getQueryManager().getQOMFactory();
    final String selectorName = "selector"; //$NON-NLS-1$

    // selector
    final Selector selector = fac.selector( "nt:base", selectorName ); //$NON-NLS-1$
    // constraint1
    Constraint origParentFolderPathConstraint =
        fac.comparison( fac.propertyValue( selectorName, pentahoJcrConstants.getPHO_ORIGPARENTFOLDERPATH() ),
            QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, fac.literal( session.getValueFactory().createValue(
                origParentFolderPath ) ) );
View Full Code Here

Examples of javax.jcr.query.qom.QueryObjectModelFactory.selector()

    final QueryObjectModel queryObjectModel = mock( QueryObjectModel.class );

    final QueryObjectModelFactory qomFactory = mock( QueryObjectModelFactory.class );
    when( qomFactory.createQuery( Matchers.<Source>any(), Matchers.<Constraint>any(), Matchers.<Ordering[]>any(), Matchers.<Column[]>any() ) ).thenReturn( queryObjectModel );
    when( qomFactory.selector( anyString(), anyString() ) ).thenReturn( selector );

    final QueryResult queryResult = mock( QueryResult.class );
    when( queryResult.getNodes() ).thenReturn( nodeIterator );

    final Query query = mock( Query.class );
View Full Code Here

Examples of org.exolab.jms.selector.parser.SelectorParser.selector()

                    new StringReader(expression));
                lexer.initialise();

                SelectorParser parser = new SelectorParser(lexer);
                parser.initialise();
                parser.selector(); // start parsing at the selector rule

                SelectorTreeParser builder = new SelectorTreeParser();
                builder.initialise(new DefaultExpressionFactory());
                _evaluator = builder.selector(parser.getAST());
            }
View Full Code Here

Examples of org.exolab.jms.selector.parser.SelectorTreeParser.selector()

                parser.initialise();
                parser.selector(); // start parsing at the selector rule

                SelectorTreeParser builder = new SelectorTreeParser();
                builder.initialise(new DefaultExpressionFactory());
                _evaluator = builder.selector(parser.getAST());
            }
        } catch (Exception exception) {
            throw new InvalidSelectorException(exception.toString());
        }
    }
View Full Code Here

Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForSwitch.selector()

  @Override
  protected void compileBody() throws CompilerException
  {
    final ExpressionNodeForSwitch switchNode = (ExpressionNodeForSwitch) node();
    numericCompiler().compileInt( switchNode.selector() );

    int nCases = switchNode.numberOfCases();
    if (nCases > 0) {
      final int[] switchValues = new int[ nCases ];
      final ExpressionNodeForSwitchCase[] switchValueCases = new ExpressionNodeForSwitchCase[ nCases ];
View Full Code Here

Examples of org.metagrid.gatekeeper.test.CountedNodeServer.selector()

            //
            // Our node server.
            NodeServer<Node> server= new CountedNodeServer();
            //
            // Our node selector
            NodeFactory<Node> selector = server.selector();
            //
            // Our node creator.
            XMLNodeReader<Node> creator = new XMLNodeReaderImpl<Node>(
                server.creator()
                );
View Full Code Here

Examples of org.modeshape.jcr.api.query.qom.QueryObjectModelFactory.selector()

                                                   boolean propertyValue ) throws RepositoryException {
        QueryObjectModelFactory qomFactory = session.getWorkspace().getQueryManager().getQOMFactory();
        ValueFactory valueFactory = session.getValueFactory();
        Value propertyValueObj = valueFactory.createValue(propertyValue);

        Selector selector = qomFactory.selector("notion:typed", "node");
        Constraint constraint = null;
        if (propertyName != null && operator != null) {
            PropertyValue propValue = qomFactory.propertyValue("node", propertyName);
            Literal literal = qomFactory.literal(propertyValueObj);
            constraint = qomFactory.comparison(propValue, operator, literal);
View Full Code Here

Examples of org.modeshape.jcr.api.query.qom.QueryObjectModelFactory.selector()

    @FixFor( "MODE-1611" )
    @Test
    public void shouldAllowQomUseOfIsChildNodeInWhereClause() throws RepositoryException {
        QueryObjectModelFactory qomFactory = session.getWorkspace().getQueryManager().getQOMFactory();

        Selector selector = qomFactory.selector("nt:base", "category");
        ChildNode childNodeConstraint = qomFactory.childNode("category", "/Cars");
        Constraint constraint = childNodeConstraint;
        Column[] columns = new Column[0];
        Ordering[] orderings = null;
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.