public class AttributeTransformerChain extends java.lang.Object implements AttributeTransformer
AttributeTransformer
that transforms and untransforms
attributes by running them through a cascading series of child
AttributeTransformer
instances.Modifier and Type | Class and Description |
---|---|
private static class |
AttributeTransformerChain.ProxyParameters<T>
A
Parameters proxy that intercepts calls to
getAttributeValues and overrides the return value. |
AttributeTransformer.Parameters<T>
Modifier and Type | Field and Description |
---|---|
private java.util.List<AttributeTransformer> |
transformers |
Constructor and Description |
---|
AttributeTransformerChain(AttributeTransformer... transformers)
Creates a new transformer chain from the given array of transformers.
|
AttributeTransformerChain(java.util.List<AttributeTransformer> transformers)
Creates a new transformer chain from the given list of transformers.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<AttributeTransformer> |
getTransformers() |
java.lang.String |
toString() |
java.util.Map<java.lang.String,AttributeValue> |
transform(AttributeTransformer.Parameters<?> parameters)
Transforms the input set of attribute values derived from the model
object before writing them into DynamoDB.
|
java.util.Map<java.lang.String,AttributeValue> |
untransform(AttributeTransformer.Parameters<?> parameters)
Untransform the input set of attribute values read from DynamoDB before
creating a model object from them.
|
private final java.util.List<AttributeTransformer> transformers
public AttributeTransformerChain(AttributeTransformer... transformers)
transformers
- the chain of transformers.public AttributeTransformerChain(java.util.List<AttributeTransformer> transformers)
transformers
- the chain of transformers.public java.util.List<AttributeTransformer> getTransformers()
public java.util.Map<java.lang.String,AttributeValue> transform(AttributeTransformer.Parameters<?> parameters)
AttributeTransformer
transform
in interface AttributeTransformer
parameters
- transformation parameterspublic java.util.Map<java.lang.String,AttributeValue> untransform(AttributeTransformer.Parameters<?> parameters)
AttributeTransformer
untransform
in interface AttributeTransformer
parameters
- transformation parameterspublic java.lang.String toString()
toString
in class java.lang.Object