@Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface DynamoDbAutoGeneratedTimestamp
@DynamoDBAutoGeneratedTimestamp(strategy=DynamoDBAutoGenerateStrategy.CREATE) public Date getCreatedDate() { return createdDate; } public void setCreatedDate(Date createdDate) { this.createdDate = createdDate; } @DynamoDBAutoGeneratedTimestamp(strategy=DynamoDBAutoGenerateStrategy.ALWAYS) public Date lastUpdatedDate() { return lastUpdatedDate; } public void setLastUpdatedDate(Date lastUpdatedDate) { this.lastUpdatedDate = lastUpdatedDate; }
Supports the standard Date
type-conversions; such as
Calendar
, Long
.
Primitives such as long
are not supported since the unset
(or null) state can't be detected.
Compatible with DynamoDbTypeConvertedTimestamp
Modifier and Type | Optional Element | Description |
---|---|---|
DynamoDbAutoGenerateStrategy |
strategy |
The auto-generation strategy; default is
ALWAYS . |
DynamoDbAutoGenerateStrategy strategy
ALWAYS
.DynamoDbAutoGenerateStrategy
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.