@Override public boolean equals(final Object obj) { if (!(obj instanceof OPlaceholder)) return false; final OPlaceholder other = (OPlaceholder) obj; return rid.equals(other.rid) && recordVersion == other.recordVersion; }
@Override public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof OIdentifiable) return _recordId.equals(((OIdentifiable) obj).getIdentity()); return false; }
private Collection<OIdentifiable> readLinkCollection(BytesContainer bytes, Collection<OIdentifiable> found) { final int items = OVarIntSerializer.readAsInteger(bytes); for (int i = 0; i < items; i++) { ORecordId id = readOptimizedLink(bytes); if (id.equals(NULL_RECORD_ID)) found.add(null); else found.add(id); } return found; }
private Collection<OIdentifiable> readLinkCollection(BytesContainer bytes, Collection<OIdentifiable> found) { final int items = OVarIntSerializer.readAsInteger(bytes); for (int i = 0; i < items; i++) { ORecordId id = readOptimizedLink(bytes); if (id.equals(NULL_RECORD_ID)) found.add(null); else found.add(id); } return found; }
protected Collection<OIdentifiable> readLinkCollection(final BytesContainer bytes, final Collection<OIdentifiable> found, boolean justRunThrough) { final int items = OVarIntSerializer.readAsInteger(bytes); for (int i = 0; i < items; i++) { ORecordId id = readOptimizedLink(bytes, justRunThrough); if (!justRunThrough) { if (id.equals(NULL_RECORD_ID)) found.add(null); else found.add(id); } } return found; }
private Map<Object, OIdentifiable> readLinkMap(final BytesContainer bytes) { int size = OVarIntSerializer.readAsInteger(bytes); Map<Object, OIdentifiable> result = new HashMap<>(); while ((size--) > 0) { OType keyType = readOType(bytes); Object key = deserializeValue(bytes, keyType); ORecordId value = readOptimizedLink(bytes); if (value.equals(NULL_RECORD_ID)) result.put(key, null); else result.put(key, value); } return result; }
private Map<Object, OIdentifiable> readLinkMap(final BytesContainer bytes, final ODocument document) { int size = OVarIntSerializer.readAsInteger(bytes); Map<Object, OIdentifiable> result = new ORecordLazyMap(document); while ((size--) > 0) { OType keyType = readOType(bytes); Object key = deserializeValue(bytes, keyType, document); ORecordId value = readOptimizedLink(bytes); if (value.equals(NULL_RECORD_ID)) result.put(key, null); else result.put(key, value); } return result; }
/** * Returns a record containing the original in-conflict changes. */ private ODocument getChangeRecord(final ORecordId rid, final byte[] content) { // check the 'record-save' cache as it's likely already there ODocument record = (ODocument) ORecordSaveThreadLocal.getLast(); if (record == null || !rid.equals(record.getIdentity())) { record = new ODocument(rid).fromStream(content); } return record; }
protected Map<Object, OIdentifiable> readLinkMap(final BytesContainer bytes, final ODocument document, boolean justRunThrough) { int size = OVarIntSerializer.readAsInteger(bytes); ORecordLazyMap result = null; if (!justRunThrough) result = new ORecordLazyMap(document); result.setInternalStatus(ORecordElement.STATUS.UNMARSHALLING); try { while ((size--) > 0) { final OType keyType = readOType(bytes, justRunThrough); final Object key = deserializeValue(bytes, keyType, document, true, -1, -1, justRunThrough); final ORecordId value = readOptimizedLink(bytes, justRunThrough); if (value.equals(NULL_RECORD_ID)) result.put(key, null); else result.put(key, value); } return result; } finally { result.setInternalStatus(ORecordElement.STATUS.LOADED); } }
rid.setClusterPosition(position); if (rid.equals(new ORecordId(configuration1.getIndexMgrRecordId())) && rid .equals(new ORecordId(configuration2.getIndexMgrRecordId()))) continue; if (rid.equals(new ORecordId(configuration1.getSchemaRecordId())) && rid .equals(new ORecordId(configuration2.getSchemaRecordId()))) continue;