Package com.asakusafw.runtime.value

Examples of com.asakusafw.runtime.value.DecimalOption.modify()


     */
    @Test
    public void emitDecimal() throws Exception {
        DecimalOption value = new DecimalOption();

        value.modify(decimal("0"));
        emitter.emit(value);
        value.modify(decimal("10"));
        emitter.emit(value);
        value.modify(decimal("-10"));
        emitter.emit(value);
View Full Code Here


    public void emitDecimal() throws Exception {
        DecimalOption value = new DecimalOption();

        value.modify(decimal("0"));
        emitter.emit(value);
        value.modify(decimal("10"));
        emitter.emit(value);
        value.modify(decimal("-10"));
        emitter.emit(value);
        emitter.endRecord();
View Full Code Here

        value.modify(decimal("0"));
        emitter.emit(value);
        value.modify(decimal("10"));
        emitter.emit(value);
        value.modify(decimal("-10"));
        emitter.emit(value);
        emitter.endRecord();

        value.setNull();
        emitter.emit(value);
View Full Code Here

        emitter.emit(value);
        emitter.endRecord();

        value.setNull();
        emitter.emit(value);
        value.modify(decimal("0.9999999999999999999999999999999999999999999999999"));
        emitter.emit(value);
        value.modify(decimal("9223372036854775809"));
        emitter.emit(value);
        emitter.endRecord();
View Full Code Here

        value.setNull();
        emitter.emit(value);
        value.modify(decimal("0.9999999999999999999999999999999999999999999999999"));
        emitter.emit(value);
        value.modify(decimal("9223372036854775809"));
        emitter.emit(value);
        emitter.endRecord();

        emitter.close();
View Full Code Here

                DecimalOption decimalOption = new DecimalOption();
                BigDecimal bigDecimal = rs.getBigDecimal(columnIndex);
                if (rs.wasNull()) {
                    decimalOption.setNull();
                } else {
                    decimalOption.modify(bigDecimal);
                }
                modelClass.getMethod(name, DecimalOption.class).invoke(model, decimalOption);
                break;
            default:
                throw new RuntimeException("Unsupported data type: " + info.getDataType());
View Full Code Here

        testField(list, "getCDateOption", DATA.DATETIME_DATETIME_FIMT2, dateOption);
        testField(list, "getCDateOption", DATA.STRING_DATETIME, dateOption);

        // C_DECIMAL20_0のテスト
        DecimalOption decimalOption = new DecimalOption();
        testField(list, "getCDecimal200Option", DATA.NUMERIC_0, decimalOption.modify(new BigDecimal(0)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_1, decimalOption.modify(new BigDecimal(1)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_MINUS1, decimalOption.modify(new BigDecimal(-1)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_MAX, decimalOption.modify(new BigDecimal(999999999999999L)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_MIN, decimalOption.modify(new BigDecimal(-999999999999999L)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_DECIMAL, decimalOption.setNull());
View Full Code Here

        testField(list, "getCDateOption", DATA.STRING_DATETIME, dateOption);

        // C_DECIMAL20_0のテスト
        DecimalOption decimalOption = new DecimalOption();
        testField(list, "getCDecimal200Option", DATA.NUMERIC_0, decimalOption.modify(new BigDecimal(0)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_1, decimalOption.modify(new BigDecimal(1)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_MINUS1, decimalOption.modify(new BigDecimal(-1)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_MAX, decimalOption.modify(new BigDecimal(999999999999999L)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_MIN, decimalOption.modify(new BigDecimal(-999999999999999L)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_DECIMAL, decimalOption.setNull());
        testField(list, "getCDecimal200Option", DATA.NUMERIC_OVER_MAX, decimalOption.setNull());
View Full Code Here

        // C_DECIMAL20_0のテスト
        DecimalOption decimalOption = new DecimalOption();
        testField(list, "getCDecimal200Option", DATA.NUMERIC_0, decimalOption.modify(new BigDecimal(0)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_1, decimalOption.modify(new BigDecimal(1)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_MINUS1, decimalOption.modify(new BigDecimal(-1)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_MAX, decimalOption.modify(new BigDecimal(999999999999999L)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_MIN, decimalOption.modify(new BigDecimal(-999999999999999L)));
        testField(list, "getCDecimal200Option", DATA.NUMERIC_DECIMAL, decimalOption.setNull());
        testField(list, "getCDecimal200Option", DATA.NUMERIC_OVER_MAX, decimalOption.setNull());
        testField(list, "getCDecimal200Option", DATA.NUMERIC_UNDER_MIN, decimalOption.setNull());
View Full Code Here

        default:
            String msg = createCellTypeMismatchExceptionMsg(cell, "DECIMAL");
            throw new CellTypeMismatchException(msg);
        }
        DecimalOption decimalOption = new DecimalOption();
        decimalOption.modify(bigDecimal);
        return decimalOption;
    }

    /**
     * セルからjava.util.Data値を取得する。
 
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.