Package org.apache.jackrabbit.core.query.lucene

Examples of org.apache.jackrabbit.core.query.lucene.JahiaLuceneQueryFactoryImpl


    @Override
    public void init(SessionContext sessionContext, QueryHandler handler, QueryObjectModelTree qomTree, String language, Node node) throws InvalidQueryException, RepositoryException {
        super.init(sessionContext, handler, qomTree, language, node);    //To change body of overridden methods use File | Settings | File Templates.

        this.lqf = new JahiaLuceneQueryFactoryImpl(sessionContext.getSessionImpl(), (SearchIndex) handler,
                variables);

    }
View Full Code Here


        List<JCRNodeWrapper> results = new ArrayList<JCRNodeWrapper>();
        QueryManager queryManager = session.getProviderSession(this).getWorkspace().getQueryManager();
        if (queryManager != null) {
            Query q = queryManager.createQuery(sql, Query.JCR_SQL2);
            if (q instanceof JahiaQueryObjectModelImpl) {
                JahiaLuceneQueryFactoryImpl lqf = (JahiaLuceneQueryFactoryImpl) ((JahiaQueryObjectModelImpl) q)
                        .getLuceneQueryFactory();

                lqf.setProvider(this);
                lqf.setJcrSession(session);
            }
            QueryResult qr = q.execute();
            NodeIterator ni = qr.getNodes();
            while (ni.hasNext()) {
                Node folder = ni.nextNode();
View Full Code Here

            if ("createQuery".equals(method.getName())) {
                final QueryObjectModel qom = ServicesRegistry.getInstance().getQueryService().modifyAndOptimizeQuery(
                        (Source) args[0], (Constraint) args[1], (Ordering[]) args[2], (Column[]) args[3],
                        underlying, session);
                if (provider.isDefault() && qom instanceof JahiaQueryObjectModelImpl) {
                    JahiaLuceneQueryFactoryImpl lqf = (JahiaLuceneQueryFactoryImpl) ((JahiaQueryObjectModelImpl) qom)
                            .getLuceneQueryFactory();
                   
                    lqf.setProvider(provider);
                    lqf.setJcrSession(session);
                }               
                return Proxy.newProxyInstance(qom.getClass().getClassLoader(), new Class[] { QueryObjectModel.class },
                        new QOMInvocationHandler(qom, provider));
            } else {
                try {
View Full Code Here

                    if (Query.JCR_SQL2.equals(language)) {
                        query = QueryServiceImpl.getInstance().modifyAndOptimizeQuery(
                                (QueryObjectModel) query, qm.getQOMFactory(), session);
                    }
                    if (query instanceof JahiaQueryObjectModelImpl) {
                        JahiaLuceneQueryFactoryImpl lqf = (JahiaLuceneQueryFactoryImpl) ((JahiaQueryObjectModelImpl) query)
                                .getLuceneQueryFactory();
                       
                        lqf.setProvider(jcrStoreProvider);
                        lqf.setJcrSession(session);
                    }
                }
                queries.put(jcrStoreProvider, query);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.query.lucene.JahiaLuceneQueryFactoryImpl

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.