Package com.couchbase.client.java.view
Interface AsyncViewRow
- All Known Implementing Classes:
DefaultAsyncViewRow
@Committed @Public public interface AsyncViewRow
Represents a row fetched from the
View
.
The row itself contains fixed properties returned, but is also able to - on demand - load the full document if
instructed through the document()
methods.- Since:
- 2.0
- Author:
- Michael Nitschinger
-
Method Summary
Modifier and Type Method Description rx.Observable<JsonDocument>
document()
Load the underlying document, if not reduced.<D extends Document<?>>
rx.Observable<D>document(Class<D> target)
Load the underlying document, if not reduced.String
id()
The id of the document, if not reduced.Object
key()
The key of the row index.Object
value()
The value of the row index.
-
Method Details
-
id
String id()The id of the document, if not reduced.- Returns:
- the id of the document.
-
key
Object key()The key of the row index. The object can be any valid JSON object, includingJsonArray
orJsonObject
.- Returns:
- the key.
-
value
Object value()The value of the row index. The object can be any valid JSON object, includingJsonArray
orJsonObject
.- Returns:
- the value.
-
document
rx.Observable<JsonDocument> document()Load the underlying document, if not reduced. TheObservable
can error under the following conditions: -BackpressureException
: If the incoming request rate is too high to be processed. -IllegalStateException
: If the view is reduced and the ID is null. -TranscodingException
: If the response document could not be decoded.- Returns:
- a
Observable
containing the document once loaded.
-
document
Load the underlying document, if not reduced. TheObservable
can error under the following conditions: -BackpressureException
: If the incoming request rate is too high to be processed. -IllegalStateException
: If the view is reduced and the ID is null. -TranscodingException
: If the response document could not be decoded.- Parameters:
target
- the target class to decode into.- Returns:
- a
Observable
containing the document once loaded.
-