private static class AttributeTransformerChain.ProxyParameters<T> extends java.lang.Object implements AttributeTransformer.Parameters<T>
Parameters
proxy that intercepts calls to
getAttributeValues
and overrides the return value.Modifier and Type | Field and Description |
---|---|
private AttributeTransformer.Parameters<T> |
delegate |
private java.util.Map<java.lang.String,AttributeValue> |
values |
Constructor and Description |
---|
ProxyParameters(AttributeTransformer.Parameters<T> delegate)
Create a new proxy wrapping the given
Parameters object. |
Modifier and Type | Method and Description |
---|---|
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.
|
void |
setAttributeValues(java.util.Map<java.lang.String,AttributeValue> values)
Changes the attribute values for this instance.
|
private final AttributeTransformer.Parameters<T> delegate
private java.util.Map<java.lang.String,AttributeValue> values
public ProxyParameters(AttributeTransformer.Parameters<T> delegate)
Parameters
object.delegate
- the parameters object to wrappublic java.util.Map<java.lang.String,AttributeValue> getAttributeValues()
AttributeTransformer.Parameters
getAttributeValues
in interface AttributeTransformer.Parameters<T>
public void setAttributeValues(java.util.Map<java.lang.String,AttributeValue> values)
values
- the new valuespublic boolean isPartialUpdate()
AttributeTransformer.Parameters
AttributeTransformer.Parameters.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)
.
isPartialUpdate
in interface AttributeTransformer.Parameters<T>
public java.lang.Class<T> getModelClass()
getModelClass
in interface AttributeTransformer.Parameters<T>
public DynamoDBMapperConfig getMapperConfig()
getMapperConfig
in interface AttributeTransformer.Parameters<T>
public java.lang.String getTableName()
getTableName
in interface AttributeTransformer.Parameters<T>
public java.lang.String getHashKeyName()
getHashKeyName
in interface AttributeTransformer.Parameters<T>
public java.lang.String getRangeKeyName()
getRangeKeyName
in interface AttributeTransformer.Parameters<T>
null