Package com.couchbase.client.java.kv
Class GetOptions
- java.lang.Object
-
- com.couchbase.client.java.CommonOptions<GetOptions>
-
- com.couchbase.client.java.kv.GetOptions
-
public class GetOptions extends CommonOptions<GetOptions>
Allows to customize a get request.- Since:
- 3.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
GetOptions.Built
-
Nested classes/interfaces inherited from class com.couchbase.client.java.CommonOptions
CommonOptions.BuiltCommonOptions
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GetOptions.Built
build()
static GetOptions
getOptions()
Creates a new set ofGetOptions
with aJsonObject
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)
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 theGetResult
.-
Methods inherited from class com.couchbase.client.java.CommonOptions
clientContext, retryStrategy, self, timeout
-
-
-
-
Method Detail
-
getOptions
public static GetOptions getOptions()
Creates a new set ofGetOptions
with aJsonObject
target.- Returns:
- options to customize.
-
withExpiry
public 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 theGetResult
.- Parameters:
expiry
- true if it should be fetched.- Returns:
- the
GetOptions
to allow method chaining.
-
project
public GetOptions project(String path, String... morePaths)
Allows to specify a custom list paths to fetch from the document instead of the whole.- Parameters:
path
- a path that should be loaded if present.morePaths
- additional paths that should be loaded if present.- Returns:
- the
GetOptions
to allow method chaining.
-
project
public GetOptions project(Iterable<String> paths)
Allows to specify a custom list paths to fetch from the document instead of the whole.- Parameters:
paths
- each individual path that should be loaded if present.- Returns:
- the
GetOptions
to allow method chaining.
-
transcoder
public GetOptions transcoder(Transcoder transcoder)
-
build
@Internal public GetOptions.Built build()
-
-