private void scanSharedFields ( ) { if ( ! m_bFirstTime ) return ; m_bFirstTime = false ; m_vFieldList = new Vector < FieldSummary > ( ) ; m_iCurrentIndex = 0 ; String strClassName = m_recClassInfo . getField ( ClassInfo . CLASS_NAME ) . toString ( ) ; // Step one - Get a list of all the base classes to the origin [0] = VirtualRecord. m_rgstrClasses = this . getBaseRecordClasses ( strClassName ) ; String strBaseSharedRecord = null ; //if (includeSharedFields == true) { // Now add all the classes from the first shared record up the chain FileHdr recFileHdr = new FileHdr ( Record . findRecordOwner ( m_recFileHdr ) ) ; recFileHdr . setKeyArea ( FileHdr . FILE_NAME_KEY ) ; try { for ( int i = 0 ; i < m_rgstrClasses . length ; i ++ ) { recFileHdr . addNew ( ) ; recFileHdr . getField ( FileHdr . FILE_NAME ) . setString ( m_rgstrClasses [ i ] ) ; if ( recFileHdr . seek ( null ) == true ) // For shared records, include overriding record fields. // if (recFileHdr.getField(FileHdr.TYPE).toString().indexOf("SHARED_TABLE") != -1) // For shared records, include overriding record fields. { strBaseSharedRecord = m_rgstrClasses [ i ] ; break ; } } } catch ( DBException ex ) { ex . printStackTrace ( ) ; } finally { if ( recFileHdr != null ) recFileHdr . free ( ) ; } } for ( int i = 0 ; i < m_rgstrClasses . length ; i ++ ) { this . scanBaseFields ( m_rgstrClasses [ i ] , ( i == m_rgstrClasses . length - 1 ) ) ; if ( m_rgstrClasses [ i ] . equals ( strBaseSharedRecord ) ) break ; } if ( strBaseSharedRecord != null ) this . scanExtendedClasses ( strBaseSharedRecord ) ; if ( strBaseSharedRecord != null ) if ( ! strClassName . equals ( strBaseSharedRecord ) ) { // This class is not the base class, merge the two this . scanRecordsFields ( m_rgstrClasses ) ; } }
Build the field list from the concrete and base record classes .