Package com.asakusafw.runtime.value

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


     */
    @Test
    public void emitDateTime() throws Exception {
        DateTimeOption value = new DateTimeOption();

        value.modify(time(2000, 2, 9, 1, 2, 3));
        emitter.emit(value);
        value.modify(time(2000, 3, 1, 8, 9, 10));
        emitter.emit(value);
        value.modify(time(100, 3, 30, 11, 12, 0));
        emitter.emit(value);
View Full Code Here


    public void emitDateTime() throws Exception {
        DateTimeOption value = new DateTimeOption();

        value.modify(time(2000, 2, 9, 1, 2, 3));
        emitter.emit(value);
        value.modify(time(2000, 3, 1, 8, 9, 10));
        emitter.emit(value);
        value.modify(time(100, 3, 30, 11, 12, 0));
        emitter.emit(value);
        emitter.endRecord();
View Full Code Here

        value.modify(time(2000, 2, 9, 1, 2, 3));
        emitter.emit(value);
        value.modify(time(2000, 3, 1, 8, 9, 10));
        emitter.emit(value);
        value.modify(time(100, 3, 30, 11, 12, 0));
        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(time(1, 1, 1, 0, 0, 0));
        emitter.emit(value);
        value.modify(time(9999, 12, 31, 23, 59, 59));
        emitter.emit(value);
        emitter.endRecord();
View Full Code Here

        value.setNull();
        emitter.emit(value);
        value.modify(time(1, 1, 1, 0, 0, 0));
        emitter.emit(value);
        value.modify(time(9999, 12, 31, 23, 59, 59));
        emitter.emit(value);
        emitter.endRecord();

        emitter.close();
View Full Code Here

                    int s = dateTimeCal.get(Calendar.SECOND);
                    int days = com.asakusafw.runtime.value.DateUtil.getDayFromDate(y, m + 1, d);
                    int secs = com.asakusafw.runtime.value.DateUtil.getSecondFromTime(h, min, s);
                    DateTime dt = new DateTime();
                    dt.setElapsedSeconds((long) days * 86400 + secs);
                    dateTimeOption.modify(dt);
                }
                modelClass.getMethod(name, DateTimeOption.class).invoke(model, dateTimeOption);
                break;
            case DATE:
                DateOption dateOption = new DateOption();
View Full Code Here

        testField(list, "getCDatetimeOption", DATA.NULL_STRING, dateTimeOption);
        testField(list, "getCDatetimeOption", DATA.BOOL_TRUE, dateTimeOption);
        testField(list, "getCDatetimeOption", DATA.BOOL_FALSE, dateTimeOption);
        testField(list, "getCDatetimeOption", DATA.NUMERIC_DATE, dateTimeOption);
        dateTime.setElapsedSeconds(DateUtil.getDayFromDate(2010, 1, 1) * 86400L);
        dateTimeOption.modify(dateTime);
        testField(list, "getCDatetimeOption", DATA.DATE_DATE_FMT1, dateTimeOption);
        testField(list, "getCDatetimeOption", DATA.DATE_DATE_FMT2, dateTimeOption);
        testField(list, "getCDatetimeOption", DATA.DATE_DATETIME_FIMT1, dateTimeOption);
        testField(list, "getCDatetimeOption", DATA.DATE_DATETIME_FIMT2, dateTimeOption);
        testField(list, "getCDatetimeOption", DATA.STRING_DATE, dateTimeOption);
View Full Code Here

        testField(list, "getCDatetimeOption", DATA.DATE_DATETIME_FIMT2, dateTimeOption);
        testField(list, "getCDatetimeOption", DATA.STRING_DATE, dateTimeOption);
        dateTimeOption.setNull();
        testField(list, "getCDatetimeOption", DATA.NUMERIC_DATETIME, dateTimeOption);
        dateTime.setElapsedSeconds(DateUtil.getDayFromDate(2010, 10, 1) * 86400L + DateUtil.getSecondFromTime(12, 1, 18));
        dateTimeOption.modify(dateTime);
        testField(list, "getCDatetimeOption", DATA.DATETIME_DATE_FMT1, dateTimeOption);
        testField(list, "getCDatetimeOption", DATA.DATETIME_DATE_FMT2, dateTimeOption);
        testField(list, "getCDatetimeOption", DATA.DATETIME_DATETIME_FIMT1, dateTimeOption);
        testField(list, "getCDatetimeOption", DATA.DATETIME_DATETIME_FIMT2, dateTimeOption);
        testField(list, "getCDatetimeOption", DATA.STRING_DATETIME, dateTimeOption);
View Full Code Here

            int s = cal.get(Calendar.SECOND);
            int days = com.asakusafw.runtime.value.DateUtil.getDayFromDate(y, m + 1, d);
            int secs = com.asakusafw.runtime.value.DateUtil.getSecondFromTime(h, min, s);
            DateTime dt = new DateTime();
            dt.setElapsedSeconds((long) days * 86400 + secs);
            op.modify(dt);
        }
        return op;
    }

    /**
 
View Full Code Here

        testGetXXXOptionDo(excelUtils, sheet, DATA.NULL_STRING, TYPES.DATETIME, new CellTypeMismatchException("日付"));
        testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_TRUE, TYPES.DATETIME, new CellTypeMismatchException("日付"));
        testGetXXXOptionDo(excelUtils, sheet, DATA.BOOL_FALSE, TYPES.DATETIME, new CellTypeMismatchException("日付"));
        testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_DATE, TYPES.DATETIME, new CellTypeMismatchException("日付"));
        dateTime.setElapsedSeconds(DateUtil.getDayFromDate(2010, 1, 1) * 86400L);
        dateTimeOption.modify(dateTime);
        testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT1, TYPES.DATETIME, dateTimeOption);
        testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATE_FMT2, TYPES.DATETIME, dateTimeOption);
        testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT1, TYPES.DATETIME, dateTimeOption);
        testGetXXXOptionDo(excelUtils, sheet, DATA.DATE_DATETIME_FIMT2, TYPES.DATETIME, dateTimeOption);
        testGetXXXOptionDo(excelUtils, sheet, DATA.STRING_DATE, TYPES.DATETIME, dateTimeOption);
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.