use of org.talend.components.jdbc.datastore.JDBCDatastoreDefinition in project components by Talend.
the class JDBCDatasetTestIT method createDatasetProperties.
private JDBCDatasetProperties createDatasetProperties(boolean updateSchema) {
JDBCDatastoreDefinition def = new JDBCDatastoreDefinition();
JDBCDatastoreProperties datastore = new JDBCDatastoreProperties("datastore");
datastore.dbTypes.setValue("DERBY");
datastore.afterDbTypes();
datastore.jdbcUrl.setValue(allSetting.getJdbcUrl());
datastore.userId.setValue(allSetting.getUsername());
datastore.password.setValue(allSetting.getPassword());
JDBCDatasetProperties dataset = (JDBCDatasetProperties) def.createDatasetProperties(datastore);
dataset.sql.setValue(DBTestUtils.getSQL(tablename));
if (updateSchema) {
updateSchema(dataset);
}
return dataset;
}
use of org.talend.components.jdbc.datastore.JDBCDatastoreDefinition in project components by Talend.
the class JDBCDatasetOracleTestIT method createDatasetProperties.
private JDBCDatasetProperties createDatasetProperties() {
JDBCDatastoreDefinition def = new JDBCDatastoreDefinition();
JDBCDatastoreProperties datastore = new JDBCDatastoreProperties("datastore");
datastore.dbTypes.setValue("ORACLE");
datastore.jdbcUrl.setValue(allSetting.getJdbcUrl());
datastore.userId.setValue(allSetting.getUsername());
datastore.password.setValue(allSetting.getPassword());
JDBCDatasetProperties dataset = (JDBCDatasetProperties) def.createDatasetProperties(datastore);
dataset.sql.setValue(DBTestUtils.getSQL(tablename));
return dataset;
}
use of org.talend.components.jdbc.datastore.JDBCDatastoreDefinition 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));
dataset.updateSchema();
JDBCInputProperties properties = (JDBCInputProperties) definition.createRuntimeProperties();
properties.setDatasetProperties(dataset);
return properties;
}
use of org.talend.components.jdbc.datastore.JDBCDatastoreDefinition in project components by Talend.
the class JdbcDatasetTestIT method createDatasetProperties.
private JDBCDatasetProperties createDatasetProperties(boolean updateSchema) {
JDBCDatastoreDefinition def = new JDBCDatastoreDefinition();
JDBCDatastoreProperties datastore = new JDBCDatastoreProperties("datastore");
datastore.dbTypes.setValue("DERBY");
datastore.afterDbTypes();
datastore.jdbcUrl.setValue(allSetting.getJdbcUrl());
datastore.userId.setValue(allSetting.getUsername());
datastore.password.setValue(allSetting.getPassword());
JDBCDatasetProperties dataset = (JDBCDatasetProperties) def.createDatasetProperties(datastore);
dataset.sql.setValue(DBTestUtils.getSQL(tablename));
if (updateSchema) {
dataset.updateSchema();
}
return dataset;
}
use of org.talend.components.jdbc.datastore.JDBCDatastoreDefinition 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