if ( dataObject instanceof IPreparedComponent ) {
final IPreparedComponent comp = (IPreparedComponent) dataObject;
factory.addPreparedComponent( name, comp );
} else if ( dataObject instanceof IPentahoResultSet ) {
final IPentahoResultSet resultset = (IPentahoResultSet) dataObject;
resultset.beforeFirst();
factory.addTable( name, new PentahoTableModel( resultset ) );
} else if ( dataObject instanceof TableModel ) {
final TableModel model = (TableModel) dataObject;
factory.addTable( name, model );
}