com.amazonaws.services.dynamodbv2.datamodeling
Interface AttributeTransformer.Parameters<T>

Enclosing interface:
AttributeTransformer

public static interface AttributeTransformer.Parameters<T>

Parameters for the transform and untransform methods, so we don't have to break the interface in order to add additional parameters.

Consuming code should NOT implement this interface.


Method Summary
 java.util.Map<java.lang.String,AttributeValue> getAttributeValues()
          Returns the raw attribute values to be transformed or untransformed.
 java.lang.String getHashKeyName()
           
 DynamoDBMapperConfig getMapperConfig()
           
 java.lang.Class<T> getModelClass()
           
 java.lang.String getRangeKeyName()
           
 java.lang.String getTableName()
           
 boolean isPartialUpdate()
          Returns true if this transformation is being called as part of a partial update operation.
 

Method Detail

getAttributeValues

java.util.Map<java.lang.String,AttributeValue> getAttributeValues()
Returns the raw attribute values to be transformed or untransformed. The returned map is not modifiable.

Returns:
the raw attribute values to transform or untransform

isPartialUpdate

boolean isPartialUpdate()
Returns true if this transformation is being called as part of a partial update operation. If true, the attributes returned by getAttributeValues() do not represent the entire new item, but only a snapshot of the attributes which are getting new values.

Implementations which do not support transforming a partial view of an item (for example, because they need to calculate a signature based on all of the item's attributes that won't be valid if only a subset of the attributes are taken into consideration) should check this flag and throw an exception rather than than corrupting the data in DynamoDB.

This method always returns false for instances passed to AttributeTransformer.untransform(Parameters).

Returns:
true if this operation is a partial update, false otherwise

getModelClass

java.lang.Class<T> getModelClass()
Returns:
the type of the model class we're transforming to or from

getMapperConfig

DynamoDBMapperConfig getMapperConfig()
Returns:
the mapper config for this operation

getTableName

java.lang.String getTableName()
Returns:
the name of the DynamoDB table the attributes were read from or will be written to

getHashKeyName

java.lang.String getHashKeyName()
Returns:
the name of the hash key for the table

getRangeKeyName

java.lang.String getRangeKeyName()
Returns:
the name of the range key for the table, if it has one, otherwise null


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.