if ( modelParam.isInput( ) ) { dteDataSet.addInputParamBinding( newInputParamBinding( modelParam.getName( ), modelParam.getDefaultValue( ) ) ); }
    void adaptBaseDataSet( DataSetHandle modelDataSet,            				BaseDataSetDesign dteDataSet )    {        dteDataSet.setDataSource( modelDataSet.getDataSourceName() );        dteDataSet.setBeforeOpenScript( modelDataSet.getBeforeOpen() );        dteDataSet.setAfterOpenScript( modelDataSet.getAfterOpen() );        dteDataSet.setOnFetchScript( modelDataSet.getOnFetch() );        dteDataSet.setBeforeCloseScript( modelDataSet.getBeforeClose() );        dteDataSet.setAfterCloseScript( modelDataSet.getAfterClose() );        // dataset parameters definition        Iterator elmtIter = modelDataSet.parametersIterator();        if ( elmtIter != null )        {            while ( elmtIter.hasNext() )            {            	DataSetParameterHandle modelParam = (DataSetParameterHandle ) elmtIter.next();				dteDataSet.addParameter( newParam( modelParam ) );            }        }        // input parameter bindings        elmtIter = modelDataSet.paramBindingsIterator();        if ( elmtIter != null )        {            while ( elmtIter.hasNext() )            {                ParamBindingHandle modelParamBinding = (ParamBindingHandle) elmtIter.next();                dteDataSet.addInputParamBinding( newInputParamBinding( modelParamBinding ) );            }        }                // computed columns        elmtIter = modelDataSet.computedColumnsIterator();        if ( elmtIter != null )        {            while ( elmtIter.hasNext() )            {                ComputedColumnHandle modelCmptdColumn =                     (ComputedColumnHandle) elmtIter.next();                IComputedColumn dteCmptdColumn = newComputedColumn( modelCmptdColumn );                dteDataSet.addComputedColumn( dteCmptdColumn );            }        }        // filter conditions        elmtIter = modelDataSet.filtersIterator();        if ( elmtIter != null )        {            while ( elmtIter.hasNext() )            {                FilterConditionHandle modelFilter = (FilterConditionHandle) elmtIter.next();                IFilterDefinition dteFilter = newFilter( modelFilter );                dteDataSet.addFilter( dteFilter );            }        }        // merging result set column and column hints into DtE columnDefn;        // first create new columnDefn based on model's column hints         elmtIter = modelDataSet.columnHintsIterator();        if ( elmtIter != null )        {            while ( elmtIter.hasNext() )            {                ColumnHintHandle modelColumnHint = (ColumnHintHandle) elmtIter.next();                dteDataSet.addResultSetHint( newColumnDefn( modelColumnHint ) );            }        }        // now merge model's result set column info into existing columnDefn         // with same column name, otherwise create new columnDefn        // based on the model's result set column        List columnDefns = dteDataSet.getResultSetHints();        elmtIter = modelDataSet.resultSetIterator();        if ( elmtIter != null )        {            while ( elmtIter.hasNext() )            {                ResultSetColumnHandle modelColumn = (ResultSetColumnHandle) elmtIter.next();                ColumnDefinition existDefn = findColumnDefn( columnDefns, modelColumn.getColumnName() );                if ( existDefn != null )                    updateColumnDefn( existDefn, modelColumn );                else                    dteDataSet.addResultSetHint( newColumnDefn( modelColumn ) );            }        }    }