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.

    • Method Detail

      • transform

        Map<String,​AttributeValue> transform​(AttributeTransformer.Parameters<?> parameters)
        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

        Map<String,​AttributeValue> untransform​(AttributeTransformer.Parameters<?> parameters)
        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