core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentAbstract.java
public ODatabase<ORecord> delete(final ORID iRecord, final int iVersion) {
    ORecord record = load(iRecord);
    ORecordInternal.setVersion(record, iVersion);
    delete(record);
    return this;
  }
public ODatabase<ORecord> delete(final ORID iRecord, final int iVersion) {
    ORecord record = load(iRecord);
    ORecordInternal.setVersion(record, iVersion);
    delete(record);
    return this;
  }
Deletes the record checking the version.