Package io.nitric.api.document
Class ResultDoc<T>
- java.lang.Object
-
- io.nitric.api.document.ResultDoc<T>
-
public class ResultDoc<T> extends Object
Provides a Result Document class for QueryResults and Streams. The ResultDoc class provides access to the document's content and key.- See Also:
Query
,QueryResults
-
-
Constructor Detail
-
ResultDoc
public ResultDoc(Key key, T content)
Create a new ResultDoc with the given key and content.- Parameters:
key
- the document keycontent
- the document content
-
ResultDoc
public ResultDoc(T content)
Create a new ResultDoc with the given content. Note this convience constructor is provided for unit testing, the Query service will always populate the ResultDoc key.- Parameters:
content
- the document content
-
-