return connection;
}
private RecordSource createRecordSource(Node recordSourceNode) throws BadRecordSourceException {
Element recordSourceElement = (Element) recordSourceNode;
RecordSource recordSource = new RecordSource(Integer.parseInt(readTagValue(recordSourceElement, "order")));
recordSource.setRelationship(RecordSource.Relationship.valueOf(readTagValue(recordSourceElement, "relationship").toUpperCase().trim()));
recordSource.setTableName(readTagValue(recordSourceElement, "table_name"));
recordSource.setPrimaryKeyColumnMap(readKeyColumns(recordSourceElement, "primary_key_column"));
recordSource.setForeignKeyColumnMap(readKeyColumns(recordSourceElement, "foreign_key_column"));
recordSource.setCumulate(Boolean.parseBoolean(readTagValue(recordSourceElement, "cumulate")));
String limitString = readTagValue(recordSourceElement, "limit");
if (limitString != null) {
recordSource.setLimit(Integer.parseInt(limitString));
}
List<Column> columnList = readOrdinaryColumns(recordSourceElement, "columns");
if (!columnList.isEmpty()) {
recordSource.setColumnList(columnList);
}
validateRecordSource(recordSource);
return recordSource;
}