public ORecord saveRecord ( final ORecord iRecord , final String iClusterName , final OPERATION_MODE iMode , boolean iForceCreate , final ORecordCallback < ? extends Number > iRecordCreatedCallback , ORecordCallback < Integer > iRecordUpdatedCallback ) { try { return database . saveAll ( iRecord , iClusterName , iMode , iForceCreate , iRecordCreatedCallback , iRecordUpdatedCallback ) ; } catch ( Exception e ) { // REMOVE IT FROM THE CACHE TO AVOID DIRTY RECORDS final ORecordId rid = ( ORecordId ) iRecord . getIdentity ( ) ; if ( rid . isValid ( ) ) database . getLocalCache ( ) . freeRecord ( rid ) ; if ( e instanceof ONeedRetryException ) throw ( ONeedRetryException ) e ; throw OException . wrapException ( new ODatabaseException ( "Error during saving of record" + ( iRecord != null ? " with rid " + iRecord . getIdentity ( ) : "" ) ) , e ) ; } }
Update the record .