Package org.jpox.store.mapped.expression

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


    public NumericExpression getMinuteMethod(SqlTemporalExpression time)
    {
        ArrayList args = new ArrayList();
        args.add(time);

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


    public NumericExpression getSecondMethod(SqlTemporalExpression time)
    {
        ArrayList args = new ArrayList();
        args.add(time);

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

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

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

        args.add(str);
        args.add(source);
        if (from != null)
        {
            // Add 1 to the passed in value so that it is of origin 1 to be compatible with CHARINDEX
            args.add(new NumericExpression(from, ScalarExpression.OP_ADD, integerLiteral));
        }
        NumericExpression locateExpr = new NumericExpression("CHARINDEX", args);

        // Subtract 1 from the result of CHARINDEX 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

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

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

        args.add(str);
        args.add(source);
        if (from != null)
        {
            // Add 1 to the passed in value so that it is of origin 1 to be compatible with CHARINDEX
            args.add(new NumericExpression(from, ScalarExpression.OP_ADD, integerLiteral));
        }
        NumericExpression locateExpr = new NumericExpression("CHARINDEX", args);

        // Subtract 1 from the result of CHARINDEX 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

    {
        ArrayList args = new ArrayList();
        args.add("hh");
        args.add(time);

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

    {
        ArrayList args = new ArrayList();
        args.add("mi");
        args.add(time);

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

    {
        ArrayList args = new ArrayList();
        args.add("ss");
        args.add(time);

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

    public NumericExpression modOperator(ScalarExpression operand1, ScalarExpression operand2)
    {
        ArrayList args = new ArrayList();
        args.add(operand1);
        args.add(operand2);
        return new NumericExpression("MOD", args);
    }
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.