use of org.talend.designer.dbmap.model.tableentry.FilterTableEntry in project tdi-studio-se by Talend.
the class ExternalDataConverter method fillExternalTable.
/**
* DOC amaumont Comment method "process".
*
* @param externalMapperTable
* @param table
*/
private void fillExternalTable(OutputTable table, ExternalDbMapTable externalMapperTable) {
externalMapperTable.setMinimized(table.isMinimized());
externalMapperTable.setName(table.getUniqueName());
externalMapperTable.setTableName(table.getTableName());
/**
* set custom where conditions entries
*/
ArrayList<ExternalDbMapEntry> constraintTableEntries = new ArrayList<ExternalDbMapEntry>();
for (FilterTableEntry constraintWhereTableEntry : table.getWhereFilterEntries()) {
ExternalDbMapEntry externalMapperTableEntry = new ExternalDbMapEntry();
externalMapperTableEntry.setExpression(constraintWhereTableEntry.getExpression());
externalMapperTableEntry.setName(constraintWhereTableEntry.getName());
constraintTableEntries.add(externalMapperTableEntry);
}
externalMapperTable.setCustomWhereConditionsEntries(constraintTableEntries);
/**
* set custom other conditions entries
*/
constraintTableEntries = new ArrayList<ExternalDbMapEntry>();
for (FilterTableEntry constraintOtherTableEntry : table.getOtherFilterEntries()) {
ExternalDbMapEntry externalMapperTableEntry = new ExternalDbMapEntry();
externalMapperTableEntry.setExpression(constraintOtherTableEntry.getExpression());
externalMapperTableEntry.setName(constraintOtherTableEntry.getName());
constraintTableEntries.add(externalMapperTableEntry);
}
externalMapperTable.setCustomOtherConditionsEntries(constraintTableEntries);
outputTables.add(externalMapperTable);
}
Aggregations