public final class NestedAttributeName extends Object
While using attributeToProject in QueryEnhancedRequest
and ScanEnhancedRequest
we need way to represent Nested Attributes.
The normal DOT(.) separator is not recognized as a Nesting level separator by DynamoDB request,
thus we need to use NestedAttributeName
which can be used to represent Nested attributes.
Example : NestedAttributeName.create("foo") corresponds to a NestedAttributeName with elements list with single element foo which represents Simple attribute name "foo" without nesting.
NestedAttributeName.create("foo", "bar") corresponds to a NestedAttributeName with elements list "foo", "bar" respresenting nested attribute name "foo.bar".
Modifier and Type | Class and Description |
---|---|
static class |
NestedAttributeName.Builder
A builder for
NestedAttributeName . |
Modifier and Type | Method and Description |
---|---|
static NestedAttributeName.Builder |
builder()
Create a builder that can be used to create a
NestedAttributeName . |
static NestedAttributeName |
create(List<String> elements)
Creates a NestedAttributeName from a list of elements that compose the full path of the nested attribute.
|
static NestedAttributeName |
create(String... elements)
Creates a NestedAttributeName from a list of elements that compose the full path of the nested attribute.
|
static NestedAttributeName |
create(String element)
Creates a NestedAttributeName with a single element, which is effectively just a simple attribute name without nesting.
|
List<String> |
elements()
Gets elements of NestedAttributeName in the form of List.
|
boolean |
equals(Object o) |
int |
hashCode() |
NestedAttributeName.Builder |
toBuilder()
Returns a builder initialized with all existing values on the request object.
|
public static NestedAttributeName create(String element)
Example:create("foo") will create NestedAttributeName corresponding to Attribute foo.
element
- Attribute Name. Single String represents just a simple attribute name without nesting.public static NestedAttributeName create(String... elements)
Example:create("foo", "bar") will create NestedAttributeName which represents foo.bar nested attribute.
elements
- Nested Attribute Names. Each of strings in varargs represent the nested attribute name
at subsequent levels.public static NestedAttributeName create(List<String> elements)
Example:create(Arrays.asList("foo", "bar")) will create NestedAttributeName which represents foo.bar nested attribute.
elements
- List of Nested Attribute Names. Each of strings in List represent the nested attribute name
at subsequent levels.public static NestedAttributeName.Builder builder()
NestedAttributeName
.public List<String> elements()
public NestedAttributeName.Builder toBuilder()
Copyright © 2020. All rights reserved.