Class ImmutableAttribute.Builder<T,B,R>
- java.lang.Object
-
- software.amazon.awssdk.enhanced.dynamodb.mapper.ImmutableAttribute.Builder<T,B,R>
-
- Type Parameters:
T
- the class of the item this attribute maps into.R
- the class that the value of this attribute converts to.
- Enclosing class:
- ImmutableAttribute<T,B,R>
@NotThreadSafe public static final class ImmutableAttribute.Builder<T,B,R> extends Object
A typed builder forImmutableAttribute
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableAttribute.Builder<T,B,R>
addTag(StaticAttributeTag tag)
Associates a singleStaticAttributeTag
with this attribute.ImmutableAttribute.Builder<T,B,R>
attributeConverter(AttributeConverter<R> attributeConverter)
AnAttributeConverter
for the attribute type (EnhancedType
), that can convert this attribute.ImmutableAttribute<T,B,R>
build()
Builds aStaticAttributeTag
from the values stored in this builder.ImmutableAttribute.Builder<T,B,R>
getter(Function<T,R> getter)
A function that can get the value of this attribute from a modelled item it composes.ImmutableAttribute.Builder<T,B,R>
name(String name)
The name of this attributeImmutableAttribute.Builder<T,B,R>
setter(BiConsumer<B,R> setter)
A function that can set the value of this attribute on a modelled item it composes.ImmutableAttribute.Builder<T,B,R>
tags(Collection<StaticAttributeTag> tags)
A collection ofStaticAttributeTag
associated with this attribute.ImmutableAttribute.Builder<T,B,R>
tags(StaticAttributeTag... tags)
A collection ofStaticAttributeTag
associated with this attribute.
-
-
-
Method Detail
-
name
public ImmutableAttribute.Builder<T,B,R> name(String name)
The name of this attribute
-
getter
public ImmutableAttribute.Builder<T,B,R> getter(Function<T,R> getter)
A function that can get the value of this attribute from a modelled item it composes.
-
setter
public ImmutableAttribute.Builder<T,B,R> setter(BiConsumer<B,R> setter)
A function that can set the value of this attribute on a modelled item it composes.
-
tags
public ImmutableAttribute.Builder<T,B,R> tags(Collection<StaticAttributeTag> tags)
A collection ofStaticAttributeTag
associated with this attribute. Overwrites any existing tags.
-
tags
public ImmutableAttribute.Builder<T,B,R> tags(StaticAttributeTag... tags)
A collection ofStaticAttributeTag
associated with this attribute. Overwrites any existing tags.
-
addTag
public ImmutableAttribute.Builder<T,B,R> addTag(StaticAttributeTag tag)
Associates a singleStaticAttributeTag
with this attribute. Adds to any existing tags.
-
attributeConverter
public ImmutableAttribute.Builder<T,B,R> attributeConverter(AttributeConverter<R> attributeConverter)
AnAttributeConverter
for the attribute type (EnhancedType
), that can convert this attribute. It takes precedence over any converter for this type provided by the table schemaAttributeConverterProvider
.
-
build
public ImmutableAttribute<T,B,R> build()
Builds aStaticAttributeTag
from the values stored in this builder.
-
-