Package com.couchbase.client.java.view
Class DefaultSpatialViewRow
java.lang.Object
com.couchbase.client.java.view.DefaultSpatialViewRow
- All Implemented Interfaces:
SpatialViewRow
public class DefaultSpatialViewRow extends Object implements SpatialViewRow
Default implementation of the
SpatialViewRow
.- Since:
- 2.1.0
- Author:
- Michael Nitschinger
-
Constructor Summary
Constructors Constructor Description DefaultSpatialViewRow(CouchbaseEnvironment env, AsyncSpatialViewRow asyncViewRow)
-
Method Summary
Modifier and Type Method Description JsonDocument
document()
Load the underlying document, if not reduced with the default view timeout.JsonDocument
document(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.JsonObject
geometry()
String
id()
The id of the document, if not reduced.JsonArray
key()
The key of the row index.String
toString()
Object
value()
The value of the row index.
-
Constructor Details
-
DefaultSpatialViewRow
-
-
Method Details
-
id
Description copied from interface:SpatialViewRow
The id of the document, if not reduced.- Specified by:
id
in interfaceSpatialViewRow
- Returns:
- the id of the document.
-
key
Description copied from interface:SpatialViewRow
The key of the row index. The object can be any valid JSON object, includingJsonArray
orJsonObject
.- Specified by:
key
in interfaceSpatialViewRow
- Returns:
- the key.
-
value
Description copied from interface:SpatialViewRow
The value of the row index. The object can be any valid JSON object, includingJsonArray
orJsonObject
.- Specified by:
value
in interfaceSpatialViewRow
- Returns:
- the value.
-
geometry
- Specified by:
geometry
in interfaceSpatialViewRow
-
document
Description copied from interface:SpatialViewRow
Load the underlying document, if not reduced with the default view timeout. This method throws: -TimeoutException
wrapped 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.- Specified by:
document
in interfaceSpatialViewRow
- Returns:
- the loaded document, null if not found.
-
document
Description copied from interface:SpatialViewRow
Load the underlying document, if not reduced with a custom timeout. This method throws: -TimeoutException
wrapped 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.- Specified by:
document
in interfaceSpatialViewRow
- Parameters:
timeout
- the custom timeout.timeUnit
- the time unit for the custom timeout.- Returns:
- the loaded document, null if not found.
-
document
Description copied from interface:SpatialViewRow
Load the underlying document, if not reduced with the default view timeout. This method throws: -TimeoutException
wrapped 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.- Specified by:
document
in interfaceSpatialViewRow
- Parameters:
target
- the custom target document type.- Returns:
- the loaded document, null if not found.
-
document
Description copied from interface:SpatialViewRow
Load the underlying document, if not reduced with a custom timeout. This method throws: -TimeoutException
wrapped 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.- Specified by:
document
in interfaceSpatialViewRow
- 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.
-
toString
-