Examples of query()


Examples of org.apache.ibatis.executor.statement.StatementHandler.query()

  public List doQuery(MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler) throws SQLException {
    Configuration configuration = ms.getConfiguration();
    StatementHandler handler = configuration.newStatementHandler(this, ms, parameter, rowBounds, resultHandler);
    Statement stmt = prepareStatement(handler);
    return handler.query(stmt, resultHandler);
  }

  public List doFlushStatements()
      throws SQLException {
    for (Statement stmt : statementMap.values()) {
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore.query()

                setDocumentStore(mem).
                setAsyncDelay(0).
                getNodeStore();
        ns1.getClusterInfo().setLeaseTime(0);
        ns2.getClusterInfo().setLeaseTime(0);
        List<ClusterNodeInfoDocument> list = mem.query(
                Collection.CLUSTER_NODES, "0", "a", Integer.MAX_VALUE);
        assertEquals(2, list.size());
       
        assertNull(mem.getReadPreference());
        assertNull(mem.getWriteConcern());
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexLookup.query()

     */
    public Iterable<String> query(Filter filter, Iterable<String> nodeTypes) {
        final PropertyValue ntNames = PropertyValues.newName(nodeTypes);
        Property2IndexLookup lookup = new Property2IndexLookup(root);
        return Iterables.concat(
                lookup.query(filter, JCR_PRIMARYTYPE, ntNames),
                lookup.query(filter, JCR_MIXINTYPES, ntNames));
    }

}
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexLookup.query()

     * @return the matched paths (the result might contain duplicate entries)
     */
    public Iterable<String> query(Filter filter) {
        PropertyIndexLookup lookup = new PropertyIndexLookup(root);
        return Iterables.concat(
                lookup.query(filter, JCR_PRIMARYTYPE, newName(filter.getPrimaryTypes())),
                lookup.query(filter, JCR_MIXINTYPES, newName(filter.getMixinTypes())));
    }

}
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.property.strategy.OrderedContentMirrorStoreStrategy.query()

        int depth = 1;
        PropertyRestriction pr = plan.getPropertyRestriction();
        if (pr != null) {
            String propertyName = PathUtils.getName(pr.propertyName);
            depth = PathUtils.getDepth(pr.propertyName);
            paths = strategy.query(plan.getFilter(), propertyName,
                    plan.getDefinition(), pr, pathPrefix);
        }
        if (paths == null && sortOrder != null && !sortOrder.isEmpty()) {
            // we could be here if we have a query where the ORDER BY makes us play it.
            for (OrderEntry oe : sortOrder) {
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.solr.query.SolrQueryIndex.query()

        QueryIndex queryIndex = new SolrQueryIndex("solr", server, configuration);
        FilterImpl filter = new FilterImpl(null, null);
        filter.restrictPath("/newnode", Filter.PathRestriction.EXACT);
        filter.restrictProperty("prop", Operator.EQUAL,
                PropertyValues.newString("val"));
        Cursor cursor = queryIndex.query(filter, indexed);
        assertNotNull(cursor);
        assertTrue("no results found", cursor.hasNext());
        IndexRow next = cursor.next();
        assertNotNull("first returned item should not be null", next);
        assertEquals("/newnode", next.getPath());
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.QueryIndex.query()

        filter.restrictPath("/", Filter.PathRestriction.EXACT);
        filter.restrictProperty(
                "foo",
                Operator.EQUAL,
                MemoryValueFactory.INSTANCE.createValue("bar"));
        Cursor cursor = index.query(filter, null);
        assertTrue(cursor.next());
        assertEquals("/", cursor.currentPath());
        assertFalse(cursor.next());
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.QueryIndex.query()

        QueryIndex queryIndex = new SolrQueryIndex("solr", server, configuration);
        FilterImpl filter = new FilterImpl(null, null);
        filter.restrictPath("/newnode", Filter.PathRestriction.EXACT);
        filter.restrictProperty("prop", Operator.EQUAL,
                PropertyValues.newString("val"));
        Cursor cursor = queryIndex.query(filter, indexed);
        assertNotNull(cursor);
        assertTrue("no results found", cursor.hasNext());
        IndexRow next = cursor.next();
        assertNotNull("first returned item should not be null", next);
        assertEquals("/newnode", next.getPath());
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.QueryIndex.AdvancedQueryIndex.query()

        }
        IndexPlan p = plan.getIndexPlan();
        if (p != null) {
            p.setFilter(createFilter(false));
            AdvancedQueryIndex adv = (AdvancedQueryIndex) index;
            cursor = adv.query(p, rootState);
        } else {
            cursor = index.query(createFilter(false), rootState);
        }
    }
View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.persistence.KiWiReasoningConnection.query()

        try {

            // if there are further patterns, evaluate them; if the matched pattern was the only pattern, then
            // simply take the match as binding
            if(body.size() > 0) {
                bodyResult = connection.query(body,match,null,null,true);
            } else if(match != null) {
                bodyResult = new SingletonIteration<QueryResult, SQLException>(match);
            } else {
                bodyResult = new EmptyIteration<QueryResult, SQLException>();
            }
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.