Package com.fauna.types
Class NamedDocument
- java.lang.Object
-
- com.fauna.types.BaseDocument
-
- com.fauna.types.NamedDocument
-
- All Implemented Interfaces:
java.lang.Iterable<BaseDocument.Entry>
public final class NamedDocument extends BaseDocument
Represents a document that has a "name" instead of an "id". For example, a Role document is represented as a NamedDocument.
-
-
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 NamedDocument(java.lang.String name, Module coll, java.time.Instant ts)
Initializes a new instance of the NamedDocument class with the specified name, coll, and ts.NamedDocument(java.lang.String name, Module coll, java.time.Instant ts, java.util.Map<java.lang.String,java.lang.Object> data)
Initializes a new instance of the NamedDocument class with the specified name, 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
getName()
Gets the string value of the document name.int
hashCode()
-
Methods inherited from class com.fauna.types.BaseDocument
containsKey, get, getCollection, getData, getTs, iterator, size
-
-
-
-
Constructor Detail
-
NamedDocument
public NamedDocument(java.lang.String name, Module coll, java.time.Instant ts)
Initializes a new instance of the NamedDocument class with the specified name, coll, and ts.- Parameters:
name
- The string value of the document name.coll
- The module to which the document belongs.ts
- The timestamp of the document.
-
NamedDocument
public NamedDocument(java.lang.String name, Module coll, java.time.Instant ts, java.util.Map<java.lang.String,java.lang.Object> data)
Initializes a new instance of the NamedDocument class with the specified name, coll, ts, and additional data stored as key/value pairs on the instance.- Parameters:
name
- The string value of the document name.coll
- The module to which the document belongs.ts
- The timestamp of the document.data
- Additional data on the document.
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the string value of the document name.- Returns:
- The name of the document.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-