public class DefaultAsyncViewRow extends Object implements AsyncViewRow
Default implementation of a AsyncViewRow
.
Constructor and Description |
---|
DefaultAsyncViewRow(AsyncBucket bucket,
String id,
Object key,
Object value,
Document<?> document) |
Modifier and Type | Method and Description |
---|---|
rx.Observable<JsonDocument> |
document()
Load the underlying document, if not reduced.
|
<D extends Document<?>> |
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.
|
String |
toString() |
Object |
value()
The value of the row index.
|
public DefaultAsyncViewRow(AsyncBucket bucket, String id, Object key, Object value, Document<?> document)
public String id()
AsyncViewRow
The id of the document, if not reduced.
id
in interface AsyncViewRow
public Object key()
AsyncViewRow
The key of the row index.
The object can be any valid JSON object, including JsonArray
or JsonObject
.
key
in interface AsyncViewRow
public Object value()
AsyncViewRow
The value of the row index.
The object can be any valid JSON object, including JsonArray
or JsonObject
.
value
in interface AsyncViewRow
public rx.Observable<JsonDocument> document()
AsyncViewRow
Load the underlying document, if not reduced.
The Observable
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.document
in interface AsyncViewRow
Observable
containing the document once loaded.public <D extends Document<?>> rx.Observable<D> document(Class<D> target)
AsyncViewRow
Load the underlying document, if not reduced.
The Observable
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.document
in interface AsyncViewRow
target
- the target class to decode into.Observable
containing the document once loaded.Copyright © 2015 Couchbase, Inc.