|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value={FIELD,METHOD}) public @interface DynamoDBAttribute
Interface for marking a class property as an attribute in a DynamoDB table. Applied to the getter method or the class field for a modeled property. If the annotation is applied directly to the class field, the corresponding getter and setter must be declared in the same class.
This annotation is optional when the name of the DynamoDB attribute matches
the name of the property declared in the class. When they differ, use this
annotation with the attributeName() parameter to specify which DynamoDB
attribute this property corresponds to. Furthermore, the
DynamoDBMapper
class assumes Java naming conventions, and will
lower-case the first character of a getter method's property name to
determine the name of the property. E.g., a method getValue() will map to the
DynamoDB attribute "value". Similarly, a method isValid() maps to the
DynamoDB attribute "valid".
Even getter method not marked with this annotation are assumed to be modeled
properties, unless marked with DynamoDBIgnore
.
Optional Element Summary | |
---|---|
java.lang.String |
attributeName
Deprecated. Optional parameter when the name of the attribute as stored in DynamoDB should differ from the name used by the getter / setter. |
public abstract java.lang.String attributeName
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |