Class StaticAttributeTags

    • Method Detail

      • primaryPartitionKey

        public static StaticAttributeTag primaryPartitionKey()
        Marks an attribute as being the primary partition key of the table it participates in. Only one attribute can be marked this way in a given table schema.
      • primarySortKey

        public static StaticAttributeTag primarySortKey()
        Marks an attribute as being the primary sort key of the table it participates in. Only one attribute can be marked this way in a given table schema.
      • secondaryPartitionKey

        public static StaticAttributeTag secondaryPartitionKey​(String indexName)
        Marks an attribute as being a partition key for a secondary index.
        Parameters:
        indexName - The name of the index this key participates in.
      • secondaryPartitionKey

        public static StaticAttributeTag secondaryPartitionKey​(String indexName,
                                                               Order order)
        Marks an attribute as being part of a composite partition key for a secondary index.
        Parameters:
        indexName - The name of the index this key participates in.
        order - the order of this key in the composite key (0-based)
      • secondaryPartitionKey

        public static StaticAttributeTag secondaryPartitionKey​(Collection<String> indexNames)
        Marks an attribute as being a partition key for multiple secondary indices.
        Parameters:
        indexNames - The names of the indices this key participates in.
      • secondaryPartitionKey

        public static StaticAttributeTag secondaryPartitionKey​(Collection<String> indexNames,
                                                               Order order)
        Marks an attribute as being part of a composite partition key for multiple secondary indices.
        Parameters:
        indexNames - The names of the indices this key participates in.
        order - the order of this key in the composite key (0-based)
      • secondarySortKey

        public static StaticAttributeTag secondarySortKey​(String indexName)
        Marks an attribute as being a sort key for a secondary index.
        Parameters:
        indexName - The name of the index this key participates in.
      • secondarySortKey

        public static StaticAttributeTag secondarySortKey​(String indexName,
                                                          Order order)
        Marks an attribute as being part of a composite sort key for a secondary index.
        Parameters:
        indexName - The name of the index this key participates in.
        order - the order of this key in the composite key (0-based)
      • secondarySortKey

        public static StaticAttributeTag secondarySortKey​(Collection<String> indexNames)
        Marks an attribute as being a sort key for multiple secondary indices.
        Parameters:
        indexNames - The names of the indices this key participates in.
      • secondarySortKey

        public static StaticAttributeTag secondarySortKey​(Collection<String> indexNames,
                                                          Order order)
        Marks an attribute as being part of a composite sort key for multiple secondary indices.
        Parameters:
        indexNames - The names of the indices this key participates in.
        order - the order of this key in the composite key (0-based)
      • updateBehavior

        public static StaticAttributeTag updateBehavior​(UpdateBehavior updateBehavior)
        Specifies the behavior when this attribute is updated as part of an 'update' operation such as UpdateItem. See documentation of UpdateBehavior for details on the different behaviors supported and the default behavior.
        Parameters:
        updateBehavior - The UpdateBehavior to be applied to this attribute
      • atomicCounter

        public static StaticAttributeTag atomicCounter​(long delta,
                                                       long startValue)
        Used to explicitly designate an attribute to be an auto-generated counter updated unconditionally in DynamoDB. By supplying a negative integer delta value, the attribute works as a decreasing counter.
        Parameters:
        delta - The value to increment (positive) or decrement (negative) the counter with for each update.
        startValue - The starting value of the counter.
      • atomicCounter

        public static StaticAttributeTag atomicCounter()
        Used to explicitly designate an attribute to be a default auto-generated, increasing counter updated unconditionally in DynamoDB. The counter will have 0 as its first written value and increment with 1 for each subsequent calls to updateItem.