public void set ( Object data , int iOpenMode ) throws DBException , RemoteException { Record record = this . getMainRecord ( ) ; int iOldOpenMode = record . getOpenMode ( ) ; try { Utility . getLogger ( ) . info ( "EJB Set" ) ; synchronized ( this . getTask ( ) ) { record . setOpenMode ( ( iOldOpenMode & ~ DBConstants . LOCK_TYPE_MASK ) | ( iOpenMode & DBConstants . LOCK_TYPE_MASK ) ) ; // Use client's lock data if ( record . getEditMode ( ) == Constants . EDIT_CURRENT ) record . edit ( ) ; Record recordBase = record . getTable ( ) . getCurrentTable ( ) . getRecord ( ) ; int iFieldTypes = this . getFieldTypes ( recordBase ) ; int iErrorCode = this . moveBufferToFields ( data , iFieldTypes , recordBase ) ; if ( iErrorCode != DBConstants . NORMAL_RETURN ) ; //? if ( DBConstants . TRUE . equals ( record . getTable ( ) . getProperty ( DBParams . SUPRESSREMOTEDBMESSAGES ) ) ) record . setSupressRemoteMessages ( true ) ; record . getTable ( ) . set ( recordBase ) ; } } catch ( DBException ex ) { throw ex ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; throw new DBException ( ex . getMessage ( ) ) ; } finally { record . setSupressRemoteMessages ( false ) ; this . getMainRecord ( ) . setOpenMode ( iOldOpenMode ) ; } }
Update the current record . This method has some wierd code to emulate the way behaviors are called on a write .