Package com.couchbase.client.java.view
Interface SpatialViewRow
- All Known Implementing Classes:
DefaultSpatialViewRow
@Committed @Public public interface SpatialViewRow
Represents a
SpatialViewRow fetched from the View.- Since:
- 2.1.0
- Author:
- Michael Nitschinger
-
Method Summary
Modifier and Type Method Description JsonDocumentdocument()Load the underlying document, if not reduced with the default view timeout.JsonDocumentdocument(long timeout, TimeUnit timeUnit)Load the underlying document, if not reduced with a custom timeout.<D extends Document<?>>
Ddocument(Class<D> target)Load the underlying document, if not reduced with the default view timeout.<D extends Document<?>>
Ddocument(Class<D> target, long timeout, TimeUnit timeUnit)Load the underlying document, if not reduced with a custom timeout.JsonObjectgeometry()Stringid()The id of the document, if not reduced.JsonArraykey()The key of the row index.Objectvalue()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
JsonArray key()The key of the row index. The object can be any valid JSON object, includingJsonArrayorJsonObject.- Returns:
- the key.
-
value
Object value()The value of the row index. The object can be any valid JSON object, includingJsonArrayorJsonObject.- Returns:
- the value.
-
geometry
JsonObject geometry() -
document
JsonDocument document()Load the underlying document, if not reduced with the default view timeout. This method throws: -TimeoutExceptionwrapped in aRuntimeException: If the timeout is exceeded. -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:
- the loaded document, null if not found.
-
document
Load the underlying document, if not reduced with a custom timeout. This method throws: -TimeoutExceptionwrapped in aRuntimeException: If the timeout is exceeded. -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:
timeout- the custom timeout.timeUnit- the time unit for the custom timeout.- Returns:
- the loaded document, null if not found.
-
document
Load the underlying document, if not reduced with the default view timeout. This method throws: -TimeoutExceptionwrapped in aRuntimeException: If the timeout is exceeded. -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 custom target document type.- Returns:
- the loaded document, null if not found.
-
document
Load the underlying document, if not reduced with a custom timeout. This method throws: -TimeoutExceptionwrapped in aRuntimeException: If the timeout is exceeded. -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 custom target document type.timeout- the custom timeout.timeUnit- the time unit for the custom timeout.- Returns:
- the loaded document, null if not found.
-