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

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


            compileComponent = CompilationComponent.FILTER;

            try
            {
                compilation.getExprFilter().evaluate(this);
                MongoExpression mongoExpr = stack.pop();
                if (!(mongoExpr instanceof MongoBooleanExpression))
                {
                    NucleusLogger.QUERY.error(">> invalid compilation : filter compiled to " + mongoExpr);
                    filterComplete = false;
                }
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.MongoExpression

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.