Package com.couchbase.client.java.view
Interface AsyncSpatialViewRow
- All Known Implementing Classes:
DefaultAsyncSpatialViewRow
@Committed @Public public interface AsyncSpatialViewRow
Represents a row fetched from the Spatial
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.1.0
- Author:
- Michael Nitschinger
-
Method Summary
Modifier and Type Method Description rx.Observable<JsonDocument>
document()
Load the underlying document.<D extends Document<?>>
rx.Observable<D>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.Object
value()
The value of the row.
-
Method Details
-
id
String id()The id of the document, if not reduced.- Returns:
- the id of the document.
-
key
JsonArray key()The key of the row.- Returns:
- the key.
-
value
Object value()The value of the row. The object can be any valid JSON object, includingJsonArray
orJsonObject
.- Returns:
- the value if set.
-
geometry
JsonObject geometry()The geometry of the row, if emitted. Note that the geometry is only set if GeoJSON is emitted by the spatial view.- Returns:
- the GeoJSON geometry if set.
-
document
rx.Observable<JsonDocument> document()Load the underlying document. 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. 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.
-