jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1183013 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel: QueryProcessor.java RepositoryServiceImpl.java
Date Thu, 13 Oct 2011 17:54:11 GMT
Author: mduerig
Date: Thu Oct 13 17:54:10 2011
New Revision: 1183013

URL: http://svn.apache.org/viewvc?rev=1183013&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
query: use revision from session to for executing queries instead of head revision

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/QueryProcessor.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/QueryProcessor.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/QueryProcessor.java?rev=1183013&r1=1183012&r2=1183013&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/QueryProcessor.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/QueryProcessor.java
Thu Oct 13 17:54:10 2011
@@ -84,7 +84,7 @@ public class QueryProcessor {
         return new String[0];
     }
 
-    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language,
+    public QueryInfo executeQuery(SessionInfoImpl sessionInfo, String statement, String language,
             Map<String, String> namespaces, long limit, long offset, Map<String,
QValue> values)
             throws RepositoryException {
         
@@ -202,12 +202,11 @@ public class QueryProcessor {
                     " columnNames:" + Arrays.toString(columnNames) + " propertyNames:" +
Arrays.toString(selectorNames) + " propertyValue:" + propertyValue;
         }
 
-        public QueryInfo execute(SessionInfo sessionInfo) throws RepositoryException {
+        public QueryInfo execute(SessionInfoImpl sessionInfo) throws RepositoryException
{
             QueryInfoImpl result = new QueryInfoImpl(columnNames, selectorNames);
             if (index != null && index.propertyIndex != null) {
                 String v = propertyValue.length() == 0 ? null : propertyValue;
-                Iterator<String> paths = index.propertyIndex.getPaths(v, microKernel
-                        .getHeadRevision());  // todo is head revision correct here?
+                Iterator<String> paths = index.propertyIndex.getPaths(v, sessionInfo.getRevision());
                 while (paths.hasNext()) {
                     String path = paths.next();
                     path = path.substring(path.indexOf('/', 1));

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1183013&r1=1183012&r2=1183013&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Thu Oct 13 17:54:10 2011
@@ -591,8 +591,8 @@ public class RepositoryServiceImpl exten
             String language, Map<String, String> namespaces, long limit, long offset,
Map<String, QValue> values)
             throws RepositoryException {
 
-        checkSessionInfo(sessionInfo);
-        return queryProcessor.executeQuery(sessionInfo, statement, language, namespaces,
limit, offset, values);
+        return queryProcessor.executeQuery(sessionInfoImpl(sessionInfo), statement, language,
namespaces, limit,
+                offset, values);
     }
 
     @Override



Mime
View raw message