public ORecordTrackedSet(final ORecord iSourceRecord) { this.sourceRecord = iSourceRecord; if (iSourceRecord != null) iSourceRecord.setDirty(); }
public void remove() { underlying.remove(); if (sourceRecord != null) sourceRecord.setDirty(); }
public void remove() { underlying.remove(); if (sourceRecord != null) sourceRecord.setDirty(); } }
@SuppressWarnings("unchecked") public OIdentifiable update(final OIdentifiable iValue) { if (underlying instanceof OLazyIterator) { final OIdentifiable old = ((OLazyIterator<OIdentifiable>) underlying).update(iValue); if (sourceRecord != null && !old.equals(iValue)) sourceRecord.setDirty(); return old; } else throw new UnsupportedOperationException("Underlying iterator not supports lazy updates (Interface OLazyIterator"); }
@SuppressWarnings("unchecked") public OTrackedSet<T> setDirty() { if (status != STATUS.UNMARSHALLING && sourceRecord != null && !(sourceRecord.isDirty() && ORecordInternal.isContentChanged(sourceRecord))) sourceRecord.setDirty(); return this; }
@SuppressWarnings("unchecked") public <RET> RET setDirty() { if (status != STATUS.UNMARSHALLING && sourceRecord != null && !(sourceRecord.isDirty() && ORecordInternal.isContentChanged(sourceRecord))) sourceRecord.setDirty(); return (RET) this; }
@SuppressWarnings({ "unchecked" }) public OTrackedMap<T> setDirty() { if (status != STATUS.UNMARSHALLING && sourceRecord != null && !(sourceRecord.isDirty() && ORecordInternal.isContentChanged(sourceRecord))) sourceRecord.setDirty(); return this; }
@SuppressWarnings("unchecked") public ORecordTrackedSet setDirty() { if (status != STATUS.UNMARSHALLING && sourceRecord != null && !(sourceRecord.isDirty() && ORecordInternal.isContentChanged(sourceRecord))) sourceRecord.setDirty(); return this; }
@Override public OResult next() { OResult toCopy = upstream.next(); long begin = profilingEnabled ? System.nanoTime() : 0; try { ORecord resultDoc = null; if (toCopy.isElement()) { ORecord docToCopy = toCopy.getElement().get().getRecord(); if (docToCopy instanceof ODocument) { resultDoc = ((ODocument) docToCopy).copy(); resultDoc.getIdentity().reset(); ((ODocument) resultDoc).setClassName(null); resultDoc.setDirty(); } else if (docToCopy instanceof OBlob) { ORecordBytes newBlob = ((ORecordBytes) docToCopy).copy(); OResultInternal result = new OResultInternal(); result.setElement(newBlob); return result; } } else { resultDoc = toCopy.toElement().getRecord(); } return new OUpdatableResult((ODocument) resultDoc); } finally { if (profilingEnabled) { cost += (System.nanoTime() - begin); } } }
rec.setDirty(); synchronized (this) { saveRecord(rec);
record.setDirty(); ORecordInternal.setIdentity(record, new ORecordId());