public void getBaseDataClass ( FieldStuff fieldStuff ) { Record recClassInfo2 = m_recClassInfo2 ; FieldData recFieldData = ( FieldData ) this . getRecord ( FieldData . FIELD_DATA_FILE ) ; String strRecordClass = recFieldData . getField ( FieldData . FIELD_CLASS ) . getString ( ) ; fieldStuff . strBaseFieldClass = null ; try { while ( true ) { recClassInfo2 . setKeyArea ( ClassInfo . CLASS_NAME_KEY ) ; recClassInfo2 . getField ( ClassInfo . CLASS_NAME ) . setString ( strRecordClass ) ; // Class of this record if ( ( ! recClassInfo2 . seek ( "=" ) ) || ( strRecordClass == null ) || ( strRecordClass . length ( ) == 0 ) ) { if ( fieldStuff . strBaseFieldClass == null ) fieldStuff . strBaseFieldClass = recFieldData . getField ( FieldData . FIELD_CLASS ) . getString ( ) ; // Never return ; } if ( fieldStuff . strBaseFieldClass == null ) { String packageName = ( ( ClassInfo ) recClassInfo2 ) . getPackageName ( null ) ; if ( packageName . endsWith ( ".base.field" ) ) fieldStuff . strBaseFieldClass = recClassInfo2 . getField ( ClassInfo . CLASS_NAME ) . toString ( ) ; } if ( strRecordClass . indexOf ( "Field" ) != - 1 ) { String strType = strRecordClass . substring ( 0 , strRecordClass . indexOf ( "Field" ) ) ; if ( ( strType . equals ( "DateTime" ) ) || ( strType . equals ( "Time" ) ) ) strType = "Date" ; if ( strType . length ( ) > 0 ) if ( "Short Integer Double Float Boolean String Date" . indexOf ( strType ) != - 1 ) { if ( ( fieldStuff . strDataClass == null ) || ( fieldStuff . strDataClass . length ( ) == 0 ) ) fieldStuff . strDataClass = strType ; // End of based records - not found return ; } } strRecordClass = recClassInfo2 . getField ( ClassInfo . BASE_CLASS_NAME ) . getString ( ) ; } } catch ( DBException ex ) { ex . printStackTrace ( ) ; } }
Read thru the classes until you get a Physical data class .