K
- the type of key emitted by the view,fixed by the
Key.Type
supplied to the
ViewRequestBuilder
V
- the type of value emitted by the view,specified when supplied to the
ViewRequestBuilder
public interface MultipleRequestBuilder<K,V> extends RequestBuilder<MultipleRequestBuilder<K,V>>, SettableViewParameters.Unpaginated<K,MultipleRequestBuilder<K,V>>
ViewMultipleRequest
s.
Example usage:
ViewMultipleRequest<String,String> multiRequest =
//get a builder for the"alpha"view of the"directory"design doc
db.getViewRequestBuilder("directory","alpha")
//create a new multi request expecting String keys and values
.newMultipleRequest(Key.Type.STRING,String.class)
//add three request queries
.startKey("A").endKey("B").add() //add a request from A to B
.startKey("H").endKey("I").add() //add a request from H to I
.startKey("N").endKey("O").add() //add a request from N to O
//build the request
.build()
Modifier and Type | Method and Description |
---|---|
MultipleRequestBuilder<K,V> |
add()
Adds a query request to this MultipleRequestBuilder.
|
ViewMultipleRequest<K,V> |
build()
Called after composing the multiple requests to build the ViewMultipleRequest.
|
returnThis
limit, skip
descending, endKey, endKeyDocId, includeDocs, inclusiveEnd, keys, stale, startKey, startKeyDocId
MultipleRequestBuilder<K,V> add()
ViewMultipleRequest<K,V> build()
It is only valid to call build() after adding one or more requests. If parameters have been set but the request has not been added then an IllegalStateException will be thrown.
java.lang.IllegalStateException
- if add() was not the last call before build