com.amazonaws.services.dynamodbv2.datamodeling
Class AttributeTransformerChain

java.lang.Object
  extended by com.amazonaws.services.dynamodbv2.datamodeling.AttributeTransformerChain
All Implemented Interfaces:
AttributeTransformer

public class AttributeTransformerChain
extends Object
implements AttributeTransformer

A virtual AttributeTransformer that transforms and untransforms attributes by running them through a cascading series of child AttributeTransformer instances.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.amazonaws.services.dynamodbv2.datamodeling.AttributeTransformer
AttributeTransformer.Parameters<T>
 
Constructor Summary
AttributeTransformerChain(AttributeTransformer... transformers)
          Creates a new transformer chain from the given array of transformers.
AttributeTransformerChain(List<AttributeTransformer> transformers)
          Creates a new transformer chain from the given list of transformers.
 
Method Summary
 List<AttributeTransformer> getTransformers()
           
 String toString()
           
 Map<String,AttributeValue> transform(AttributeTransformer.Parameters<?> parameters)
          Transforms the input set of attribute values derived from the model object before writing them into DynamoDB.
 Map<String,AttributeValue> untransform(AttributeTransformer.Parameters<?> parameters)
          Untransform the input set of attribute values read from DynamoDB before creating a model object from them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeTransformerChain

public AttributeTransformerChain(AttributeTransformer... transformers)
Creates a new transformer chain from the given array of transformers. When transforming attributes, these transformers are invoked from first to last; when untransforming they are invoked in the opposite order.

Parameters:
transformers - the chain of transformers.

AttributeTransformerChain

public AttributeTransformerChain(List<AttributeTransformer> transformers)
Creates a new transformer chain from the given list of transformers. When transforming attributes, these transformers are invoked from first to last; when untransforming they are invoked in the opposite order.

Parameters:
transformers - the chain of transformers.
Method Detail

getTransformers

public List<AttributeTransformer> getTransformers()
Returns:
the transformers in this chain

transform

public Map<String,AttributeValue> transform(AttributeTransformer.Parameters<?> parameters)
Description copied from interface: AttributeTransformer
Transforms the input set of attribute values derived from the model object before writing them into DynamoDB.

Specified by:
transform in interface AttributeTransformer
Parameters:
parameters - transformation parameters
Returns:
the transformed attribute value map

untransform

public Map<String,AttributeValue> untransform(AttributeTransformer.Parameters<?> parameters)
Description copied from interface: AttributeTransformer
Untransform the input set of attribute values read from DynamoDB before creating a model object from them.

Specified by:
untransform in interface AttributeTransformer
Parameters:
parameters - transformation parameters
Returns:
the untransformed attribute value map

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2016. All rights reserved.