Package org.jpox.store.mapped.expression

Examples of org.jpox.store.mapped.expression.NumericExpression


        ScalarExpression submethodLiteral = m.newLiteral(time.getQueryExpression(), "second");
        args.add(submethodLiteral);

        args.add(time);

        return new NumericExpression("date_part", args);
    }
View Full Code Here


        List types = new ArrayList();
        types.add("BIGINT");       
       
        List argsOp1 = new ArrayList();
        argsOp1.add(operand1);       
        args.add(new NumericExpression("CAST", argsOp1, types));

        List argsOp2 = new ArrayList();
        argsOp2.add(operand2);       
        args.add(new NumericExpression("CAST", argsOp2, types));

        return new NumericExpression("MOD", args);
    }
View Full Code Here

    public NumericExpression lengthMethod(StringExpression str)
    {
        ArrayList args = new ArrayList();
        args.add(str);

        return new NumericExpression("LENGTH", args);
    }
View Full Code Here

        {
            types = new ArrayList();
            types.add("BIGINT");       

            List argsOp1 = new ArrayList();
            argsOp1.add(new NumericExpression(from, ScalarExpression.OP_ADD, integerLiteral));       
          
            // Add 1 to the passed in value so that it is of origin 1 to be compatible with LOCATE
            // Make sure argument is typed as BIGINT 
            args.add(new NumericExpression("CAST", argsOp1, types));           
        }
        NumericExpression locateExpr = new NumericExpression("LOCATE", args);

        // Subtract 1 from the result of LOCATE to be consistent with Java strings
        // TODO Would be nice to put this in parentheses
        return new NumericExpression(locateExpr, ScalarExpression.OP_SUB, integerLiteral);
    }
View Full Code Here

TOP

Related Classes of org.jpox.store.mapped.expression.NumericExpression

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.