@Retention(value=RUNTIME) @Target(value={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 getLastUpdatedDate() { 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 and Description |
---|---|
DynamoDBAutoGenerateStrategy |
strategy
The auto-generation strategy; default is
ALWAYS . |
public abstract DynamoDBAutoGenerateStrategy strategy
ALWAYS
.DynamoDBAutoGenerateStrategy
Copyright © 2020. All rights reserved.