Package org.datanucleus.store.mongodb.query.expression

Examples of org.datanucleus.store.mongodb.query.expression.MongoBooleanExpression


                    NucleusLogger.QUERY.error(">> invalid compilation : filter compiled to " + mongoExpr);
                    filterComplete = false;
                }
                else
                {
                    MongoBooleanExpression mbExpr = (MongoBooleanExpression) mongoExpr;
                    filterObject = mbExpr.getDBObject();
                }
            }
            catch (Exception e)
            {
                // Impossible to compile all to run in the datastore, so just exit
View Full Code Here


     * @see org.datanucleus.query.evaluator.AbstractExpressionEvaluator#processAndExpression(org.datanucleus.query.expression.Expression)
     */
    @Override
    protected Object processAndExpression(Expression expr)
    {
        MongoBooleanExpression right = (MongoBooleanExpression) stack.pop();
        MongoBooleanExpression left = (MongoBooleanExpression) stack.pop();
        MongoBooleanExpression andExpr = new MongoBooleanExpression(left, right, MongoOperator.OP_AND);
        stack.push(andExpr);
        return andExpr;
    }
View Full Code Here

     * @see org.datanucleus.query.evaluator.AbstractExpressionEvaluator#processOrExpression(org.datanucleus.query.expression.Expression)
     */
    @Override
    protected Object processOrExpression(Expression expr)
    {
        MongoBooleanExpression right = (MongoBooleanExpression) stack.pop();
        MongoBooleanExpression left = (MongoBooleanExpression) stack.pop();
        MongoBooleanExpression andExpr = new MongoBooleanExpression(left, right, MongoOperator.OP_OR);
        stack.push(andExpr);
        return andExpr;
    }
View Full Code Here

        Object left = stack.pop();
        if (left instanceof MongoLiteral && right instanceof MongoFieldExpression)
        {
            String field = ((MongoFieldExpression)right).getFieldName();
            Object value = ((MongoLiteral)left).getValue();
            MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_EQ);
            stack.push(mongoExpr);
            return mongoExpr;
        }
        else if (left instanceof MongoFieldExpression && right instanceof MongoLiteral)
        {
            String field = ((MongoFieldExpression)left).getFieldName();
            Object value = ((MongoLiteral)right).getValue();
            MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_EQ);
            stack.push(mongoExpr);
            return mongoExpr;
        }

        // TODO Auto-generated method stub
View Full Code Here

        Object left = stack.pop();
        if (left instanceof MongoLiteral && right instanceof MongoFieldExpression)
        {
            String field = ((MongoFieldExpression)right).getFieldName();
            Object value = ((MongoLiteral)left).getValue();
            MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_NOTEQ);
            stack.push(mongoExpr);
            return mongoExpr;
        }
        else if (left instanceof MongoFieldExpression && right instanceof MongoLiteral)
        {
            String field = ((MongoFieldExpression)left).getFieldName();
            Object value = ((MongoLiteral)right).getValue();
            MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_NOTEQ);
            stack.push(mongoExpr);
            return mongoExpr;
        }

        // TODO Auto-generated method stub
View Full Code Here

        Object left = stack.pop();
        if (left instanceof MongoLiteral && right instanceof MongoFieldExpression)
        {
            String field = ((MongoFieldExpression)right).getFieldName();
            Object value = ((MongoLiteral)left).getValue();
            MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_LTEQ);
            stack.push(mongoExpr);
            return mongoExpr;
        }
        else if (left instanceof MongoFieldExpression && right instanceof MongoLiteral)
        {
            String field = ((MongoFieldExpression)left).getFieldName();
            Object value = ((MongoLiteral)right).getValue();
            MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_GT);
            stack.push(mongoExpr);
            return mongoExpr;
        }

        // TODO Auto-generated method stub
View Full Code Here

        Object left = stack.pop();
        if (left instanceof MongoLiteral && right instanceof MongoFieldExpression)
        {
            String field = ((MongoFieldExpression)right).getFieldName();
            Object value = ((MongoLiteral)left).getValue();
            MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_GTEQ);
            stack.push(mongoExpr);
            return mongoExpr;
        }
        else if (left instanceof MongoFieldExpression && right instanceof MongoLiteral)
        {
            String field = ((MongoFieldExpression)left).getFieldName();
            Object value = ((MongoLiteral)right).getValue();
            MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_LT);
            stack.push(mongoExpr);
            return mongoExpr;
        }

        // TODO Auto-generated method stub
View Full Code Here

        Object left = stack.pop();
        if (left instanceof MongoLiteral && right instanceof MongoFieldExpression)
        {
            String field = ((MongoFieldExpression)right).getFieldName();
            Object value = ((MongoLiteral)left).getValue();
            MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_LT);
            stack.push(mongoExpr);
            return mongoExpr;
        }
        else if (left instanceof MongoFieldExpression && right instanceof MongoLiteral)
        {
            String field = ((MongoFieldExpression)left).getFieldName();
            Object value = ((MongoLiteral)right).getValue();
            MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_GTEQ);
            stack.push(mongoExpr);
            return mongoExpr;
        }

        // TODO Auto-generated method stub
View Full Code Here

        Object left = stack.pop();
        if (left instanceof MongoLiteral && right instanceof MongoFieldExpression)
        {
            String field = ((MongoFieldExpression)right).getFieldName();
            Object value = ((MongoLiteral)left).getValue();
            MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_GT);
            stack.push(mongoExpr);
            return mongoExpr;
        }
        else if (left instanceof MongoFieldExpression && right instanceof MongoLiteral)
        {
            String field = ((MongoFieldExpression)left).getFieldName();
            Object value = ((MongoLiteral)right).getValue();
            MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_LTEQ);
            stack.push(mongoExpr);
            return mongoExpr;
        }

        // TODO Auto-generated method stub
View Full Code Here

TOP

Related Classes of org.datanucleus.store.mongodb.query.expression.MongoBooleanExpression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.