@Retention(value=RUNTIME) @Target(value={FIELD,METHOD,ANNOTATION_TYPE}) public @interface DynamoDBVersioned
@DynamoDBVersioned public Long getRecordVersionNumber()
Alternately, the convinience annotation DynamoDBVersionAttribute
may be used if combining with an attribute name on a field/getter.
Only nullable, integral numeric types (e.g. Integer, Long) can be used as
version properties. On a save() operation, the DynamoDBMapper
will
attempt to increment the version property and assert that the service's value
matches the client's.
New objects will be assigned a version of 1 when saved.
Note that for batchWrite, and by extension batchSave and batchDelete,
no version checks are performed, as required by the
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest)
API.
May be used as a meta-annotation.
DynamoDBVersionAttribute
Copyright © 2024. All rights reserved.