public class GetOptions extends CommonOptions<GetOptions>
Modifier and Type | Class and Description |
---|---|
class |
GetOptions.Built |
CommonOptions.BuiltCommonOptions
Modifier and Type | Method and Description |
---|---|
GetOptions.Built |
build() |
static GetOptions |
getOptions()
Creates a new set of
GetOptions with a JsonObject target. |
GetOptions |
project(Iterable<String> paths)
Allows to specify a custom list paths to fetch from the document instead of the whole.
|
GetOptions |
project(String path,
String... morePaths)
Allows to specify a custom list paths to fetch from the document instead of the whole.
|
GetOptions |
transcoder(Transcoder transcoder)
Allows to specify a custom transcoder that is used to decode the content of the result.
|
GetOptions |
withExpiry(boolean expiry)
If set to true, the get will fetch the expiry for the document as well and return
it as part of the
GetResult . |
clientContext, parentSpan, retryStrategy, self, timeout
public static GetOptions getOptions()
GetOptions
with a JsonObject
target.public GetOptions withExpiry(boolean expiry)
GetResult
.expiry
- true if it should be fetched.GetOptions
to allow method chaining.public GetOptions project(String path, String... morePaths)
Note that a maximum of 16 individual paths can be projected at a time due to a server limitation. If you need more than that, think about fetching less-generic paths or the full document straight away.
path
- a path that should be loaded if present.morePaths
- additional paths that should be loaded if present.GetOptions
to allow method chaining.public GetOptions project(Iterable<String> paths)
Note that a maximum of 16 individual paths can be projected at a time due to a server limitation. If you need more than that, think about fetching less-generic paths or the full document straight away.
paths
- each individual path that should be loaded if present.GetOptions
to allow method chaining.public GetOptions transcoder(Transcoder transcoder)
transcoder
- the custom transcoder that should be used for decoding.GetOptions
to allow method chaining.@Stability.Internal public GetOptions.Built build()
Copyright © 2021 Couchbase, Inc.. All rights reserved.