public void init ( BaseField field , Record record , String keyAreaName , boolean bCloseOnFree , boolean bUpdateRecord , boolean bAllowNull ) { super . init ( field ) ; m_record = record ; this . keyAreaName = keyAreaName ; m_keyField = null ; m_bCloseOnFree = bCloseOnFree ; m_bUpdateRecord = bUpdateRecord ; m_bAllowNull = bAllowNull ; m_bMoveBehavior = false ; m_record . addListener ( new FileRemoveBOnCloseHandler ( this ) ) ; // Remove this if you close the file first if ( m_bUpdateRecord ) { if ( ( m_record . getOpenMode ( ) & DBConstants . LOCK_TYPE_MASK ) == 0 ) // If there is no lock strategy or type, set one. if ( m_record . getTask ( ) != null ) m_record . setOpenMode ( m_record . getOpenMode ( ) | m_record . getTask ( ) . getDefaultLockType ( m_record . getDatabaseType ( ) ) ) ; } else m_record . setOpenMode ( DBConstants . OPEN_READ_ONLY ) ; // Dont Lock the record if any changes (Also caches records). }
Initialize this listener .