Class DefaultAttributeConverterProvider
java.lang.Object
software.amazon.awssdk.enhanced.dynamodb.DefaultAttributeConverterProvider
- All Implemented Interfaces:
AttributeConverterProvider
@ThreadSafe
@Immutable
public final class DefaultAttributeConverterProvider
extends Object
implements AttributeConverterProvider
This class is the default attribute converter provider in the DDB Enhanced library. When instantiated
using the constructor
DefaultAttributeConverterProvider()
or the create()
method, it's loaded
with the currently supported attribute converters in the library.
Given an input, the method converterFor(EnhancedType)
will identify a converter that can convert the
specific Java type and invoke it. If a converter cannot be found, it will invoke a "parent" converter,
which would be expected to be able to convert the value (or throw an exception).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder for configuring and creatingDefaultAttributeConverterProvider
s. -
Constructor Summary
ConstructorDescriptionReturns an attribute converter provider with all default converters set. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Equivalent tobuilder(EnhancedType.of(Object.class))
.<T> AttributeConverter
<T> converterFor
(EnhancedType<T> type) Find a converter that matches the provided type.create()
Returns an attribute converter provider with all default converters set.
-
Constructor Details
-
DefaultAttributeConverterProvider
public DefaultAttributeConverterProvider()Returns an attribute converter provider with all default converters set.
-
-
Method Details
-
create
Returns an attribute converter provider with all default converters set. -
builder
Equivalent tobuilder(EnhancedType.of(Object.class))
. -
converterFor
Find a converter that matches the provided type. If one cannot be found, throw an exception.- Specified by:
converterFor
in interfaceAttributeConverterProvider
- Parameters:
type
- The type of the object to be converted- Returns:
AttributeConverter
for converting the given type.
-