code: public void deleteRecord(final ORecordInternal<?> iRecord, final OPERATION_MODE iMode) {
      if (!iRecord.getIdentity().isPersistent())
        return;
  
      try {
        database.executeDeleteRecord(iRecord, iRecord.getVersion(), true, true, iMode);
      } catch (Exception e) {
        // REMOVE IT FROM THE CACHE TO AVOID DIRTY RECORDS
        final ORecordId rid = (ORecordId) iRecord.getIdentity();
        if (rid.isValid())
          database.getLevel1Cache().freeRecord(rid);
  
        if (e instanceof RuntimeException)
          throw (RuntimeException) e;
        throw new OException(e);
      }
    }
docs: Deletes the record.