Interface AttributeTransformer
- All Known Implementing Classes:
AttributeTransformerChain
public interface AttributeTransformer
A hook allowing a custom transform/untransform of the raw attribute
values immediately before writing them into DynamoDB and immediately
after reading them out of DynamoDB, but with extra context about
the model class not available at the raw AmazonDynamoDB level.
This interface contains both a transform
method and a corresponding
untransform
method. These methods SHOULD be inverses, such that
untransform(transform(value)) == value.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Parameters for thetransform
anduntransform
methods, so we don't have to break the interface in order to add additional parameters. -
Method Summary
Modifier and TypeMethodDescriptiontransform
(AttributeTransformer.Parameters<?> parameters) Transforms the input set of attribute values derived from the model object before writing them into DynamoDB.untransform
(AttributeTransformer.Parameters<?> parameters) Untransform the input set of attribute values read from DynamoDB before creating a model object from them.
-
Method Details
-
transform
Transforms the input set of attribute values derived from the model object before writing them into DynamoDB.- Parameters:
parameters
- transformation parameters- Returns:
- the transformed attribute value map
-
untransform
Untransform the input set of attribute values read from DynamoDB before creating a model object from them.- Parameters:
parameters
- transformation parameters- Returns:
- the untransformed attribute value map
-