Package org.apache.expreval.expr.literal

Examples of org.apache.expreval.expr.literal.DateLiteral


    public DateFunction(final ConstantType constantType) {
        super(FunctionType.DATECONSTANT, null);
        this.constantType = constantType;
        switch (this.getConstantType()) {
            case NOW:
                this.dateValue = new DateLiteral(DateLiteral.getNow());
                break;
            case MINDATE:
            case MAXDATE:
                this.dateValue = new DateLiteral(constantType.getValue());
                break;
        }
    }
View Full Code Here


            }

            case LONGTODATE: {
                final Number num = (Number)this.getExprArg(0).getValue(conn, object);
                final long val = num.longValue();
                this.dateValue = new DateLiteral(val);
                return this.dateValue.getValue(conn, object);
            }

            default:
                throw new HBqlException("Invalid function: " + this.getFunctionType());
View Full Code Here

        if (val instanceof String)
            return new StringLiteral((String)val);

        if (val instanceof Date)
            return new DateLiteral((Date)val);

        if (val instanceof Object)
            return new ObjectLiteral(val);

        throw new InvalidTypeException("Parameter " + this.getParamName()
View Full Code Here

TOP

Related Classes of org.apache.expreval.expr.literal.DateLiteral

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.