public static class SecondaryIndexQueryOperation.Query.Builder extends Object
Constructor and Description |
---|
SecondaryIndexQueryOperation.Query.Builder(Namespace namespace,
BinaryValue indexName)
Constructs a builder for a (2i) Query.
|
Modifier and Type | Method and Description |
---|---|
SecondaryIndexQueryOperation.Query |
build() |
SecondaryIndexQueryOperation.Query.Builder |
withContinuation(BinaryValue continuation)
Set the continuation for this query.
|
SecondaryIndexQueryOperation.Query.Builder |
withIndexKey(BinaryValue key)
Set a single secondary index key to use for query.
|
SecondaryIndexQueryOperation.Query.Builder |
withMaxResults(int maxResults)
Set the maximum number of results returned by the query.
|
SecondaryIndexQueryOperation.Query.Builder |
withPaginationSort(boolean orderByKey)
Set whether to sort the results of a non-paginated 2i query.
|
SecondaryIndexQueryOperation.Query.Builder |
withRangeEnd(BinaryValue endIndex)
Set the ending value for a range query.
|
SecondaryIndexQueryOperation.Query.Builder |
withRangeStart(BinaryValue startingIndex)
Set the start value for a range query.
|
SecondaryIndexQueryOperation.Query.Builder |
withRegexTermFilter(BinaryValue filter)
Set the regex to filter result terms by for this query.
|
SecondaryIndexQueryOperation.Query.Builder |
withReturnKeyAndIndex(boolean returnBoth)
Set whether to return the index keys with the Riak object keys.
|
SecondaryIndexQueryOperation.Query.Builder |
withTimeout(int timeout)
Set the timeout for the query.
|
public SecondaryIndexQueryOperation.Query.Builder(Namespace namespace, BinaryValue indexName)
namespace
- the namespace for this QueryindexName
- the name of the index (including suffix).public SecondaryIndexQueryOperation.Query.Builder withIndexKey(BinaryValue key)
key
- the secondary index key.public SecondaryIndexQueryOperation.Query.Builder withRangeStart(BinaryValue startingIndex)
startingIndex
- the starting index for a range query.public SecondaryIndexQueryOperation.Query.Builder withRangeEnd(BinaryValue endIndex)
endIndex
- the ending index for a range query.public SecondaryIndexQueryOperation.Query.Builder withReturnKeyAndIndex(boolean returnBoth)
returnBoth
- true to return both index and object keys, false to return only object keys.public SecondaryIndexQueryOperation.Query.Builder withMaxResults(int maxResults)
maxResults
- the number of results.public SecondaryIndexQueryOperation.Query.Builder withContinuation(BinaryValue continuation)
continuation
- the continuation.public SecondaryIndexQueryOperation.Query.Builder withPaginationSort(boolean orderByKey)
Setting this to true will sort the results in Riak before returning them.
Note that this is not recommended for queries that could return a large result set; the overhead in Riak is substantial.
orderByKey
- true to sort the results, false to return as-is.public SecondaryIndexQueryOperation.Query.Builder withRegexTermFilter(BinaryValue filter)
filter
- the regex to filter terms by.public SecondaryIndexQueryOperation.Query.Builder withTimeout(int timeout)
Sets the server-side timeout value for this query.
timeout
- public SecondaryIndexQueryOperation.Query build()
Copyright © 2014. All rights reserved.