@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DocumentGet)) return false; DocumentGet that = (DocumentGet) o; if (!docId.equals(that.docId)) return false; return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DocumentRemove)) return false; DocumentRemove that = (DocumentRemove) o; if (!docId.equals(that.docId)) return false; return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DocumentState)) return false; DocumentState that = (DocumentState) o; if (removeEntry != that.removeEntry) return false; if (timestamp != that.timestamp) return false; if (docId != null ? !docId.equals(that.docId) : that.docId != null) return false; return gid.equals(that.gid); }
public boolean equals(Object o) { if (!(o instanceof DocumentIdResponse)) { return false; } DocumentIdResponse docResp = (DocumentIdResponse) o; return super.equals(docResp) && ((documentId == null && docResp.documentId == null) || (documentId != null && docResp.documentId != null && documentId.equals(docResp.documentId))); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof DocumentUpdate)) return false; DocumentUpdate that = (DocumentUpdate) o; if (docId != null ? !docId.equals(that.docId) : that.docId != null) return false; if (documentType != null ? !documentType.equals(that.documentType) : that.documentType != null) return false; if (!fieldPathUpdates.equals(that.fieldPathUpdates)) return false; if (!id2FieldUpdates.equals(that.id2FieldUpdates)) return false; if (this.getCreateIfNonExistent() != ((DocumentUpdate) o).getCreateIfNonExistent()) return false; return true; }
/** Returns true if the argument is a document which has the same set of values */ @Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof Document)) return false; Document other = (Document) o; return (super.equals(o) && docId.equals(other.docId) && header.equals(other.header) && body.equals(other.body)); }
/** * Adds all the field- and field path updates of the given document update to this. If the given update refers to a * different document or document type than this, this method throws an exception. * * @param update The update whose content to add to this. * @throws IllegalArgumentException If the {@link DocumentId} or {@link DocumentType} of the given DocumentUpdate * does not match the content of this. */ public void addAll(DocumentUpdate update) { if (update == null) { return; } if (!docId.equals(update.docId)) { throw new IllegalArgumentException("Expected " + docId + ", got " + update.docId + "."); } if (!documentType.equals(update.documentType)) { throw new IllegalArgumentException("Expected " + documentType + ", got " + update.documentType + "."); } addFieldUpdates(update.fieldUpdates()); for (FieldPathUpdate pathUpd : update.fieldPathUpdates) { addFieldPathUpdate(pathUpd); } }
assertNotNull(entry.getDocumentId()); if (entry.getDocumentId().equals(doc1.getId())) { assertTrue("Got removed document 1 when iterating without removes", includeRemoves); timeDoc1 = entry.getTimestamp(); } else if (entry.getDocumentId().equals(doc2.getId())) { assertEquals(DocEntry.Type.PUT_ENTRY, entry.getType()); timeDoc2 = entry.getTimestamp();