Package org.jpox.store.mapped.expression

Examples of org.jpox.store.mapped.expression.NumericExpression.encloseWithInParentheses()


        // Delete one from the SQL "month" (origin=1) to be compatible with Java month (origin=0)
        JavaTypeMapping m = getMapping(BigInteger.class, date);
        ScalarExpression integerLiteral = m.newLiteral(date.getQueryExpression(), BigInteger.ONE);
        NumericExpression expr = new NumericExpression(new NumericExpression("TO_NUMBER", args1), ScalarExpression.OP_SUB, integerLiteral);

        expr.encloseWithInParentheses();
        return expr;
    }

    /**
     * Returns the appropriate SQL expression for the JDOQL Date.getYear()
View Full Code Here


        // Delete one from the SQL "month" (origin=1) to be compatible with Java month (origin=0)
        JavaTypeMapping m = getMapping(BigInteger.class, date);
        ScalarExpression integerLiteral = m.newLiteral(date.getQueryExpression(), BigInteger.ONE);
        NumericExpression expr = new NumericExpression(new NumericExpression("MONTH", args), ScalarExpression.OP_SUB, integerLiteral);
        expr.encloseWithInParentheses();
        return expr;
    }

    /**
     * Returns the appropriate SQL expression for the JDOQL Date.getYear()
View Full Code Here

        // Delete one from the SQL "month" (origin=1) to be compatible with Java month (origin=0)
        JavaTypeMapping m2 = getMapping(BigInteger.class, date);
        ScalarExpression integerLiteral = m2.newLiteral(date.getQueryExpression(), BigInteger.ONE);
        NumericExpression expr = new NumericExpression(new NumericExpression("date_part", args), ScalarExpression.OP_SUB, integerLiteral);
        expr.encloseWithInParentheses();
        return expr;
    }

    /**
     * Returns the appropriate SQL expression for the JDOQL Date.getYear()
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.