public boolean isARecord ( boolean isAFile ) { Record recFileHdr = ( Record ) this . getRecordOwner ( ) . getRecord ( FileHdr . FILE_HDR_FILE ) ; if ( recFileHdr == null ) { recFileHdr = new FileHdr ( this . getRecordOwner ( ) ) ; this . addListener ( new FreeOnFreeHandler ( recFileHdr ) ) ; } if ( ! recFileHdr . getField ( FileHdr . FILE_NAME ) . equals ( this . getField ( ClassInfo . CLASS_NAME ) ) ) { try { recFileHdr . addNew ( ) ; recFileHdr . getField ( FileHdr . FILE_NAME ) . moveFieldToThis ( this . getField ( ClassInfo . CLASS_NAME ) ) ; int oldKeyArea = recFileHdr . getDefaultOrder ( ) ; recFileHdr . setKeyArea ( FileHdr . FILE_NAME_KEY ) ; recFileHdr . seek ( null ) ; recFileHdr . setKeyArea ( oldKeyArea ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } if ( ( recFileHdr . getEditMode ( ) == DBConstants . EDIT_CURRENT ) && ( this . getField ( ClassInfo . CLASS_NAME ) . toString ( ) . equals ( recFileHdr . getField ( FileHdr . FILE_NAME ) . getString ( ) ) ) ) return true ; // This is a file if ( isAFile ) return false ; // Just looking for files if ( ! "Record" . equalsIgnoreCase ( this . getField ( ClassInfo . CLASS_TYPE ) . toString ( ) ) ) return false ; // If this isn't a physical file, don't build it. if ( this . getField ( ClassInfo . BASE_CLASS_NAME ) . toString ( ) . contains ( "ScreenRecord" ) ) return false ; if ( "Interface" . equalsIgnoreCase ( this . getField ( ClassInfo . CLASS_TYPE ) . toString ( ) ) ) // An interface doesn't have an interface return false ; // If this isn't a physical file, don't build it. if ( RESOURCE_CLASS . equals ( this . getField ( ClassInfo . BASE_CLASS_NAME ) . toString ( ) ) ) return false ; // Resource only class return true ; // This is a record }
IsARecord Method .