public class ChainMapperExtension extends Object implements MapperExtension
| Modifier and Type | Method and Description |
|---|---|
ReadModification |
afterRead(Map<String,AttributeValue> item,
OperationContext operationContext,
TableMetadata tableMetadata)
Implementation of the
MapperExtension interface that will call all the chained extensions in reverse
order, passing the results of each one to the next and coalescing the results into a single modification. |
WriteModification |
beforeWrite(Map<String,AttributeValue> item,
OperationContext operationContext,
TableMetadata tableMetadata)
Implementation of the
MapperExtension interface that will call all the chained extensions in forward
order, passing the results of each one to the next and coalescing the results into a single modification. |
static ChainMapperExtension |
of(MapperExtension... mapperExtensions)
Construct a new instance of
ChainMapperExtension. |
public static ChainMapperExtension of(MapperExtension... mapperExtensions)
ChainMapperExtension.mapperExtensions - A list of MapperExtension to chain together.ChainMapperExtension object.public WriteModification beforeWrite(Map<String,AttributeValue> item, OperationContext operationContext, TableMetadata tableMetadata)
MapperExtension interface that will call all the chained extensions in forward
order, passing the results of each one to the next and coalescing the results into a single modification.
Multiple conditional statements will be separated by the string " AND ". Expression values will be coalesced
unless they conflict in which case an exception will be thrown.beforeWrite in interface MapperExtensionitem - The AttributeValue map of the item to be written.tableMetadata - A TableMetadata object describing the structure of the modelled table.operationContext - The context under which the operation to be modified is taking place.WriteModification representing the coalesced results of all the chained extensions.public ReadModification afterRead(Map<String,AttributeValue> item, OperationContext operationContext, TableMetadata tableMetadata)
MapperExtension interface that will call all the chained extensions in reverse
order, passing the results of each one to the next and coalescing the results into a single modification.afterRead in interface MapperExtensionitem - The AttributeValue map of the item that is being read.tableMetadata - A TableMetadata object describing the structure of the modelled table.operationContext - The context under which the operation to be modified is taking place.ReadModification representing the final transformation of all the chained extensions.Copyright © 2019. All rights reserved.