jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1297552 - in /jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query: NamespaceRegistryImpl.java ParserSQL2.java ParserXPath.java QueryManagerImpl.java
Date Tue, 06 Mar 2012 16:12:16 GMT
Author: thomasm
Date: Tue Mar  6 16:12:15 2012
New Revision: 1297552

URL: http://svn.apache.org/viewvc?rev=1297552&view=rev
Log:
Query implementation (WIP)

Removed:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/NamespaceRegistryImpl.java
Modified:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/ParserSQL2.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/ParserXPath.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/QueryManagerImpl.java

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/ParserSQL2.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/ParserSQL2.java?rev=1297552&r1=1297551&r2=1297552&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/ParserSQL2.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/ParserSQL2.java
Tue Mar  6 16:12:15 2012
@@ -40,7 +40,6 @@ import javax.jcr.query.qom.Source;
 import javax.jcr.query.qom.StaticOperand;
 import org.apache.jackrabbit.query.qom.QueryObjectModelFactoryImpl;
 import org.apache.jackrabbit.query.qom.QueryObjectModelImpl;
-import org.apache.jackrabbit.query.val.ExceptionFactory;
 
 /**
  * The SQL2 parser can convert a JCR-SQL2 query to a QueryObjectModel.
@@ -316,7 +315,7 @@ public class ParserSQL2 {
             if (readIf("IS")) {
                 read("NULL");
                 if (!(left instanceof PropertyValue)) {
-                    throw ExceptionFactory.repository(
+                    throw new RepositoryException(
                             "Only property values can be tested for NOT IS NULL; got: "
                             + left.getClass().getName());
                 }
@@ -944,7 +943,7 @@ public class ParserSQL2 {
         try {
             bd = new BigDecimal(sub);
         } catch (NumberFormatException e) {
-            throw ExceptionFactory.invalidQuery("Data conversion error converting " + sub
+ " to BigDecimal: " + e);
+            throw new RepositoryException("Data conversion error converting " + sub + " to
BigDecimal: " + e);
         }
         checkLiterals(false);
 

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/ParserXPath.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/ParserXPath.java?rev=1297552&r1=1297551&r2=1297552&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/ParserXPath.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/ParserXPath.java
Tue Mar  6 16:12:15 2012
@@ -18,23 +18,12 @@ package org.apache.jackrabbit.query;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
-import java.util.HashMap;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
 import javax.jcr.ValueFactory;
 import javax.jcr.query.InvalidQueryException;
-import javax.jcr.query.qom.BindVariableValue;
-import javax.jcr.query.qom.Column;
-import javax.jcr.query.qom.Constraint;
-import javax.jcr.query.qom.Ordering;
 import javax.jcr.query.qom.QueryObjectModel;
 import javax.jcr.query.qom.QueryObjectModelFactory;
-import javax.jcr.query.qom.Selector;
-import javax.jcr.query.qom.Source;
-import org.apache.jackrabbit.query.ParserSQL2.ColumnOrWildcard;
-import org.apache.jackrabbit.query.qom.QueryObjectModelFactoryImpl;
-import org.apache.jackrabbit.query.val.ExceptionFactory;
-import org.apache.jackrabbit.query.val.ValueFactoryImpl;
 
 
 /**
@@ -421,7 +410,7 @@ public class ParserXPath {
         try {
             bd = new BigDecimal(sub);
         } catch (NumberFormatException e) {
-            throw ExceptionFactory.invalidQuery("Data conversion error converting " + sub
+ " to BigDecimal: " + e);
+            throw new InvalidQueryException("Data conversion error converting " + sub + "
to BigDecimal: " + e);
         }
         checkLiterals(false);
 

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/QueryManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/QueryManagerImpl.java?rev=1297552&r1=1297551&r2=1297552&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/QueryManagerImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/query/QueryManagerImpl.java
Tue Mar  6 16:12:15 2012
@@ -18,12 +18,12 @@ package org.apache.jackrabbit.query;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
+import javax.jcr.ValueFactory;
 import javax.jcr.query.InvalidQueryException;
 import javax.jcr.query.Query;
 import javax.jcr.query.QueryManager;
 import javax.jcr.query.qom.QueryObjectModel;
 import org.apache.jackrabbit.query.qom.QueryObjectModelFactoryImpl;
-import org.apache.jackrabbit.query.val.ValueFactoryImpl;
 /**
  * The implementation of the corresponding JCR interface.
  */
@@ -41,7 +41,7 @@ public class QueryManagerImpl implements
         Query.XPATH
     };
 
-    public QueryManagerImpl(QueryObjectModelFactoryImpl qomFactory, ValueFactoryImpl valueFactory)
{
+    public QueryManagerImpl(QueryObjectModelFactoryImpl qomFactory, ValueFactory valueFactory)
{
         this.qomFactory = qomFactory;
         parserSQL2 = new ParserSQL2(qomFactory, valueFactory);
         parserXPath = new ParserXPath(qomFactory, valueFactory);



Mime
View raw message