Annotation Type DynamoDbSortKey


@Target(METHOD) @Retention(RUNTIME) public @interface DynamoDbSortKey
Denotes this attribute as being the optional primary sort key of the DynamoDb table. This attribute must map to a DynamoDb scalar type (string, number or binary) to be valid.

Example using DynamoDbSortKey:

   @DynamoDbBean
   public class Customer {
       private String accountId;
       private int subId;

       @DynamoDbPartitionKey
       public String getAccountId() {
             return this.accountId;
       }

       public void setAccountId(String accountId) {
             this.accountId = accountId;
        }

       @DynamoDbSortKey
       public int getSubId() {
             return this.subId;
       }
       public void setSubId(int subId) {
             this.subId = subId;
       }
   }