Package com.fauna.types
Class Document
- java.lang.Object
-
- com.fauna.types.BaseDocument
-
- com.fauna.types.Document
-
- All Implemented Interfaces:
java.lang.Iterable<BaseDocument.Entry>
public final class Document extends BaseDocument
Represents a document.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.fauna.types.BaseDocument
BaseDocument.Entry
-
-
Field Summary
-
Fields inherited from class com.fauna.types.BaseDocument
data
-
-
Constructor Summary
Constructors Constructor Description Document(java.lang.String id, Module coll, java.time.Instant ts)
Initializes a new instance of the Document class with the specified id, coll, and ts.Document(java.lang.String id, Module coll, java.time.Instant ts, java.util.Map<java.lang.String,java.lang.Object> data)
Initializes a new instance of the Document class with the specified id, coll, ts, and additional data stored as key/value pairs on the instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getId()
Gets the string value of the document id.int
hashCode()
-
Methods inherited from class com.fauna.types.BaseDocument
containsKey, get, getCollection, getData, getTs, iterator, size
-
-
-
-
Constructor Detail
-
Document
public Document(java.lang.String id, Module coll, java.time.Instant ts)
Initializes a new instance of the Document class with the specified id, coll, and ts.- Parameters:
id
- The string value of the document id.coll
- The module to which the document belongs.ts
- The timestamp of the document.
-
Document
public Document(java.lang.String id, Module coll, java.time.Instant ts, java.util.Map<java.lang.String,java.lang.Object> data)
Initializes a new instance of the Document class with the specified id, coll, ts, and additional data stored as key/value pairs on the instance.- Parameters:
id
- The string value of the document id.coll
- The module to which the document belongs.ts
- The timestamp of the document.data
- Additional data on the document.
-
-
Method Detail
-
getId
public java.lang.String getId()
Gets the string value of the document id.- Returns:
- The string value of the document id.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-