Search in sources :

Example 66 with PrimaryExpression

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

the class JPQLCompilerTest method testFilterComparison.

/**
 * Tests for simple field-literal comparison in filter.
 */
public void testFilterComparison() {
    JavaQueryCompiler compiler = null;
    QueryCompilation compilation = null;
    try {
        compiler = new JPQLCompiler(nucCtx, nucCtx.getClassLoaderResolver(null), null, Project.class, null, "budget = 2", null, null, null, null, null, null, null);
        compilation = compiler.compile(new HashMap(), null);
    } catch (NucleusException ne) {
        NucleusLogger.QUERY.error("Exception during compile", 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 Literal but isnt", dyExpr.getRight() instanceof Literal);
    assertEquals("Operator between left and right is incorrect", Expression.OP_EQ, dyExpr.getOperator());
    PrimaryExpression leftExpr1 = (PrimaryExpression) dyExpr.getLeft();
    assertEquals("Compiled left expression has incorrect number of tuples", 1, leftExpr1.getTuples().size());
    assertEquals("Compiled left expression 'id' is incorrect", "budget", leftExpr1.getId());
    Literal rightExpr1 = (Literal) dyExpr.getRight();
    assertTrue("Compiled right expression literal is of incorrect type", rightExpr1.getLiteral() instanceof Long);
    assertEquals("Compiled right expression literal has incorrect value", 2, ((Long) rightExpr1.getLiteral()).longValue());
    try {
        compiler = new JPQLCompiler(nucCtx, nucCtx.getClassLoaderResolver(null), null, Project.class, null, "100.0 > budget", null, null, null, null, null, null, null);
    } catch (NucleusException ne) {
        NucleusLogger.QUERY.error("Exception during compile", ne);
        fail("compilation of filter with valid field threw exception : " + ne.getMessage());
    }
    compilation = compiler.compile(new HashMap(), null);
    expr = compilation.getExprFilter();
    assertTrue("Compiled expression should have been DyadicExpression but wasnt", expr instanceof DyadicExpression);
    dyExpr = (DyadicExpression) expr;
    assertTrue("Compiled right expression should be PrimaryExpression but isnt", dyExpr.getRight() instanceof PrimaryExpression);
    assertTrue("Compiled left expression should be Literal but isnt", dyExpr.getLeft() instanceof Literal);
    assertEquals("Operator between left and right is incorrect", Expression.OP_GT, dyExpr.getOperator());
    PrimaryExpression rightExpr2 = (PrimaryExpression) dyExpr.getRight();
    assertEquals("Compiled left expression has incorrect number of tuples", 1, rightExpr2.getTuples().size());
    assertEquals("Compiled left expression 'id' is incorrect", "budget", rightExpr2.getId());
    Literal leftExpr2 = (Literal) dyExpr.getLeft();
    // TODO Why BigDecimal and not Double??
    assertTrue("Compiled right expression literal is of incorrect type", leftExpr2.getLiteral() instanceof BigDecimal);
    assertEquals("Compiled right expression literal has incorrect value", 100.0, ((BigDecimal) leftExpr2.getLiteral()).longValue(), 0.1);
}
Also used : Project(org.datanucleus.samples.annotations.models.company.Project) JavaQueryCompiler(org.datanucleus.query.compiler.JavaQueryCompiler) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) HashMap(java.util.HashMap) SubqueryExpression(org.datanucleus.query.expression.SubqueryExpression) DyadicExpression(org.datanucleus.query.expression.DyadicExpression) JoinExpression(org.datanucleus.query.expression.JoinExpression) ClassExpression(org.datanucleus.query.expression.ClassExpression) ParameterExpression(org.datanucleus.query.expression.ParameterExpression) Expression(org.datanucleus.query.expression.Expression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) VariableExpression(org.datanucleus.query.expression.VariableExpression) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) Literal(org.datanucleus.query.expression.Literal) QueryCompilation(org.datanucleus.query.compiler.QueryCompilation) NucleusException(org.datanucleus.exceptions.NucleusException) JPQLCompiler(org.datanucleus.query.compiler.JPQLCompiler) DyadicExpression(org.datanucleus.query.expression.DyadicExpression) BigDecimal(java.math.BigDecimal)

Example 67 with PrimaryExpression

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

the class JPQLCompilerTest method testFromInExpression.

/**
 * Tests for from clause with an "IN(...) alias" expression.
 */
public void testFromInExpression() {
    JavaQueryCompiler compiler = null;
    QueryCompilation compilation = null;
    try {
        compiler = new JPQLCompiler(nucCtx, nucCtx.getClassLoaderResolver(null), Department.class.getName() + " d, IN(d.projects) n", null, null, null, null, null, null, null, null, null, null);
        compilation = compiler.compile(new HashMap(), null);
    } catch (NucleusException ne) {
        NucleusLogger.QUERY.error("Exception during compile", ne);
        fail("compilation of filter with valid field threw exception : " + ne.getMessage());
    }
    SymbolTable symtbl = compilation.getSymbolTable();
    Expression[] exprs = compilation.getExprFrom();
    assertEquals("Number of from expressions is incorrect", 2, exprs.length);
    // Candidate clause
    assertTrue("FROM candidate clause is of wrong type " + exprs[0].getClass().getName(), exprs[0] instanceof ClassExpression);
    ClassExpression clsExpr0 = (ClassExpression) exprs[0];
    assertEquals("FROM candidate clause alias is wrong", "d", clsExpr0.getAlias());
    Symbol clsSym0 = symtbl.getSymbol(clsExpr0.getAlias());
    assertEquals("FROM candidate clause class is wrong", Department.class, clsSym0.getValueType());
    assertEquals("FROM candidate clause has incorrect left()", null, clsExpr0.getLeft());
    assertEquals("FROM candidate clause has incorrect right()", null, clsExpr0.getRight());
    // Candidate+IN clause
    assertTrue("FROM candidate+IN clause is of wrong type " + exprs[1].getClass().getName(), exprs[1] instanceof ClassExpression);
    ClassExpression clsExpr1 = (ClassExpression) exprs[1];
    assertEquals("FROM candidate+IN clause alias is wrong", "d", clsExpr1.getAlias());
    Symbol clsSym1 = symtbl.getSymbol(clsExpr1.getAlias());
    assertEquals("FROM candidate+IN clause class is wrong", Department.class, clsSym1.getValueType());
    assertEquals("FROM candidate+IN clause has incorrect left()", null, clsExpr1.getLeft());
    assertTrue("FROM candidate+IN clause has incorrect right() - should be instanceof JoinExpression", clsExpr1.getRight() instanceof JoinExpression);
    JoinExpression joinExpr1 = (JoinExpression) clsExpr1.getRight();
    assertEquals("FROM candidate+IN clause join expression has incorrect alias", "n", joinExpr1.getAlias());
    assertEquals("FROM candidate+IN clause join expression has incorrect join type", JoinType.JOIN_INNER, joinExpr1.getType());
    PrimaryExpression joinPrimExpr1 = (PrimaryExpression) joinExpr1.getJoinedExpression();
    assertEquals("FROM candidate+IN clause join primary expression is incorrect", "d.projects", joinPrimExpr1.getId());
}
Also used : PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) HashMap(java.util.HashMap) Symbol(org.datanucleus.query.compiler.Symbol) SymbolTable(org.datanucleus.query.compiler.SymbolTable) ClassExpression(org.datanucleus.query.expression.ClassExpression) Department(org.datanucleus.samples.annotations.models.company.Department) JavaQueryCompiler(org.datanucleus.query.compiler.JavaQueryCompiler) SubqueryExpression(org.datanucleus.query.expression.SubqueryExpression) DyadicExpression(org.datanucleus.query.expression.DyadicExpression) JoinExpression(org.datanucleus.query.expression.JoinExpression) ClassExpression(org.datanucleus.query.expression.ClassExpression) ParameterExpression(org.datanucleus.query.expression.ParameterExpression) Expression(org.datanucleus.query.expression.Expression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) VariableExpression(org.datanucleus.query.expression.VariableExpression) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) JoinExpression(org.datanucleus.query.expression.JoinExpression) QueryCompilation(org.datanucleus.query.compiler.QueryCompilation) NucleusException(org.datanucleus.exceptions.NucleusException) JPQLCompiler(org.datanucleus.query.compiler.JPQLCompiler)

Example 68 with PrimaryExpression

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

the class JPQLCompilerTest method testFilterComparisonWithAnd.

/**
 * Tests for simple field-literal comparison in filter and AND of another comparison.
 */
public void testFilterComparisonWithAnd() {
    JavaQueryCompiler compiler = null;
    QueryCompilation compilation = null;
    try {
        compiler = new JPQLCompiler(nucCtx, nucCtx.getClassLoaderResolver(null), null, Project.class, null, "budget = 2 AND 'Sales' = name", null, null, null, null, null, null, null);
        compilation = compiler.compile(new HashMap(), null);
    } catch (NucleusException ne) {
        NucleusLogger.QUERY.error("Exception during compile", 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_AND, dyExpr.getOperator());
    assertTrue("Compiled left expression should be PrimaryExpression but isnt", dyExpr1.getLeft() instanceof PrimaryExpression);
    assertTrue("Compiled right expression should be Literal but isnt", dyExpr1.getRight() instanceof Literal);
    assertEquals("Operator between left (left and right) is incorrect", Expression.OP_EQ, dyExpr1.getOperator());
    PrimaryExpression leftExpr1 = (PrimaryExpression) dyExpr1.getLeft();
    assertEquals("Compiled left expression has incorrect number of tuples", 1, leftExpr1.getTuples().size());
    assertEquals("Compiled left expression 'id' is incorrect", "budget", leftExpr1.getId());
    Literal rightExpr1 = (Literal) dyExpr1.getRight();
    assertTrue("Compiled right expression literal is of incorrect type", rightExpr1.getLiteral() instanceof Long);
    assertEquals("Compiled right expression literal has incorrect value", 2, ((Long) rightExpr1.getLiteral()).longValue());
    assertTrue("Compiled right expression should be PrimaryExpression but isnt", dyExpr2.getRight() instanceof PrimaryExpression);
    assertTrue("Compiled left expression should be Literal but isnt", dyExpr2.getLeft() instanceof Literal);
    assertEquals("Operator between right (left and right) is incorrect", Expression.OP_EQ, dyExpr2.getOperator());
    PrimaryExpression rightExpr2 = (PrimaryExpression) dyExpr2.getRight();
    assertEquals("Compiled left expression has incorrect number of tuples", 1, rightExpr2.getTuples().size());
    assertEquals("Compiled left expression 'id' is incorrect", "name", rightExpr2.getId());
    Literal leftExpr2 = (Literal) dyExpr2.getLeft();
    assertTrue("Compiled right expression literal is of incorrect type", leftExpr2.getLiteral() instanceof String);
    assertEquals("Compiled right expression literal has incorrect value", "Sales", ((String) leftExpr2.getLiteral()));
}
Also used : Project(org.datanucleus.samples.annotations.models.company.Project) JavaQueryCompiler(org.datanucleus.query.compiler.JavaQueryCompiler) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) HashMap(java.util.HashMap) SubqueryExpression(org.datanucleus.query.expression.SubqueryExpression) DyadicExpression(org.datanucleus.query.expression.DyadicExpression) JoinExpression(org.datanucleus.query.expression.JoinExpression) ClassExpression(org.datanucleus.query.expression.ClassExpression) ParameterExpression(org.datanucleus.query.expression.ParameterExpression) Expression(org.datanucleus.query.expression.Expression) InvokeExpression(org.datanucleus.query.expression.InvokeExpression) VariableExpression(org.datanucleus.query.expression.VariableExpression) PrimaryExpression(org.datanucleus.query.expression.PrimaryExpression) Literal(org.datanucleus.query.expression.Literal) QueryCompilation(org.datanucleus.query.compiler.QueryCompilation) NucleusException(org.datanucleus.exceptions.NucleusException) JPQLCompiler(org.datanucleus.query.compiler.JPQLCompiler) DyadicExpression(org.datanucleus.query.expression.DyadicExpression)

Example 69 with PrimaryExpression

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

the class JDOQLCompilerTest method testExpressionSerializable.

/**
 * Test for serialisability of Expressions.
 */
public void testExpressionSerializable() {
    // 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());
    try {
        try {
            // Serialise the Expression
            FileOutputStream fileStream = new FileOutputStream("expr.ser");
            ObjectOutputStream os = new ObjectOutputStream(fileStream);
            os.writeObject(expr);
            os.close();
        } catch (Exception e) {
            NucleusLogger.GENERAL.error(">> Exception in serialise", e);
            fail("Failed to serialise " + StringUtils.toJVMIDString(expr));
        }
        try {
            // Deserialise the Expression
            FileInputStream fileInputStream = new FileInputStream("expr.ser");
            ObjectInputStream oInputStream = new ObjectInputStream(fileInputStream);
            Object obj = oInputStream.readObject();
            if (obj instanceof Expression) {
                Expression expr1 = (Expression) obj;
                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 Expression");
            }
            oInputStream.close();
        } catch (Exception e) {
            NucleusLogger.GENERAL.error(">> Exception in deserialise", e);
            fail("Failed to deserialise " + StringUtils.toJVMIDString(expr));
        }
    } finally {
        // Delete the file
        File file = new File("expr.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) ParameterExpression(org.datanucleus.query.expression.ParameterExpression) FileOutputStream(java.io.FileOutputStream) QueryCompilation(org.datanucleus.query.compiler.QueryCompilation) File(java.io.File) ObjectInputStream(java.io.ObjectInputStream)

Example 70 with PrimaryExpression

use of org.datanucleus.query.expression.PrimaryExpression 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)

Aggregations

PrimaryExpression (org.datanucleus.query.expression.PrimaryExpression)77 ParameterExpression (org.datanucleus.query.expression.ParameterExpression)73 Literal (org.datanucleus.query.expression.Literal)60 NucleusException (org.datanucleus.exceptions.NucleusException)59 InvokeExpression (org.datanucleus.query.expression.InvokeExpression)54 VariableExpression (org.datanucleus.query.expression.VariableExpression)48 DyadicExpression (org.datanucleus.query.expression.DyadicExpression)46 Expression (org.datanucleus.query.expression.Expression)46 QueryCompilation (org.datanucleus.query.compiler.QueryCompilation)25 JavaQueryCompiler (org.datanucleus.query.compiler.JavaQueryCompiler)23 OrderExpression (org.datanucleus.query.expression.OrderExpression)22 HashMap (java.util.HashMap)16 JDOQLCompiler (org.datanucleus.query.compiler.JDOQLCompiler)15 ClassExpression (org.datanucleus.query.expression.ClassExpression)15 JoinExpression (org.datanucleus.query.expression.JoinExpression)15 SubqueryExpression (org.datanucleus.query.expression.SubqueryExpression)15 Product (org.datanucleus.samples.store.Product)15 NucleusUserException (org.datanucleus.exceptions.NucleusUserException)12 JPQLCompiler (org.datanucleus.query.compiler.JPQLCompiler)9 List (java.util.List)8