use of org.talend.components.jdbc.runtime.writer.JDBCOutputUpdateOrInsertWriter in project components by Talend.
the class JDBCOutputWriteOperation method createWriter.
@Override
public Writer<Result> createWriter(RuntimeContainer runtimeContainer) {
RuntimeSettingProvider properties = ((JDBCSink) this.getSink()).properties;
DataAction dataAction = properties.getRuntimeSetting().getDataAction();
switch(dataAction) {
case INSERT:
return new JDBCOutputInsertWriter(this, runtimeContainer);
case UPDATE:
return new JDBCOutputUpdateWriter(this, runtimeContainer);
case DELETE:
return new JDBCOutputDeleteWriter(this, runtimeContainer);
case INSERT_OR_UPDATE:
return new JDBCOutputInsertOrUpdateWriter(this, runtimeContainer);
case UPDATE_OR_INSERT:
return new JDBCOutputUpdateOrInsertWriter(this, runtimeContainer);
default:
return null;
}
}
Aggregations