Package com.couchbase.client.java.view
Class DefaultViewRow
- java.lang.Object
-
- com.couchbase.client.java.view.DefaultViewRow
-
-
Constructor Summary
Constructors Constructor Description DefaultViewRow(CouchbaseEnvironment env, AsyncViewRow asyncViewRow)
-
Method Summary
All Methods Instance Methods Concrete Methods 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.String
id()
The id of the document, if not reduced.Object
key()
The key of the row index.String
toString()
Object
value()
The value of the row index.
-
-
-
Constructor Detail
-
DefaultViewRow
public DefaultViewRow(CouchbaseEnvironment env, AsyncViewRow asyncViewRow)
-
-
Method Detail
-
id
public String id()
Description copied from interface:ViewRow
The id of the document, if not reduced.
-
key
public Object key()
Description copied from interface:ViewRow
The key of the row index. The object can be any valid JSON object, includingJsonArray
orJsonObject
.
-
value
public Object value()
Description copied from interface:ViewRow
The value of the row index. The object can be any valid JSON object, includingJsonArray
orJsonObject
.
-
document
public JsonDocument document()
Description copied from interface:ViewRow
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.
-
document
public JsonDocument document(long timeout, TimeUnit timeUnit)
Description copied from interface:ViewRow
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.
-
document
public <D extends Document<?>> D document(Class<D> target)
Description copied from interface:ViewRow
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.
-
document
public <D extends Document<?>> D document(Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:ViewRow
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.
-
-