Interface AttributeTransformer.Parameters<T>
-
- Enclosing interface:
- AttributeTransformer
public static interface AttributeTransformer.Parameters<T>
Parameters for thetransform
anduntransform
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,AttributeValue>
getAttributeValues()
Returns the raw attribute values to be transformed or untransformed.String
getHashKeyName()
DynamoDBMapperConfig
getMapperConfig()
Class<T>
getModelClass()
String
getRangeKeyName()
String
getTableName()
boolean
isPartialUpdate()
Returns true if this transformation is being called as part of a partial update operation.
-
-
-
Method Detail
-
getAttributeValues
Map<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 bygetAttributeValues()
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 toAttributeTransformer.untransform(Parameters)
.- Returns:
- true if this operation is a partial update, false otherwise
-
getModelClass
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
String getTableName()
- Returns:
- the name of the DynamoDB table the attributes were read from or will be written to
-
getHashKeyName
String getHashKeyName()
- Returns:
- the name of the hash key for the table
-
getRangeKeyName
String getRangeKeyName()
- Returns:
- the name of the range key for the table, if it has one,
otherwise
null
-
-