Search in sources :

Example 46 with DyadicExpression

use of org.datanucleus.query.expression.DyadicExpression in project tests by datanucleus.

the class JDOQLCompilerTest method testFilterCollectionContainsVariablePlusExtraJoin.

/**
 * Tests for collection.contains(element) && elem.other.field == val.
 */
public void testFilterCollectionContainsVariablePlusExtraJoin() {
    JavaQueryCompiler compiler = null;
    QueryCompilation compilation = null;
    try {
        compiler = new JDOQLCompiler(nucCtx, nucCtx.getClassLoaderResolver(null), null, Inventory.class, null, "products.contains(element) && element.guarantee.numberOfYears < 3", null, null, null, null, null, null, Product.class.getName() + " element", null);
        compilation = compiler.compile(new HashMap(), null);
    } catch (NucleusException ne) {
        NucleusLogger.QUERY.error("Exception thrown during compilation", ne);
        fail("compilation of filter with valid field threw exception : " + ne.getMessage());
    }
    Expression expr = compilation.getExprFilter();
    assertTrue("Compiled expression should have been DyadicExpression but wasnt", expr instanceof DyadicExpression);
    DyadicExpression dyExpr = (DyadicExpression) expr;
    LOG.info(">> expr=" + dyExpr);
    // product.contains(element)
    assertTrue("Left expression should have been InvokeExpression but wasnt", dyExpr.getLeft() instanceof InvokeExpression);
    InvokeExpression leftExpr = (InvokeExpression) dyExpr.getLeft();
    assertTrue("InvokeExpression should have been invoked on PrimaryExpression but wasnt", leftExpr.getLeft() instanceof PrimaryExpression);
    assertEquals("Left expression : Name of field upon which we invoke the method was wrong", "products", ((PrimaryExpression) leftExpr.getLeft()).getId());
    assertEquals("Left expression : Name of invoked method was wrong", "contains", leftExpr.getOperation());
    assertEquals("Left expression : Number of parameters to contains() is wrong", 1, leftExpr.getArguments().size());
    Object param1 = leftExpr.getArguments().get(0);
    assertTrue("Left expression : Parameter1 to contains() is of wrong type", param1 instanceof VariableExpression);
    VariableExpression vrExpr = (VariableExpression) param1;
    assertEquals("Left expression : Name of variable to contains() is incorrect", "element", vrExpr.getId());
    // element.guarantee.numberOfYears < 3
    assertTrue("Right expression should have been DyadicExpression but wasnt", dyExpr.getRight() instanceof DyadicExpression);
    DyadicExpression rightExpr = (DyadicExpression) dyExpr.getRight();
    assertTrue("Right expression (left) should have been PrimaryExpression but wasnt", rightExpr.getLeft() instanceof PrimaryExpression);
    PrimaryExpression rightExprLeft = (PrimaryExpression) rightExpr.getLeft();
    assertTrue("Right expression (left).left is of incorrect type", rightExprLeft.getLeft() instanceof VariableExpression);
    VariableExpression rightExprLeftLeft = (VariableExpression) rightExprLeft.getLeft();
    assertTrue("Right expression (left).left is of incorrect type", rightExprLeft.getLeft() instanceof VariableExpression);
    assertEquals("Right expression (left) part1 is incorrect", "element", rightExprLeftLeft.getId());
    assertEquals("Right expression (left) has incorrect number of tuples", 2, rightExprLeft.getTuples().size());
    assertEquals("Right expression (left) part2 is incorrect", "guarantee", rightExprLeft.getTuples().get(0));
    assertEquals("Right expression (left) part2 is incorrect", "numberOfYears", rightExprLeft.getTuples().get(1));
    assertEquals("Right expression : Operator between left and right is incorrect", Expression.OP_LT, rightExpr.getOperator());
    assertTrue("Right expression (right) should have been Literal but wasnt", rightExpr.getRight() instanceof Literal);
    Literal rightExprRight = (Literal) rightExpr.getRight();
    assertEquals("Right expression (right) literal has incorrect value", 3, ((Long) rightExprRight.getLiteral()).longValue());
    // Check symbols
    SymbolTable symbols = compilation.getSymbolTable();
    assertTrue("Symbol table doesnt have entry for 'element'", symbols.hasSymbol("element"));
    assertTrue("Symbol table doesnt have entry for 'this'", symbols.hasSymbol("this"));
    Symbol sy1 = symbols.getSymbol("element");
    assertEquals("Type of symbol for 'element' is wrong", Product.class, sy1.getValueType());
    Symbol sy2 = symbols.getSymbol("this");
    assertEquals("Type of symbol for 'this' is wrong", Inventory.class, sy2.getValueType());
}
Also used : JDOQLCompiler(org.datanucleus.query.compiler.JDOQLCompiler) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) HashMap(java.util.HashMap) Symbol(org.datanucleus.query.compiler.Symbol) Product(org.datanucleus.samples.store.Product) SymbolTable(org.datanucleus.query.compiler.SymbolTable) VariableExpression(org.datanucleus.query.expression.VariableExpression) DyadicExpression(org.datanucleus.query.expression.DyadicExpression) JavaQueryCompiler(org.datanucleus.query.compiler.JavaQueryCompiler) DyadicExpression(org.datanucleus.query.expression.DyadicExpression) ParameterExpression(org.datanucleus.query.expression.ParameterExpression) Expression(org.datanucleus.query.expression.Expression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) VariableExpression(org.datanucleus.query.expression.VariableExpression) OrderExpression(org.datanucleus.query.expression.OrderExpression) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) Literal(org.datanucleus.query.expression.Literal) QueryCompilation(org.datanucleus.query.compiler.QueryCompilation) NucleusException(org.datanucleus.exceptions.NucleusException) Inventory(org.datanucleus.samples.store.Inventory)

Example 47 with DyadicExpression

use of org.datanucleus.query.expression.DyadicExpression in project tests by datanucleus.

the class JDOQLCompilerTest method testFilterExplicitParameter.

/**
 * Test for use of an explicit parameter in the filter.
 */
public void testFilterExplicitParameter() {
    // Test use of implicit variable in filter
    JavaQueryCompiler compiler = null;
    QueryCompilation compilation = null;
    try {
        compiler = new JDOQLCompiler(nucCtx, nucCtx.getClassLoaderResolver(null), null, Product.class, null, "name == param1", null, null, null, null, null, "java.lang.String param1", null, null);
        compilation = compiler.compile(null, null);
    } catch (NucleusUserException ne) {
        // TODO Debatable if this should throw a JDOUserException since the "notaField" is not bound, nor typed
        NucleusLogger.QUERY.error("Exception thrown during compilation", ne);
        fail("compilation of filter with valid field threw exception : " + ne.getMessage());
    }
    Expression expr = compilation.getExprFilter();
    assertTrue("Compiled expression should have been DyadicExpression but wasnt", expr instanceof DyadicExpression);
    DyadicExpression dyExpr = (DyadicExpression) expr;
    assertTrue("Compiled left expression should be PrimaryExpression but isnt", dyExpr.getLeft() instanceof PrimaryExpression);
    assertTrue("Compiled right expression should be ParameterExpression but isnt", dyExpr.getRight() instanceof ParameterExpression);
    PrimaryExpression left = (PrimaryExpression) dyExpr.getLeft();
    assertEquals("Primary expression name is wrong", left.getId(), "name");
    ParameterExpression right = (ParameterExpression) dyExpr.getRight();
    assertEquals("ParameterExpression has wrong value", "param1", right.getId());
}
Also used : JDOQLCompiler(org.datanucleus.query.compiler.JDOQLCompiler) JavaQueryCompiler(org.datanucleus.query.compiler.JavaQueryCompiler) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) DyadicExpression(org.datanucleus.query.expression.DyadicExpression) ParameterExpression(org.datanucleus.query.expression.ParameterExpression) Expression(org.datanucleus.query.expression.Expression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) VariableExpression(org.datanucleus.query.expression.VariableExpression) OrderExpression(org.datanucleus.query.expression.OrderExpression) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) NucleusUserException(org.datanucleus.exceptions.NucleusUserException) ParameterExpression(org.datanucleus.query.expression.ParameterExpression) Product(org.datanucleus.samples.store.Product) QueryCompilation(org.datanucleus.query.compiler.QueryCompilation) DyadicExpression(org.datanucleus.query.expression.DyadicExpression)

Example 48 with DyadicExpression

use of org.datanucleus.query.expression.DyadicExpression in project tests by datanucleus.

the class JDOQLCompilerTest method testFilterComparisonWithAndOr.

/**
 * Tests for filter with field-literal comparison AND another comparison, and ORed with
 * another set of expressions.
 */
public void testFilterComparisonWithAndOr() {
    JavaQueryCompiler compiler = null;
    QueryCompilation compilation = null;
    try {
        compiler = new JDOQLCompiler(nucCtx, nucCtx.getClassLoaderResolver(null), null, Product.class, null, "(statusId == 2 && 100.0 > price) || (price >= 50 && price <= 95)", null, null, null, null, null, null, null, null);
        compilation = compiler.compile(null, null);
    } catch (NucleusException ne) {
        NucleusLogger.QUERY.error("Exception thrown during compilation", ne);
        fail("compilation of filter with valid field threw exception : " + ne.getMessage());
    }
    Expression expr = compilation.getExprFilter();
    assertTrue("Compiled expression should have been DyadicExpression but wasnt", expr instanceof DyadicExpression);
    DyadicExpression dyExpr = (DyadicExpression) expr;
    assertTrue("Compiled left expression should be DyadicExpression but isnt", dyExpr.getLeft() instanceof DyadicExpression);
    assertTrue("Compiled right expression should be DyadicExpression but isnt", dyExpr.getRight() instanceof DyadicExpression);
    DyadicExpression dyExpr1 = (DyadicExpression) dyExpr.getLeft();
    DyadicExpression dyExpr2 = (DyadicExpression) dyExpr.getRight();
    assertEquals("Operator between left and right is incorrect", Expression.OP_OR, dyExpr.getOperator());
    assertTrue("Compiled left(left) expression should be DyadicExpression but isnt", dyExpr1.getLeft() instanceof DyadicExpression);
    assertTrue("Compiled left(right) expression should be DyadicExpression but isnt", dyExpr1.getRight() instanceof DyadicExpression);
    DyadicExpression dyExpr1a = (DyadicExpression) dyExpr1.getLeft();
    DyadicExpression dyExpr1b = (DyadicExpression) dyExpr1.getRight();
    // 1a : statusId == 2
    assertTrue("Compiled left expression should be PrimaryExpression but isnt", dyExpr1a.getLeft() instanceof PrimaryExpression);
    assertTrue("Compiled right expression should be Literal but isnt", dyExpr1a.getRight() instanceof Literal);
    assertEquals("Operator between left (left and right) is incorrect", Expression.OP_EQ, dyExpr1a.getOperator());
    PrimaryExpression leftExpr1a = (PrimaryExpression) dyExpr1a.getLeft();
    assertEquals("Compiled left expression has incorrect number of tuples", 1, leftExpr1a.getTuples().size());
    assertEquals("Compiled left expression 'id' is incorrect", "statusId", leftExpr1a.getId());
    Literal rightExpr1a = (Literal) dyExpr1a.getRight();
    assertTrue("Compiled right expression literal is of incorrect type", rightExpr1a.getLiteral() instanceof Long);
    assertEquals("Compiled right expression literal has incorrect value", 2, ((Long) rightExpr1a.getLiteral()).longValue());
    // 1b : 100.0 > price
    assertTrue("Compiled right expression should be PrimaryExpression but isnt", dyExpr1b.getRight() instanceof PrimaryExpression);
    assertTrue("Compiled left expression should be Literal but isnt", dyExpr1b.getLeft() instanceof Literal);
    assertEquals("Operator between right (left and right) is incorrect", Expression.OP_GT, dyExpr1b.getOperator());
    PrimaryExpression rightExpr1b = (PrimaryExpression) dyExpr1b.getRight();
    assertEquals("Compiled left expression has incorrect number of tuples", 1, rightExpr1b.getTuples().size());
    assertEquals("Compiled left expression 'id' is incorrect", "price", rightExpr1b.getId());
    Literal leftExpr1b = (Literal) dyExpr1b.getLeft();
    // TODO Why BigDecimal and not Double??
    assertTrue("Compiled right expression literal is of incorrect type", leftExpr1b.getLiteral() instanceof BigDecimal);
    assertEquals("Compiled right expression literal has incorrect value", 100.0, ((BigDecimal) leftExpr1b.getLiteral()).longValue(), 0.1);
    assertTrue("Compiled right(left) expression should be DyadicExpression but isnt", dyExpr2.getLeft() instanceof DyadicExpression);
    assertTrue("Compiled right(right) expression should be DyadicExpression but isnt", dyExpr2.getRight() instanceof DyadicExpression);
    DyadicExpression dyExpr2a = (DyadicExpression) dyExpr2.getLeft();
    DyadicExpression dyExpr2b = (DyadicExpression) dyExpr2.getRight();
    // 2a : price >= 50
    assertTrue("Compiled left expression should be PrimaryExpression but isnt", dyExpr2a.getLeft() instanceof PrimaryExpression);
    assertTrue("Compiled right expression should be Literal but isnt", dyExpr2a.getRight() instanceof Literal);
    assertEquals("Operator between right (left and right) is incorrect", Expression.OP_GTEQ, dyExpr2a.getOperator());
    PrimaryExpression leftExpr2a = (PrimaryExpression) dyExpr2a.getLeft();
    assertEquals("Compiled left expression has incorrect number of tuples", 1, leftExpr2a.getTuples().size());
    assertEquals("Compiled left expression 'id' is incorrect", "price", leftExpr2a.getId());
    Literal rightExpr2a = (Literal) dyExpr2a.getRight();
    assertTrue("Compiled right expression literal is of incorrect type " + rightExpr2a.getLiteral().getClass().getName(), rightExpr2a.getLiteral() instanceof Long);
    assertEquals("Compiled right expression literal has incorrect value", 50.0, ((Long) rightExpr2a.getLiteral()).longValue(), 0.1);
    // 2b : price >= 50
    assertTrue("Compiled left expression should be PrimaryExpression but isnt", dyExpr2b.getLeft() instanceof PrimaryExpression);
    assertTrue("Compiled right expression should be Literal but isnt", dyExpr2b.getRight() instanceof Literal);
    assertEquals("Operator between right (left and right) is incorrect", Expression.OP_LTEQ, dyExpr2b.getOperator());
    PrimaryExpression leftExpr2b = (PrimaryExpression) dyExpr2b.getLeft();
    assertEquals("Compiled left expression has incorrect number of tuples", 1, leftExpr2b.getTuples().size());
    assertEquals("Compiled left expression 'id' is incorrect", "price", leftExpr2b.getId());
    Literal rightExpr2b = (Literal) dyExpr2b.getRight();
    assertTrue("Compiled right expression literal is of incorrect type", rightExpr2b.getLiteral() instanceof Long);
    assertEquals("Compiled right expression literal has incorrect value", 95.0, ((Long) rightExpr2b.getLiteral()).longValue(), 0.1);
}
Also used : JDOQLCompiler(org.datanucleus.query.compiler.JDOQLCompiler) JavaQueryCompiler(org.datanucleus.query.compiler.JavaQueryCompiler) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) DyadicExpression(org.datanucleus.query.expression.DyadicExpression) ParameterExpression(org.datanucleus.query.expression.ParameterExpression) Expression(org.datanucleus.query.expression.Expression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) VariableExpression(org.datanucleus.query.expression.VariableExpression) OrderExpression(org.datanucleus.query.expression.OrderExpression) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) Literal(org.datanucleus.query.expression.Literal) Product(org.datanucleus.samples.store.Product) QueryCompilation(org.datanucleus.query.compiler.QueryCompilation) NucleusException(org.datanucleus.exceptions.NucleusException) DyadicExpression(org.datanucleus.query.expression.DyadicExpression) BigDecimal(java.math.BigDecimal)

Example 49 with DyadicExpression

use of org.datanucleus.query.expression.DyadicExpression in project tests by datanucleus.

the class JDOQLCompilerTest method testFilterWithCast.

/**
 * Tests for "(cast)expr" in filter.
 */
public void testFilterWithCast() {
    JavaQueryCompiler compiler = null;
    QueryCompilation compilation = null;
    try {
        compiler = new JDOQLCompiler(nucCtx, nucCtx.getClassLoaderResolver(null), null, Product.class, null, "((Book)this).author == 'Tolkien'", null, null, null, null, null, null, null, null);
        compilation = compiler.compile(new HashMap(), null);
    } catch (NucleusException ne) {
        NucleusLogger.QUERY.error("Exception thrown during compilation", ne);
        fail("compilation of filter with valid field threw exception : " + ne.getMessage());
    }
    Expression expr = compilation.getExprFilter();
    assertTrue("Filter should be DyadicExpression but is " + expr, expr instanceof DyadicExpression);
    DyadicExpression dyExpr = (DyadicExpression) expr;
    Expression leftExpr = dyExpr.getLeft();
    assertTrue("Left side should be PrimaryExpression but is " + leftExpr, leftExpr instanceof PrimaryExpression);
    PrimaryExpression primExpr = (PrimaryExpression) leftExpr;
    assertTrue("PrimaryExpression should have left of CastExpression but is " + primExpr.getLeft(), primExpr.getLeft() instanceof DyadicExpression);
    DyadicExpression castDyExpr = (DyadicExpression) primExpr.getLeft();
    assertTrue("Cast DyadicExpression left should be PrimaryExpression", castDyExpr.getLeft() instanceof PrimaryExpression);
    assertTrue("Cast DyadicExpression right should be PrimaryExpression", castDyExpr.getRight() instanceof Literal);
    assertEquals("Cast class is incorrect", "Book", ((Literal) castDyExpr.getRight()).getLiteral());
    PrimaryExpression castPrimExpr = (PrimaryExpression) castDyExpr.getLeft();
    assertEquals("Expression being cast is incorrect", "this", castPrimExpr.getId());
    assertEquals("PrimaryExpression off cast is incorrect", "author", primExpr.getId());
    Expression rightExpr = dyExpr.getRight();
    assertTrue("Right side should be Literal but is " + rightExpr, rightExpr instanceof Literal);
    assertEquals("Right side literal value is incorrect", "Tolkien", ((Literal) rightExpr).getLiteral());
}
Also used : JDOQLCompiler(org.datanucleus.query.compiler.JDOQLCompiler) JavaQueryCompiler(org.datanucleus.query.compiler.JavaQueryCompiler) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) HashMap(java.util.HashMap) DyadicExpression(org.datanucleus.query.expression.DyadicExpression) ParameterExpression(org.datanucleus.query.expression.ParameterExpression) Expression(org.datanucleus.query.expression.Expression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) VariableExpression(org.datanucleus.query.expression.VariableExpression) OrderExpression(org.datanucleus.query.expression.OrderExpression) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) Literal(org.datanucleus.query.expression.Literal) Product(org.datanucleus.samples.store.Product) QueryCompilation(org.datanucleus.query.compiler.QueryCompilation) NucleusException(org.datanucleus.exceptions.NucleusException) DyadicExpression(org.datanucleus.query.expression.DyadicExpression)

Example 50 with DyadicExpression

use of org.datanucleus.query.expression.DyadicExpression in project tests by datanucleus.

the class JDOQLCompilerTest method testQueryCompilationSerializable.

/**
 * Test for serialisability of QueryCompilation.
 */
public void testQueryCompilationSerializable() {
    // Test use of implicit variable in filter
    JavaQueryCompiler compiler = null;
    QueryCompilation compilation = null;
    try {
        compiler = new JDOQLCompiler(nucCtx, nucCtx.getClassLoaderResolver(null), null, Product.class, null, "name == param1", null, null, null, null, null, "java.lang.String param1", null, null);
        compilation = compiler.compile(null, null);
    } catch (NucleusUserException ne) {
        // TODO Debatable if this should throw a JDOUserException since the "notaField" is not bound, nor typed
        NucleusLogger.QUERY.error("Exception thrown during compilation", ne);
        fail("compilation of filter with valid field threw exception : " + ne.getMessage());
    }
    try {
        try {
            // Serialise the Expression
            FileOutputStream fileStream = new FileOutputStream("compilation.ser");
            ObjectOutputStream os = new ObjectOutputStream(fileStream);
            os.writeObject(compilation);
            os.close();
        } catch (Exception e) {
            NucleusLogger.GENERAL.error(">> Exception in serialise", e);
            fail("Failed to serialise " + StringUtils.toJVMIDString(compilation));
        }
        try {
            // Deserialise the Expression
            FileInputStream fileInputStream = new FileInputStream("compilation.ser");
            ObjectInputStream oInputStream = new ObjectInputStream(fileInputStream);
            Object obj = oInputStream.readObject();
            if (obj instanceof QueryCompilation) {
                QueryCompilation compilation1 = (QueryCompilation) obj;
                Expression expr1 = compilation1.getExprFilter();
                assertTrue("Compiled expression should have been DyadicExpression but wasnt", expr1 instanceof DyadicExpression);
                DyadicExpression dyExpr1 = (DyadicExpression) expr1;
                assertTrue("Compiled left expression should be PrimaryExpression but isnt", dyExpr1.getLeft() instanceof PrimaryExpression);
                assertTrue("Compiled right expression should be ParameterExpression but isnt", dyExpr1.getRight() instanceof ParameterExpression);
                PrimaryExpression left1 = (PrimaryExpression) dyExpr1.getLeft();
                assertEquals("Primary expression name is wrong", left1.getId(), "name");
                ParameterExpression right1 = (ParameterExpression) dyExpr1.getRight();
                assertEquals("ParameterExpression has wrong value", "param1", right1.getId());
            } else {
                fail("Deserialised object is " + obj.getClass().getName() + " not QueryCompilation");
            }
            oInputStream.close();
        } catch (Exception e) {
            NucleusLogger.GENERAL.error(">> Exception in deserialise", e);
            fail("Failed to deserialise " + StringUtils.toJVMIDString(compilation));
        }
    } finally {
        // Delete the file
        File file = new File("compilation.ser");
        if (file.exists()) {
            file.delete();
        }
    }
}
Also used : JDOQLCompiler(org.datanucleus.query.compiler.JDOQLCompiler) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) NucleusUserException(org.datanucleus.exceptions.NucleusUserException) Product(org.datanucleus.samples.store.Product) ObjectOutputStream(java.io.ObjectOutputStream) DyadicExpression(org.datanucleus.query.expression.DyadicExpression) NucleusUserException(org.datanucleus.exceptions.NucleusUserException) NucleusException(org.datanucleus.exceptions.NucleusException) FileInputStream(java.io.FileInputStream) JavaQueryCompiler(org.datanucleus.query.compiler.JavaQueryCompiler) DyadicExpression(org.datanucleus.query.expression.DyadicExpression) ParameterExpression(org.datanucleus.query.expression.ParameterExpression) Expression(org.datanucleus.query.expression.Expression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) VariableExpression(org.datanucleus.query.expression.VariableExpression) OrderExpression(org.datanucleus.query.expression.OrderExpression) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) FileOutputStream(java.io.FileOutputStream) ParameterExpression(org.datanucleus.query.expression.ParameterExpression) QueryCompilation(org.datanucleus.query.compiler.QueryCompilation) File(java.io.File) ObjectInputStream(java.io.ObjectInputStream)

Aggregations

DyadicExpression (org.datanucleus.query.expression.DyadicExpression)51 InvokeExpression (org.datanucleus.query.expression.InvokeExpression)43 Expression (org.datanucleus.query.expression.Expression)42 PrimaryExpression (org.datanucleus.query.expression.PrimaryExpression)36 ParameterExpression (org.datanucleus.query.expression.ParameterExpression)34 Literal (org.datanucleus.query.expression.Literal)32 VariableExpression (org.datanucleus.query.expression.VariableExpression)30 NucleusException (org.datanucleus.exceptions.NucleusException)21 QueryCompilation (org.datanucleus.query.compiler.QueryCompilation)20 JavaQueryCompiler (org.datanucleus.query.compiler.JavaQueryCompiler)18 OrderExpression (org.datanucleus.query.expression.OrderExpression)13 BooleanExpression (javax.jdo.query.BooleanExpression)12 PersistableExpression (javax.jdo.query.PersistableExpression)12 JDOQLCompiler (org.datanucleus.query.compiler.JDOQLCompiler)12 Product (org.datanucleus.samples.store.Product)12 HashMap (java.util.HashMap)11 NumericExpression (javax.jdo.query.NumericExpression)9 ComparableExpression (javax.jdo.query.ComparableExpression)8 OrderExpression (javax.jdo.query.OrderExpression)8 NucleusUserException (org.datanucleus.exceptions.NucleusUserException)7