blob: b35ec5e00ef738372558032b511468d483111486 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.document;
/**
* Transient class. Only for internal use in document and documentapi.
*
* @author baldersheim
* @author toregge
*/
public class DocumentGet extends DocumentOperation {
private final DocumentId docId;
public DocumentGet(DocumentId docId) { this.docId = docId; }
@Override
public DocumentId getId() { return docId; }
@Override
public void setCondition(TestAndSetCondition condition) {
throw new UnsupportedOperationException("conditional DocumentGet is not supported");
}
@Override
public String toString() {
return "DocumentGet '" + docId + "'";
}
@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 int hashCode() {
return docId.hashCode();
}
}
|