use of org.dbflute.logic.replaceschema.loaddata.xls.DfXlsDataHandlingWriter in project dbflute-core by dbflute.
the class DfLoadDataProcess method createXlsDataHandlerImpl.
protected DfXlsDataHandlingWriter createXlsDataHandlerImpl() {
if (_xlsDataHandlerImpl != null) {
return _xlsDataHandlerImpl;
}
final DfXlsDataHandlingWriter handler = new DfXlsDataHandlingWriter(_dataSource, _mainSchema);
handler.acceptSkipSheet(getReplaceSchemaProperties().getSkipSheet());
handler.setLoggingInsertSql(isLoggingInsertSql());
handler.setSuppressBatchUpdate(isSuppressBatchUpdate());
handler.setSuppressCheckColumnDef(isSuppressCheckColumnDef());
handler.setSuppressCheckImplicitSet(isSuppressCheckImplicitSet());
handler.setDataWritingInterceptor(getDataWritingInterceptor());
handler.setConvertValueProp(_convertValueProp);
handler.setDefaultValueProp(_defaultValueProp);
handler.setLoadingControlProp(_loadingControlProp);
_xlsDataHandlerImpl = handler;
return _xlsDataHandlerImpl;
}
use of org.dbflute.logic.replaceschema.loaddata.xls.DfXlsDataHandlingWriter in project dbflute-core by dbflute.
the class DfAbstractDataWriterTest method test_isNotNullNotString.
// ===================================================================================
// Process per Type
// ================
// -----------------------------------------------------
// NotNull NotString
// -----------------
public void test_isNotNullNotString() {
// via XlsData
// ## Arrange ##
final DfXlsDataHandlingWriter impl = new DfXlsDataHandlingWriter(null, null);
// ## Act & Assert ##
assertFalse(impl.isNotNullNotString(null));
assertFalse(impl.isNotNullNotString("abc"));
assertTrue(impl.isNotNullNotString(new Date()));
assertTrue(impl.isNotNullNotString(new Timestamp(System.currentTimeMillis())));
}
use of org.dbflute.logic.replaceschema.loaddata.xls.DfXlsDataHandlingWriter in project dbflute-core by dbflute.
the class DfAbstractDataWriterTest method test_processBoolean.
// -----------------------------------------------------
// Boolean
// -------
public void test_processBoolean() throws Exception {
// via XlsData
// ## Arrange ##
final DfXlsDataHandlingWriter impl = new DfXlsDataHandlingWriter(null, null) {
@Override
protected Class<?> getBindType(String tableName, DfColumnMeta columnMetaInfo) {
return BigDecimal.class;
}
};
Map<String, DfColumnMeta> columnMetaInfoMap = StringKeyMap.createAsCaseInsensitive();
DfColumnMeta info = new DfColumnMeta();
info.setColumnName("foo");
info.setColumnSize(3);
info.setJdbcDefValue(Types.NUMERIC);
columnMetaInfoMap.put("foo", info);
// ## Act ##
boolean actual = impl.processBoolean("tbl", "foo", "0", null, null, 0, columnMetaInfoMap, 3);
// ## Assert ##
log("actual=" + actual);
assertFalse(actual);
}
Aggregations