public boolean populateThinTable ( FieldList fieldList , boolean bApplyMappedFilter ) { Record record = this ; if ( bApplyMappedFilter ) record = this . applyMappedFilter ( ) ; if ( record == null ) return false ; FieldTable table = fieldList . getTable ( ) ; boolean bAutoSequence = fieldList . isAutoSequence ( ) ; boolean [ ] rgListeners = null ; Object [ ] rgFieldListeners = null ; int iOldOpenMode = fieldList . getOpenMode ( ) ; fieldList . setOpenMode ( DBConstants . OPEN_NORMAL ) ; try { fieldList . setAutoSequence ( false ) ; // Disable autoseq temporarily if ( fieldList instanceof Record ) { rgListeners = ( ( Record ) fieldList ) . setEnableListeners ( false ) ; rgFieldListeners = ( ( Record ) fieldList ) . setEnableFieldListeners ( false ) ; } while ( record . hasNext ( ) ) { record . next ( ) ; table . addNew ( ) ; if ( bApplyMappedFilter ) this . moveDataToThin ( record , fieldList ) ; else this . copyAllFields ( record , fieldList ) ; table . add ( fieldList ) ; } } catch ( DBException ex ) { ex . printStackTrace ( ) ; } finally { fieldList . setAutoSequence ( bAutoSequence ) ; if ( rgListeners != null ) ( ( Record ) fieldList ) . setEnableListeners ( rgListeners ) ; if ( rgFieldListeners != null ) ( ( Record ) fieldList ) . setEnableFieldListeners ( rgFieldListeners ) ; fieldList . setOpenMode ( iOldOpenMode ) ; } if ( bApplyMappedFilter ) this . freeMappedRecord ( record ) ; return true ; }
Utility to copy this entire table to this thin table .