use of org.talend.components.jdbc.datastore.JDBCDatastoreProperties in project components by Talend.
the class JDBCInputTestIT method createCommonJDBCInputProperties.
private JDBCInputProperties createCommonJDBCInputProperties(JDBCInputDefinition definition) {
JDBCDatastoreDefinition datastore_def = new JDBCDatastoreDefinition();
JDBCDatastoreProperties datastore_props = new JDBCDatastoreProperties("datastore");
datastore_props.dbTypes.setValue("DERBY");
datastore_props.afterDbTypes();
datastore_props.jdbcUrl.setValue(allSetting.getJdbcUrl());
datastore_props.userId.setValue(allSetting.getUsername());
datastore_props.password.setValue(allSetting.getPassword());
JDBCDatasetProperties dataset = (JDBCDatasetProperties) datastore_def.createDatasetProperties(datastore_props);
dataset.sql.setValue(DBTestUtils.getSQL(tablename));
updateSchema(dataset);
JDBCInputProperties properties = (JDBCInputProperties) definition.createRuntimeProperties();
properties.setDatasetProperties(dataset);
return properties;
}
Aggregations