Package com.asakusafw.runtime.value

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


        Path path = new Path(folder.newFile("testing").toURI());
        ModelOutput<StringOption> out = format.createOutput(StringOption.class, fs, path, new Counter());
        try {
            StringOption value = new StringOption();
            for (int i = 0; i < count; i++) {
                value.modify("Hello, world at " + i);
                out.write(value);
            }
        } finally {
            out.close();
        }
View Full Code Here


     */
    @Test
    public void emitString() throws Exception {
        StringOption value = new StringOption();

        value.modify("");
        emitter.emit(value);
        value.modify("Hello, world!");
        emitter.emit(value);
        value.modify("こんにちは、世界!");
        emitter.emit(value);
View Full Code Here

    public void emitString() throws Exception {
        StringOption value = new StringOption();

        value.modify("");
        emitter.emit(value);
        value.modify("Hello, world!");
        emitter.emit(value);
        value.modify("こんにちは、世界!");
        emitter.emit(value);
        emitter.endRecord();
View Full Code Here

        value.modify("");
        emitter.emit(value);
        value.modify("Hello, world!");
        emitter.emit(value);
        value.modify("こんにちは、世界!");
        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("\n\t\\");
        emitter.emit(value);
        value.modify(LONG_STRING);
        emitter.emit(value);
        emitter.endRecord();
View Full Code Here

        value.setNull();
        emitter.emit(value);
        value.modify("\n\t\\");
        emitter.emit(value);
        value.modify(LONG_STRING);
        emitter.emit(value);
        emitter.endRecord();

        emitter.close();
View Full Code Here

                StringOption stringOption = new StringOption();
                String str = rs.getString(columnIndex);
                if (rs.wasNull()) {
                    stringOption.setNull();
                } else {
                    stringOption.modify(str);
                }
                modelClass.getMethod(name, StringOption.class).invoke(model, stringOption);
                break;
            case TIMESTAMP:
            case DATETIME:
View Full Code Here

        testField(list, "getCTinyintOption", DATA.DATETIME_DATETIME_FIMT2, byteOption.setNull());
        testField(list, "getCTinyintOption", DATA.STRING_DATETIME, byteOption.setNull());

        // C_CHARのテスト
        StringOption stringOption = new StringOption();
        testField(list, "getCCharOption", DATA.NUMERIC_0, stringOption.modify("0"));
        testField(list, "getCCharOption", DATA.NUMERIC_1, stringOption.modify("1"));
        testField(list, "getCCharOption", DATA.NUMERIC_MINUS1, stringOption.modify("-1"));
        testField(list, "getCCharOption", DATA.NUMERIC_MAX, stringOption.modify("9.2233720368547697E18"));
        testField(list, "getCCharOption", DATA.NUMERIC_MIN, stringOption.modify("-9.2233720368547697E18"));
        testField(list, "getCCharOption", DATA.NUMERIC_DECIMAL, stringOption.modify("6.54321"));
View Full Code Here

        testField(list, "getCTinyintOption", DATA.STRING_DATETIME, byteOption.setNull());

        // C_CHARのテスト
        StringOption stringOption = new StringOption();
        testField(list, "getCCharOption", DATA.NUMERIC_0, stringOption.modify("0"));
        testField(list, "getCCharOption", DATA.NUMERIC_1, stringOption.modify("1"));
        testField(list, "getCCharOption", DATA.NUMERIC_MINUS1, stringOption.modify("-1"));
        testField(list, "getCCharOption", DATA.NUMERIC_MAX, stringOption.modify("9.2233720368547697E18"));
        testField(list, "getCCharOption", DATA.NUMERIC_MIN, stringOption.modify("-9.2233720368547697E18"));
        testField(list, "getCCharOption", DATA.NUMERIC_DECIMAL, stringOption.modify("6.54321"));
        testField(list, "getCCharOption", DATA.NUMERIC_OVER_MAX, stringOption.modify("9.2233720368547697E18"));
View Full Code Here

        testGetXXXOptionDo(excelUtils, sheet, DATA.FORMULA, TYPES.TINYINT, new CellTypeMismatchException("数値"));

        // getStringOptionのテスト

        StringOption stringOption = new StringOption();
        stringOption.modify("0");
        testGetXXXOptionDo(excelUtils, sheet,  DATA.NUMERIC_0, TYPES.CHAR, stringOption);
        stringOption.modify("1");
        testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_1, TYPES.CHAR, stringOption);
        stringOption.modify("-1");
        testGetXXXOptionDo(excelUtils, sheet, DATA.NUMERIC_MINUS1, TYPES.CHAR, stringOption);
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.