public class DefaultAsyncSpatialViewRow extends Object implements AsyncSpatialViewRow
Default implementation of a AsyncSpatialViewRow.
| Constructor and Description |
|---|
DefaultAsyncSpatialViewRow(AsyncBucket bucket,
String id,
JsonArray key,
Object value,
JsonObject geometry,
Document<?> document) |
| Modifier and Type | Method and Description |
|---|---|
rx.Observable<JsonDocument> |
document()
Load the underlying document.
|
<D extends Document<?>> |
document(Class<D> target)
Load the underlying document.
|
JsonObject |
geometry()
The geometry of the row, if emitted.
|
String |
id()
The id of the document, if not reduced.
|
JsonArray |
key()
The key of the row.
|
String |
toString() |
Object |
value()
The value of the row.
|
public DefaultAsyncSpatialViewRow(AsyncBucket bucket, String id, JsonArray key, Object value, JsonObject geometry, Document<?> document)
public String id()
AsyncSpatialViewRowThe id of the document, if not reduced.
id in interface AsyncSpatialViewRowpublic JsonArray key()
AsyncSpatialViewRowThe key of the row.
key in interface AsyncSpatialViewRowpublic Object value()
AsyncSpatialViewRowThe value of the row.
The object can be any valid JSON object, including JsonArray or JsonObject.
value in interface AsyncSpatialViewRowpublic JsonObject geometry()
AsyncSpatialViewRowThe geometry of the row, if emitted.
Note that the geometry is only set if GeoJSON is emitted by the spatial view.
geometry in interface AsyncSpatialViewRowpublic rx.Observable<JsonDocument> document()
AsyncSpatialViewRowLoad the underlying document.
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 AsyncSpatialViewRowObservable containing the document once loaded.public <D extends Document<?>> rx.Observable<D> document(Class<D> target)
AsyncSpatialViewRowLoad the underlying document.
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 AsyncSpatialViewRowtarget - the target class to decode into.Observable containing the document once loaded.Copyright © 2015 Couchbase, Inc.