Examples of NumericExpression


Examples of org.datanucleus.store.rdbms.sql.expression.NumericExpression

        }
        else if (expr instanceof StringExpression || expr instanceof ParameterLiteral)
        {
            ArrayList funcArgs = new ArrayList();
            funcArgs.add(expr);
            return new NumericExpression(stmt, getMappingForClass(int.class), "LENGTH", funcArgs);
        }
        else
        {
            throw new NucleusException(LOCALISER.msg("060001", "length", expr));
        }
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.NumericExpression

            throw new NucleusException(LOCALISER.msg("060001", "getMinute()", expr));
        }

        ArrayList funcArgs = new ArrayList();
        funcArgs.add(expr);
        return new NumericExpression(stmt, getMappingForClass(int.class), "MINUTE", funcArgs);
    }
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.NumericExpression

        ArrayList funcArgs = new ArrayList();
        funcArgs.add(expr);
        funcArgs.add(hh);
        ArrayList funcArgs2 = new ArrayList();
        funcArgs2.add(new StringExpression(stmt, mapping, "TO_CHAR", funcArgs));
        return new NumericExpression(stmt, getMappingForClass(int.class), "TO_NUMBER", funcArgs2);
    }
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.NumericExpression

                {
                    cls = Long.class;
                    clsLevel = 1;
                }
            }
            return new NumericExpression(stmt, getMappingForClass(cls), "COALESCE", args);
        }
        else
        {
            throw new NucleusException(LOCALISER.msg("060002", "COALESCE", expr));
        }
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.NumericExpression

                orderTable = elemSqlExpr.getSQLTable();
                orderMapping = ((ClassTable)elemSqlExpr.getSQLTable().getTable()).getExternalMapping(mmd,
                    MappingConsumer.MAPPING_TYPE_EXTERNAL_INDEX);
            }

            return new NumericExpression(stmt, orderTable, orderMapping);
        }
        else
        {
            throw new NucleusException(LOCALISER.msg("060002", "INDEX", ignore));
        }
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.NumericExpression

        SQLExpression day = exprFactory.newLiteral(stmt, mapping, "second");

        ArrayList funcArgs = new ArrayList();
        funcArgs.add(day);
        funcArgs.add(expr);
        return new NumericExpression(stmt, getMappingForClass(int.class), "date_part", funcArgs);
    }
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.NumericExpression

        }
        else if (expr instanceof StringExpression || expr instanceof ParameterLiteral)
        {
            ArrayList funcArgs = new ArrayList();
            funcArgs.add(expr);
            return new NumericExpression(stmt, getMappingForClass(int.class), "CHAR_LENGTH", funcArgs);
        }
        else
        {
            throw new NucleusException(LOCALISER.msg("060001", "length", expr));
        }
View Full Code Here

Examples of org.datanucleus.store.rdbms.sql.expression.NumericExpression

        funcArgs.add(mm);
        ArrayList funcArgs2 = new ArrayList();
        funcArgs2.add(new StringExpression(stmt, getMappingForClass(int.class), "TO_CHAR", funcArgs));

        // Delete one from the SQL "month" (origin=1) to be compatible with Java month (origin=0)
        NumericExpression numExpr = new NumericExpression(
            new NumericExpression(stmt, getMappingForClass(int.class), "TO_NUMBER", funcArgs2),
            Expression.OP_SUB, one);
        numExpr.encloseInParentheses();
        return numExpr;
    }
View Full Code Here

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

    public ScalarExpression newScalarExpression(QueryExpression qs, LogicSetExpression te)
    {
        if (datastoreJavaType.equals(ClassNameConstants.JAVA_LANG_INTEGER))
        {
            return new NumericExpression(qs, this, te);
        }
        else if (datastoreJavaType.equals(ClassNameConstants.JAVA_LANG_STRING))
        {
            return new StringExpression(qs, this, te);
        }
View Full Code Here

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

        return expr;
    }

    public ScalarExpression newScalarExpression(QueryExpression qs, LogicSetExpression te)
    {
        ScalarExpression expr = new NumericExpression(qs, this, te);
        return expr;
    }
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.