jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1344753 - in /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr: SessionDelegate.java query/QueryManagerImpl.java query/qom/QueryObjectModelImpl.java
Date Thu, 31 May 2012 14:44:09 GMT
Author: thomasm
Date: Thu May 31 14:44:09 2012
New Revision: 1344753

URL: http://svn.apache.org/viewvc?rev=1344753&view=rev
Log:
OAK-28 Query implementation

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionDelegate.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryManagerImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/qom/QueryObjectModelImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionDelegate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionDelegate.java?rev=1344753&r1=1344752&r2=1344753&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionDelegate.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionDelegate.java
Thu May 31 14:44:09 2012
@@ -362,7 +362,7 @@ public class SessionDelegate {
                     .createValue(id));
 
             Result result = getQueryEngine().executeQuery("SELECT * FROM [nt:base] WHERE
[jcr:uuid] = $id", Query.JCR_SQL2,
-                    getContentSession(), Long.MAX_VALUE, 0, bindings);
+                    getContentSession(), Long.MAX_VALUE, 0, bindings, namePathMapper);
 
             String path = null;
 

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryManagerImpl.java?rev=1344753&r1=1344752&r2=1344753&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryManagerImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryManagerImpl.java
Thu May 31 14:44:09 2012
@@ -39,6 +39,7 @@ import org.apache.jackrabbit.oak.api.Que
 import org.apache.jackrabbit.oak.api.Result;
 import org.apache.jackrabbit.oak.jcr.SessionDelegate;
 import org.apache.jackrabbit.oak.jcr.query.qom.QueryObjectModelFactoryImpl;
+import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 
 /**
  * The implementation of the corresponding JCR interface.
@@ -105,7 +106,8 @@ public class QueryManagerImpl implements
         try {
             HashMap<String, CoreValue> bindMap = convertMap(bindVariableMap);
             ContentSession s = sessionDelegate.getContentSession();
-            Result r = queryEngine.executeQuery(statement, language, s, limit, offset, bindMap);
+            NamePathMapper namePathMapper = sessionDelegate.getNamePathMapper();
+            Result r = queryEngine.executeQuery(statement, language, s, limit, offset, bindMap,
namePathMapper);
             return new QueryResultImpl(sessionDelegate, r);
         } catch (IllegalArgumentException e) {
             throw new InvalidQueryException(e);

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/qom/QueryObjectModelImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/qom/QueryObjectModelImpl.java?rev=1344753&r1=1344752&r2=1344753&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/qom/QueryObjectModelImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/qom/QueryObjectModelImpl.java
Thu May 31 14:44:09 2012
@@ -185,7 +185,7 @@ public class QueryObjectModelImpl implem
 
     @Override
     public Node storeAsNode(String absPath) throws RepositoryException {
-        Node n = queryManager.createQuery(getStatement(), Query.JCR_SQL2).
+        Node n = queryManager.createQuery(getStatement(), Query.JCR_JQOM).
                 storeAsNode(absPath);
         storedQueryPath = n.getPath();
         return n;



Mime
View raw message