extraDbUrl,
rsEle.getAttribute( "user" ),
rsEle.getAttribute( "pwd" ) );
}
else {
DatabaseTableModel tableModel = new DatabaseTableModel( currentProject );
String escapeStr = rsEle.getAttribute( "escape" );
if ( escapeStr != null )
tableModel.setDoesEscapeProcessing( "true".equals( escapeStr ));
tableModel.setName( rsEle.getAttribute( "id" ) );
boolean updateDb = false;
String updateStr = rsEle.getAttribute( "update" );
if ( updateStr != null )
updateDb = updateStr.compareTo( "true" ) == 0;
String sqlStr = rsEle.getAttribute( "sql" );
if (( sqlStr != null ) && ( sqlStr.length() > 0 ))
tableModel.setSqlStatement( sqlStr, rsEle.getAttribute( "conn" ), updateDb );
else {
// We should probably change the name table to from as it equates to the FROM clause
tableModel.setupTable( rsEle.getAttribute( "from" ),
rsEle.getAttribute( "fields" ),
rsEle.getAttribute( "where" ),
rsEle.getAttribute( "conn" ),
updateDb );
String distinctStr = rsEle.getAttribute( "distinct" );
if ( distinctStr != null )
tableModel.setDistinct( distinctStr.equals( "true" ));
tableModel.setOrderField( rsEle.getAttribute( "order" ) );
}
model.append( tableModel );
}
registerDatabaseNode( rsEle );
}