Class ChainConverterProvider
- java.lang.Object
-
- software.amazon.awssdk.enhanced.dynamodb.internal.converter.ChainConverterProvider
-
- All Implemented Interfaces:
AttributeConverterProvider
@SdkInternalApi public final class ChainConverterProvider extends Object implements AttributeConverterProvider
AAttributeConverterProviderthat allows multiple providers to be chained in a specified order to act as a single composite provider. When searching for an attribute converter for a type, the providers will be called in forward/ascending order, attempting to find a converter from the first provider, then the second, and so on, until a match is found or the operation fails.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AttributeConverterProvider>chainedProviders()<T> AttributeConverter<T>converterFor(EnhancedType<T> enhancedType)Finds aAttributeConverterfor converting an object with a type specified by aEnhancedTypeto aAttributeValueand back.static ChainConverterProvidercreate(List<AttributeConverterProvider> providers)Construct a new instance ofChainConverterProvider.static ChainConverterProvidercreate(AttributeConverterProvider... providers)Construct a new instance ofChainConverterProvider.booleanequals(Object o)inthashCode()
-
-
-
Method Detail
-
create
public static ChainConverterProvider create(AttributeConverterProvider... providers)
Construct a new instance ofChainConverterProvider.- Parameters:
providers- A list ofAttributeConverterProviderto chain together.- Returns:
- A constructed
ChainConverterProviderobject.
-
create
public static ChainConverterProvider create(List<AttributeConverterProvider> providers)
Construct a new instance ofChainConverterProvider.- Parameters:
providers- A list ofAttributeConverterProviderto chain together.- Returns:
- A constructed
ChainConverterProviderobject.
-
chainedProviders
public List<AttributeConverterProvider> chainedProviders()
-
converterFor
public <T> AttributeConverter<T> converterFor(EnhancedType<T> enhancedType)
Description copied from interface:AttributeConverterProviderFinds aAttributeConverterfor converting an object with a type specified by aEnhancedTypeto aAttributeValueand back.- Specified by:
converterForin interfaceAttributeConverterProvider- Parameters:
enhancedType- The type of the object to be converted- Returns:
AttributeConverterfor converting the given type.
-
-