Package org.datanucleus.query.expression

Examples of org.datanucleus.query.expression.ParameterExpression


        return exprOrdering;
    }

    public ParameterExpression getParameterExpressionForPosition(int pos)
    {
        ParameterExpression paramExpr = null;
        if (exprResult != null)
        {
            for (int i=0;i<exprResult.length;i++)
            {
                paramExpr = QueryUtils.getParameterExpressionForPosition(exprResult[i], pos);
View Full Code Here


            PrimaryExpression primExpr = (PrimaryExpression)param;
            paramValue = eval.getValueForPrimaryExpression(primExpr);
        }
        else if (param instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param;
            paramValue = QueryUtils.getValueForParameterExpression(eval.getParameterValues(), paramExpr);
        }
        else if (param instanceof Literal)
        {
            paramValue = ((Literal)param).getLiteral();
View Full Code Here

                throw new NucleusException(method + "(num1, num2) where num1 is instanceof " + param1.getClass().getName() + " but should be integer");
            }
        }
        else if (param1 instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param1;
            Object val = QueryUtils.getValueForParameterExpression(eval.getParameterValues(), paramExpr);
            if (val instanceof Number)
            {
                param1Value = ((Number)val).intValue();
            }
            else
            {
                throw new NucleusException(method + "(num1, num2) where num1 is instanceof " + param1.getClass().getName() + " but should be integer");
            }
        }
        else if (param1 instanceof Literal)
        {
            Object val = ((Literal)param1).getLiteral();
            if (val instanceof Number)
            {
                param1Value = ((Number)val).intValue();
            }
            else
            {
                throw new NucleusException(method + "(num1, num2) where num1 is instanceof " + param1.getClass().getName() + " but should be integer");
            }
        }
        else
        {
            throw new NucleusException(method + "(num1, num2) where num1 is instanceof " + param1.getClass().getName() + " not supported");
        }

        Object param2 = expr.getArguments().get(1);
        int param2Value = -1;
        if (param2 instanceof PrimaryExpression)
        {
            PrimaryExpression primExpr = (PrimaryExpression)param2;
            Object val = eval.getValueForPrimaryExpression(primExpr);
            if (val instanceof Number)
            {
                param2Value = ((Number)val).intValue();
            }
            else
            {
                throw new NucleusException(method + "(num1, num2) where num2 is instanceof " + param2.getClass().getName() + " but should be integer");
            }
        }
        else if (param2 instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param2;
            Object val = QueryUtils.getValueForParameterExpression(eval.getParameterValues(), paramExpr);
            if (val instanceof Number)
            {
                param2Value = ((Number)val).intValue();
            }
View Full Code Here

            PrimaryExpression primExpr = (PrimaryExpression)param;
            paramValue = eval.getValueForPrimaryExpression(primExpr);
        }
        else if (param instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param;
            paramValue = QueryUtils.getValueForParameterExpression(eval.getParameterValues(), paramExpr);
        }
        else if (param instanceof Literal)
        {
            paramValue = ((Literal)param).getLiteral();
View Full Code Here

            PrimaryExpression primExpr = (PrimaryExpression)param;
            paramValue = eval.getValueForPrimaryExpression(primExpr);
        }
        else if (param instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param;
            paramValue = QueryUtils.getValueForParameterExpression(eval.getParameterValues(), paramExpr);
        }
        else if (param instanceof Literal)
        {
            paramValue = ((Literal)param).getLiteral();
View Full Code Here

            PrimaryExpression primExpr = (PrimaryExpression)param;
            arg1Obj = eval.getValueForPrimaryExpression(primExpr);
        }
        else if (param instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param;
            arg1Obj = QueryUtils.getValueForParameterExpression(eval.getParameterValues(), paramExpr);
        }
        else if (param instanceof Literal)
        {
            arg1Obj = ((Literal)param).getLiteral();
View Full Code Here

            PrimaryExpression primExpr = (PrimaryExpression)param;
            argObj = eval.getValueForPrimaryExpression(primExpr);
        }
        else if (param instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param;
            argObj = QueryUtils.getValueForParameterExpression(eval.getParameterValues(), paramExpr);
        }
        else if (param instanceof Literal)
        {
            argObj = ((Literal)param).getLiteral();
View Full Code Here

            PrimaryExpression primExpr = (PrimaryExpression)param;
            paramValue = eval.getValueForPrimaryExpression(primExpr);
        }
        else if (param instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param;
            paramValue = QueryUtils.getValueForParameterExpression(eval.getParameterValues(), paramExpr);
        }
        else if (param instanceof Literal)
        {
            paramValue = ((Literal)param).getLiteral();
View Full Code Here

            PrimaryExpression primExpr = (PrimaryExpression)param;
            paramValue = eval.getValueForPrimaryExpression(primExpr);
        }
        else if (param instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param;
            paramValue = QueryUtils.getValueForParameterExpression(eval.getParameterValues(), paramExpr);
        }
        else if (param instanceof Literal)
        {
            paramValue = ((Literal)param).getLiteral();
View Full Code Here

            PrimaryExpression primExpr = (PrimaryExpression)param;
            argObj = eval.getValueForPrimaryExpression(primExpr);
        }
        else if (param instanceof ParameterExpression)
        {
            ParameterExpression paramExpr = (ParameterExpression)param;
            argObj = QueryUtils.getValueForParameterExpression(eval.getParameterValues(), paramExpr);
        }
        else if (param instanceof Literal)
        {
            argObj = ((Literal)param).getLiteral();
View Full Code Here

TOP

Related Classes of org.datanucleus.query.expression.ParameterExpression

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.