Package com.asakusafw.runtime.value

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


     */
    @Test
    public void emitShort() throws Exception {
        ShortOption value = new ShortOption();

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


    public void emitShort() throws Exception {
        ShortOption value = new ShortOption();

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

        value.modify((short) 0);
        emitter.emit(value);
        value.modify((short) 10);
        emitter.emit(value);
        value.modify((short) -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(Short.MAX_VALUE);
        emitter.emit(value);
        value.modify(Short.MIN_VALUE);
        emitter.emit(value);
        emitter.endRecord();
View Full Code Here

        value.setNull();
        emitter.emit(value);
        value.modify(Short.MAX_VALUE);
        emitter.emit(value);
        value.modify(Short.MIN_VALUE);
        emitter.emit(value);
        emitter.endRecord();

        emitter.close();
View Full Code Here

                ShortOption shortOption = new ShortOption();
                short sv = rs.getShort(columnIndex);
                if (rs.wasNull()) {
                    shortOption.setNull();
                } else {
                    shortOption.modify(sv);
                }
                modelClass.getMethod(name, ShortOption.class).invoke(model, shortOption);
                break;
            case TINY_INT:
                ByteOption byteOption = new ByteOption();
View Full Code Here

        testField(list, "getCSmallintOption", DATA.STRING_UNDER_MIN, shortOption.setNull());
        testField(list, "getCSmallintOption", DATA.STRING_BIG_VALUE, shortOption.setNull());
        testField(list, "getCSmallintOption", DATA.BLANK, shortOption.setNull());
        testField(list, "getCSmallintOption", DATA.NULL_STRING, shortOption.setNull());
        testField(list, "getCSmallintOption", DATA.BOOL_TRUE, shortOption.modify((short) 1));
        testField(list, "getCSmallintOption", DATA.BOOL_FALSE, shortOption.modify((short) 0));
        testField(list, "getCSmallintOption", DATA.NUMERIC_DATE, shortOption.setNull());
        testField(list, "getCSmallintOption", DATA.DATE_DATE_FMT1, shortOption.setNull());
        testField(list, "getCSmallintOption", DATA.DATE_DATE_FMT2, shortOption.setNull());
        testField(list, "getCSmallintOption", DATA.DATE_DATETIME_FIMT1, shortOption.setNull());
        testField(list, "getCSmallintOption", DATA.DATE_DATETIME_FIMT2, shortOption.setNull());
View Full Code Here

        testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_OVER_MAX, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
        testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_UNDER_MIN, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
        testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_BIG_VALUE, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
        shortOption.modify((short)0);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_0, TYPES.SMALLINT, shortOption);
        shortOption.modify((short)1);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_1, TYPES.SMALLINT, shortOption);
        shortOption.modify((short)-1);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MINUS1, TYPES.SMALLINT, shortOption);
        shortOption.modify(Short.MAX_VALUE);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MAX, TYPES.SMALLINT, shortOption);
View Full Code Here

        testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_BIG_VALUE, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
        shortOption.modify((short)0);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_0, TYPES.SMALLINT, shortOption);
        shortOption.modify((short)1);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_1, TYPES.SMALLINT, shortOption);
        shortOption.modify((short)-1);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MINUS1, TYPES.SMALLINT, shortOption);
        shortOption.modify(Short.MAX_VALUE);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MAX, TYPES.SMALLINT, shortOption);
        shortOption.modify(Short.MIN_VALUE);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MIN, TYPES.SMALLINT, shortOption);
View Full Code Here

        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_0, TYPES.SMALLINT, shortOption);
        shortOption.modify((short)1);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_1, TYPES.SMALLINT, shortOption);
        shortOption.modify((short)-1);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MINUS1, TYPES.SMALLINT, shortOption);
        shortOption.modify(Short.MAX_VALUE);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MAX, TYPES.SMALLINT, shortOption);
        shortOption.modify(Short.MIN_VALUE);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_MIN, TYPES.SMALLINT, shortOption);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DECIMAL, TYPES.SMALLINT, new CellTypeMismatchException("数値"));
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_OVER_MAX, TYPES.SMALLINT, new NumberFormatException("表現可能な範囲外の数値"));
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.