Package com.couchbase.client.java.view
Interface AsyncSpatialViewRow
-
- All Known Implementing Classes:
DefaultAsyncSpatialViewRow
@Committed @Public public interface AsyncSpatialViewRow
Represents a row fetched from the SpatialView. The row itself contains fixed properties returned, but is also able to - on demand - load the full document if instructed through thedocument()methods.- Since:
- 2.1.0
- Author:
- Michael Nitschinger
-
-
Method Summary
All Methods Instance Methods Abstract Methods 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.JsonObjectgeometry()The geometry of the row, if emitted.Stringid()The id of the document, if not reduced.JsonArraykey()The key of the row.Objectvalue()The value of the row.
-
-
-
Method Detail
-
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, includingJsonArrayorJsonObject.- 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. TheObservablecan 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
Observablecontaining the document once loaded.
-
document
<D extends Document<?>> rx.Observable<D> document(Class<D> target)
Load the underlying document. TheObservablecan 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
Observablecontaining the document once loaded.
-
-