Package org.modeshape.jcr.query

Examples of org.modeshape.jcr.query.QueryBuilder$UpperBoundary


        executionContext = new ExecutionContext();
        typeSystem = executionContext.getValueFactories().getTypeSystem();
        repoCache = mock(RepositoryCache.class);
        workspaces = Collections.singleton("workspace");
        hints = new PlanHints();
        builder = new QueryBuilder(typeSystem);
        problems = new SimpleProblems();
        nodeTypes = mock(NodeTypes.class);
        indexDefns = mock(RepositoryIndexes.class);
        schemataBuilder = ImmutableSchemata.createBuilder(executionContext, nodeTypes);
        bufferMgr = new BufferManager(executionContext);
View Full Code Here


        // Define the schemata ...
        schemata = schemataBuilder.addTable("someTable", "column1", "column2", "column3")
                                  .addTable("otherTable", "columnA", "columnB").build();
        // Define the subquery command ...
        QueryCommand subquery = builder.select("columnA").from("otherTable").query();
        builder = new QueryBuilder(typeSystem);

        // Define the query command (which uses the subquery) ...
        query = builder.selectStar().from("someTable").where().path("someTable").isLike(subquery).end().query();
        initQueryContext();
        plan = planner.createPlan(queryContext, query);
View Full Code Here

                                  .addTable("otherTable", "columnA", "columnB").addTable("stillOther", "columnX", "columnY")
                                  .build();
        // Define the innermost subquery command ...
        QueryCommand subquery2 = builder.select("columnY").from("stillOther").where().propertyValue("stillOther", "columnX")
                                        .isLessThan().cast(3).asLong().end().query();
        builder = new QueryBuilder(typeSystem);

        // Define the outer subquery command ...
        QueryCommand subquery1 = builder.select("columnA").from("otherTable").where().propertyValue("otherTable", "columnB")
                                        .isEqualTo(subquery2).end().query();
        builder = new QueryBuilder(typeSystem);

        // Define the query command (which uses the subquery) ...
        query = builder.selectStar().from("someTable").where().path("someTable").isLike(subquery1).end().query();
        initQueryContext();
        plan = planner.createPlan(queryContext, query);
View Full Code Here

                                  .addTable("otherTable", "columnA", "columnB").addTable("stillOther", "columnX", "columnY")
                                  .build();
        // Define the first subquery command ...
        QueryCommand subquery1 = builder.select("columnA").from("otherTable").where().propertyValue("otherTable", "columnB")
                                        .isEqualTo("winner").end().query();
        builder = new QueryBuilder(typeSystem);

        // Define the second subquery command ...
        QueryCommand subquery2 = builder.select("columnY").from("stillOther").where().propertyValue("stillOther", "columnX")
                                        .isLessThan().cast(3).asLong().end().query();
        builder = new QueryBuilder(typeSystem);

        // Define the query command (which uses the subquery) ...
        query = builder.selectStar().from("someTable").where().path("someTable").isLike(subquery2).and()
                       .propertyValue("someTable", "column3").isInSubquery(subquery1).end().query();
        initQueryContext();
View Full Code Here

    public XPathToQueryTranslator( TypeSystem context,
                                   String query ) {
        this.query = query;
        this.typeSystem = context;
        this.builder = new QueryBuilder(this.typeSystem);
    }
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.query.QueryBuilder$UpperBoundary

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.