Interface DynamoDBService<T>

Type Parameters:
T - The type of the DynamoDB entity.

public interface DynamoDBService<T>
The middle-level API for working with DynamoDB tables. Using declarative services using Service is preferred.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    count(Object hashKey)
    Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
    default int
    count(Object hashKey, Object rangeKeyValue)
    Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
    default int
    count(Object hashKey, String rangeKeyName, Object rangeKeyValue)
    Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
    default int
    count(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator)
    Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
    int
    count(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator, Map settings)
    Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
    default int
    countByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions)
    Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
    int
    countByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions, Map settings)
    Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
    default int
    countByDates(Object hashKey, String rangeKeyName, Instant after, Instant before)
     
    default int
    countByDates(Object hashKey, String rangeKeyName, Instant after, Instant before, Instant maxAfterDate)
     
    default int
    countByDates(Object hashKey, String rangeKeyName, Date after, Date before)
    Deprecated.
    Consider using the method with java.time.Instant parameter DynamoDBService.countByDates(Object hashKey, String rangeKeyName, Instant after, Instant before)
    default int
    countByDates(Object hashKey, String rangeKeyName, Date after, Date before, Date maxAfterDate)
    Deprecated.
    Consider using the method with java.time.Instant parameter DynamoDBService.countByDates(Object hashKey, String rangeKeyName, Instant after, Instant before, Instant maxAfterDate)
    default int
    countByDates(Object hashKey, String rangeKeyName, Map rangeKeyDates)
    Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT) - maxAfterDate (default to null)
    int
    countByDates(Object hashKey, String rangeKeyName, Map rangeKeyDates, Map settings)
    Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT) - maxAfterDate (default to null)
    default com.amazonaws.services.dynamodbv2.model.CreateTableResult
    Create the DynamoDB table for the given Class.
    default com.amazonaws.services.dynamodbv2.model.CreateTableResult
    createTable(Long readCapacityUnits)
    Create the DynamoDB table for the given Class.
    com.amazonaws.services.dynamodbv2.model.CreateTableResult
    createTable(Long readCapacityUnits, Long writeCapacityUnits)
    Create the DynamoDB table for the given Class.
    default Integer
    decrement(Object hashKey, Object rangeKey, String attributeName)
    Decrement a count with an atomic operation
    default Integer
    decrement(Object hashKey, Object rangeKey, String attributeName, int attributeIncrement)
    Decrement a count with an atomic operation
    default Integer
    decrement(Object hashKey, String attributeName)
    Decrement a count with an atomic operation
    default void
    delete(Object hashKey, Object rangeKey)
    Delete item by IDs.
    void
    delete(Object hashKey, Object rangeKey, Map settings)
    Delete item by IDs.
    default void
    delete(T item)
    Delete item from Java object
    default void
    delete(T item, Map settings)
    Delete item from Java object
    default int
    deleteAll(Object hashKey)
    Delete all items for a given hashKey
    default int
    deleteAll(Object hashKey, String rangeKeyName, Object rangeKeyValue)
    Delete all items for a given hashKey and a rangeKey condition
    default int
    deleteAll(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator)
    Delete all items for a given hashKey and a rangeKey condition
    int
    deleteAll(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator, Map settings)
    Delete all items for a given hashKey and a rangeKey condition
    default int
    deleteAll(Object hashKey, Map settings)
    Delete all items for a given hashKey
    default void
    deleteAll(List<T> itemsToDelete)
    Delete a list of items from DynamoDB.
    void
    deleteAll(List<T> itemsToDelete, Map settings)
    Delete a list of items from DynamoDB.
    int
    deleteAllByConditions(com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBQueryExpression query, Map settings)
     
    default int
    deleteAllByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions)
     
    default int
    deleteAllByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions, Map settings)
     
    int
    deleteAllByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions, Map settings, String indexName)
     
    default void
    Delete item from Java object
    com.amazonaws.services.dynamodbv2.model.UpdateItemResult
    deleteItemAttribute(Object hashKey, Object rangeKey, String attributeName)
    Delete a single item attribute
    default com.amazonaws.services.dynamodbv2.model.UpdateItemResult
    deleteItemAttribute(Object hashKey, String attributeName)
     
    default T
    get(Object hashKey)
    Load an item
    get(Object hashKey, Object rangeKey)
    Load an item
    default List<T>
    getAll(Object hashKey, List rangeKeys)
    Retrieve batched items corresponding to a list of item IDs, in the same order.
    getAll(Object hashKey, List rangeKeys, Map settings)
    Retrieve batched items corresponding to a list of item IDs, in the same order.
     
     
     
     
     
    default Integer
    increment(Object hashKey, Object rangeKey, String attributeName)
    Increment a count with an atomic operation
    increment(Object hashKey, Object rangeKey, String attributeName, int attributeIncrement)
    Increment a count with an atomic operation
    default Integer
    increment(Object hashKey, String attributeName)
    Increment a count with an atomic operation
    boolean
     
    com.amazonaws.services.dynamodbv2.datamodeling.PaginatedQueryList<T>
    query(com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBQueryExpression queryExpression)
     
    default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    query(Object hashKey)
    Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false)
    default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    query(Object hashKey, Object rangeKeyValue)
     
    default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    query(Object hashKey, String rangeKeyName, Object rangeKeyValue)
    Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false)
    default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    query(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator)
    Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false)
    com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    query(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator, Map settings)
    Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false)
    default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    query(Object hashKey, Map settings)
    Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false)
    default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    queryByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions)
    Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false) - throttle insert sleeps during execution to avoid reaching provisioned read throughput (default to false)
    default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    queryByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions, Map settings)
    Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false) - throttle insert sleeps during execution to avoid reaching provisioned read throughput (default to false)
    com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    queryByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions, Map settings, String indexName)
    Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false) - throttle insert sleeps during execution to avoid reaching provisioned read throughput (default to false)
    default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    queryByDates(Object hashKey, String rangeKeyName, Instant after, Instant before)
     
    default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    queryByDates(Object hashKey, String rangeKeyName, Instant after, Instant before, Instant maxAfterDate)
     
    default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    queryByDates(Object hashKey, String rangeKeyName, Date after, Date before)
    Deprecated.
    Consider using the method with java.time.Instant parameter DynamoDBService.queryByDates(Object hashKey, String rangeKeyName, Instant after, Instant before)
    default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    queryByDates(Object hashKey, String rangeKeyName, Date after, Date before, Date maxAfterDate)
    Deprecated.
    Consider using the method with java.time.Instant parameter DynamoDBService.queryByDates(Object hashKey, String rangeKeyName, Instant after, Instant before, Instant maxAfterDate)
    default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    queryByDates(Object hashKey, String rangeKeyName, Map rangeKeyDates)
    Query by dates with 'after' and/or 'before' range value 1) After a certain date : [after: new Date()] 2) Before a certain date : [before: new Date()] 3) Between provided dates : [after: new Date() + 1, before: new Date()]
    com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>
    queryByDates(Object hashKey, String rangeKeyName, Map rangeKeyDates, Map settings)
    Query by dates with 'after' and/or 'before' range value 1) After a certain date : [after: new Date()] 2) Before a certain date : [before: new Date()] 3) Between provided dates : [after: new Date() + 1, before: new Date()]
    default T
    save(T item)
    Save an item.
    default T
    save(T item, Map settings)
    Save an item.
    default List<T>
    saveAll(List<T> itemsToSave)
    Save a list of objects in DynamoDB.
    saveAll(List<T> itemsToSave, Map settings)
    Save a list of objects in DynamoDB.
    default List<T>
    saveAll(T... itemsToSave)
    Save a list of objects in DynamoDB.
    default com.amazonaws.services.dynamodbv2.model.UpdateItemResult
    updateItemAttribute(Object hashKey, Object rangeKey, String attributeName, Object attributeValue)
    Update a single item attribute
    com.amazonaws.services.dynamodbv2.model.UpdateItemResult
    updateItemAttribute(Object hashKey, Object rangeKey, String attributeName, Object attributeValue, com.amazonaws.services.dynamodbv2.model.AttributeAction action)
    Update a single item attribute
    com.amazonaws.services.dynamodbv2.model.UpdateItemResult
    updateItemAttributes(Object hashKey, Object rangeKey, Map<String,Object> values, com.amazonaws.services.dynamodbv2.model.AttributeAction action)
     
  • Field Details

  • Method Details

    • count

      int count(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator, Map settings)
      Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyValue -
      operator -
      settings -
      Returns:
    • count

      default int count(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator)
      Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyValue -
      operator -
      Returns:
    • count

      default int count(Object hashKey, String rangeKeyName, Object rangeKeyValue)
      Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyValue -
      Returns:
    • count

      default int count(Object hashKey, Object rangeKeyValue)
      Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
      Parameters:
      hashKey -
      rangeKeyValue -
      Returns:
    • count

      default int count(Object hashKey)
      Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
      Parameters:
      hashKey -
      Returns:
    • countByDates

      @Deprecated default int countByDates(Object hashKey, String rangeKeyName, Date after, Date before, Date maxAfterDate)
      Deprecated.
      Consider using the method with java.time.Instant parameter DynamoDBService.countByDates(Object hashKey, String rangeKeyName, Instant after, Instant before, Instant maxAfterDate)
    • countByDates

      @Deprecated default int countByDates(Object hashKey, String rangeKeyName, Date after, Date before)
      Deprecated.
      Consider using the method with java.time.Instant parameter DynamoDBService.countByDates(Object hashKey, String rangeKeyName, Instant after, Instant before)
    • countByDates

      default int countByDates(Object hashKey, String rangeKeyName, Instant after, Instant before, Instant maxAfterDate)
    • countByDates

      default int countByDates(Object hashKey, String rangeKeyName, Instant after, Instant before)
    • countByDates

      int countByDates(Object hashKey, String rangeKeyName, Map rangeKeyDates, Map settings)
      Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT) - maxAfterDate (default to null)
      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyDates -
      settings -
      Returns:
    • countByDates

      default int countByDates(Object hashKey, String rangeKeyName, Map rangeKeyDates)
      Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT) - maxAfterDate (default to null)
      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyDates -
      Returns:
    • countByConditions

      int countByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions, Map settings)
      Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
      Parameters:
      hashKey -
      rangeKeyConditions -
      settings -
      Returns:
    • countByConditions

      default int countByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions)
      Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)
      Parameters:
      hashKey -
      rangeKeyConditions -
      Returns:
    • createTable

      com.amazonaws.services.dynamodbv2.model.CreateTableResult createTable(Long readCapacityUnits, Long writeCapacityUnits)
      Create the DynamoDB table for the given Class.
    • createTable

      default com.amazonaws.services.dynamodbv2.model.CreateTableResult createTable(Long readCapacityUnits)
      Create the DynamoDB table for the given Class.
    • createTable

      default com.amazonaws.services.dynamodbv2.model.CreateTableResult createTable()
      Create the DynamoDB table for the given Class.
    • decrement

      default Integer decrement(Object hashKey, Object rangeKey, String attributeName, int attributeIncrement)
      Decrement a count with an atomic operation
      Parameters:
      hashKey -
      rangeKey -
      attributeName -
      attributeIncrement -
      Returns:
    • decrement

      default Integer decrement(Object hashKey, Object rangeKey, String attributeName)
      Decrement a count with an atomic operation
      Parameters:
      hashKey -
      rangeKey -
      attributeName -
      Returns:
    • decrement

      default Integer decrement(Object hashKey, String attributeName)
      Decrement a count with an atomic operation
      Parameters:
      hashKey -
      attributeName -
      Returns:
    • delete

      void delete(Object hashKey, Object rangeKey, Map settings)
      Delete item by IDs.
      Parameters:
      hashKey - hash key of the item to delete
      rangeKey - range key of the item to delete
      settings - settings
    • delete

      default void delete(Object hashKey, Object rangeKey)
      Delete item by IDs.
      Parameters:
      hashKey - hash key of the item to delete
      rangeKey - range key of the item to delete
    • delete

      default void delete(T item, Map settings)
      Delete item from Java object
      Parameters:
      item -
      settings -
    • delete

      default void delete(T item)
      Delete item from Java object
      Parameters:
      item -
    • deleteByHash

      default void deleteByHash(Object id)
      Delete item from Java object
      Parameters:
      id -
    • deleteAll

      void deleteAll(List<T> itemsToDelete, Map settings)
      Delete a list of items from DynamoDB.
      Parameters:
      itemsToDelete - a list of objects to delete
      settings - settings
    • deleteAll

      default void deleteAll(List<T> itemsToDelete)
      Delete a list of items from DynamoDB.
      Parameters:
      itemsToDelete - a list of objects to delete
    • deleteAll

      default int deleteAll(Object hashKey, Map settings)
      Delete all items for a given hashKey
      Parameters:
      hashKey -
      settings -
      Returns:
    • deleteAll

      default int deleteAll(Object hashKey)
      Delete all items for a given hashKey
      Parameters:
      hashKey -
      Returns:
    • deleteAll

      int deleteAll(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator, Map settings)
      Delete all items for a given hashKey and a rangeKey condition
      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyValue -
      operator -
      settings -
      Returns:
    • deleteAll

      default int deleteAll(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator)
      Delete all items for a given hashKey and a rangeKey condition
      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyValue -
      operator -
      Returns:
    • deleteAll

      default int deleteAll(Object hashKey, String rangeKeyName, Object rangeKeyValue)
      Delete all items for a given hashKey and a rangeKey condition
      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyValue -
      Returns:
    • deleteAllByConditions

      int deleteAllByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions, Map settings, String indexName)
      Parameters:
      hashKey -
      rangeKeyConditions -
      settings -
      indexName -
      Returns:
    • deleteAllByConditions

      int deleteAllByConditions(com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBQueryExpression query, Map settings)
    • deleteAllByConditions

      default int deleteAllByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions, Map settings)
      Parameters:
      hashKey -
      rangeKeyConditions -
      settings -
      Returns:
    • deleteAllByConditions

      default int deleteAllByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions)
      Parameters:
      hashKey -
      rangeKeyConditions -
      Returns:
    • get

      T get(Object hashKey, Object rangeKey)
      Load an item
      Parameters:
      hashKey -
      rangeKey -
      Returns:
    • get

      default T get(Object hashKey)
      Load an item
      Parameters:
      hashKey -
      Returns:
    • getAll

      List<T> getAll(Object hashKey, List rangeKeys, Map settings)
      Retrieve batched items corresponding to a list of item IDs, in the same order. Example: items = twitterItemDBService.getAll(1, [1, 2]).
      Parameters:
      hashKey - Hash Key of the items to retrieve
      settings - only used for setting throttle/readCapacityUnit when getting large sets
      Returns:
      a list of DynamoDBItem
    • getAll

      default List<T> getAll(Object hashKey, List rangeKeys)
      Retrieve batched items corresponding to a list of item IDs, in the same order. Example: items = twitterItemDBService.getAll(1, [1, 2]).
      Parameters:
      hashKey - Hash Key of the items to retrieve
      Returns:
      a list of DynamoDBItem
    • increment

      Integer increment(Object hashKey, Object rangeKey, String attributeName, int attributeIncrement)
      Increment a count with an atomic operation
      Parameters:
      hashKey -
      rangeKey -
      attributeName -
      attributeIncrement -
      Returns:
    • increment

      default Integer increment(Object hashKey, Object rangeKey, String attributeName)
      Increment a count with an atomic operation
      Parameters:
      hashKey -
      rangeKey -
      attributeName -
      Returns:
    • increment

      default Integer increment(Object hashKey, String attributeName)
      Increment a count with an atomic operation
      Parameters:
      hashKey -
      attributeName -
      Returns:
    • getNewInstance

      T getNewInstance()
    • query

      com.amazonaws.services.dynamodbv2.datamodeling.PaginatedQueryList<T> query(com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBQueryExpression queryExpression)
    • query

      default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> query(Object hashKey, Map settings)
      Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false)
      Parameters:
      hashKey -
      settings -
      Returns:
    • query

      default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> query(Object hashKey)
      Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false)
      Parameters:
      hashKey -
      Returns:
    • query

      com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> query(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator, Map settings)
      Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false)
      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyValue -
      operator -
      settings -
      Returns:
    • query

      default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> query(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator)
      Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false)
      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyValue -
      operator -
      Returns:
    • query

      default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> query(Object hashKey, Object rangeKeyValue)
    • query

      default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> query(Object hashKey, String rangeKeyName, Object rangeKeyValue)
      Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false)
      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyValue -
      Returns:
    • queryByConditions

      com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> queryByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions, Map settings, String indexName)
      Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false) - throttle insert sleeps during execution to avoid reaching provisioned read throughput (default to false)
      Parameters:
      hashKey -
      rangeKeyConditions -
      settings -
      Returns:
    • queryByConditions

      default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> queryByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions, Map settings)
      Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false) - throttle insert sleeps during execution to avoid reaching provisioned read throughput (default to false)
      Parameters:
      hashKey -
      rangeKeyConditions -
      settings -
      Returns:
    • queryByConditions

      default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> queryByConditions(Object hashKey, Map<String,com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions)
      Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - returnAll disable paging to return all items, WARNING: can be expensive in terms of throughput (default to false) - scanIndexForward (default to false) - throttle insert sleeps during execution to avoid reaching provisioned read throughput (default to false)
      Parameters:
      hashKey -
      rangeKeyConditions -
      Returns:
    • queryByDates

      com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> queryByDates(Object hashKey, String rangeKeyName, Map rangeKeyDates, Map settings)
      Query by dates with 'after' and/or 'before' range value 1) After a certain date : [after: new Date()] 2) Before a certain date : [before: new Date()] 3) Between provided dates : [after: new Date() + 1, before: new Date()]

      Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - maxAfterDate (default to null) - scanIndexForward (default to false)

      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyDates -
      settings -
      Returns:
    • queryByDates

      default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> queryByDates(Object hashKey, String rangeKeyName, Map rangeKeyDates)
      Query by dates with 'after' and/or 'before' range value 1) After a certain date : [after: new Date()] 2) Before a certain date : [before: new Date()] 3) Between provided dates : [after: new Date() + 1, before: new Date()]

      Optional settings: - batchGetDisabled (only when secondary indexes are used, useful for count when all item attributes are not required) - consistentRead (default to false) - exclusiveStartKey a map with the rangeKey (ex: [id: 2555]), with optional indexRangeKey when using LSI (ex.: [id: 2555, totalCount: 45]) - limit - maxAfterDate (default to null) - scanIndexForward (default to false)

      Parameters:
      hashKey -
      rangeKeyName -
      rangeKeyDates -
      Returns:
    • queryByDates

      @Deprecated default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> queryByDates(Object hashKey, String rangeKeyName, Date after, Date before)
      Deprecated.
      Consider using the method with java.time.Instant parameter DynamoDBService.queryByDates(Object hashKey, String rangeKeyName, Instant after, Instant before)
    • queryByDates

      @Deprecated default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> queryByDates(Object hashKey, String rangeKeyName, Date after, Date before, Date maxAfterDate)
      Deprecated.
      Consider using the method with java.time.Instant parameter DynamoDBService.queryByDates(Object hashKey, String rangeKeyName, Instant after, Instant before, Instant maxAfterDate)
    • queryByDates

      default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> queryByDates(Object hashKey, String rangeKeyName, Instant after, Instant before)
    • queryByDates

      default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T> queryByDates(Object hashKey, String rangeKeyName, Instant after, Instant before, Instant maxAfterDate)
    • save

      default T save(T item, Map settings)
      Save an item.
      Parameters:
      item - the item to save
      settings - settings
      Returns:
      the Item after it's been saved
    • save

      default T save(T item)
      Save an item.
      Parameters:
      item - the item to save
      Returns:
      the Item after it's been saved
    • saveAll

      List<T> saveAll(List<T> itemsToSave, Map settings)
      Save a list of objects in DynamoDB.
      Parameters:
      itemsToSave - a list of objects to save
      settings - settings
    • saveAll

      default List<T> saveAll(List<T> itemsToSave)
      Save a list of objects in DynamoDB.
      Parameters:
      itemsToSave - a list of objects to save
    • saveAll

      default List<T> saveAll(T... itemsToSave)
      Save a list of objects in DynamoDB.
      Parameters:
      itemsToSave - a list of objects to save
    • deleteItemAttribute

      com.amazonaws.services.dynamodbv2.model.UpdateItemResult deleteItemAttribute(Object hashKey, Object rangeKey, String attributeName)
      Delete a single item attribute
      Parameters:
      hashKey -
      rangeKey -
      attributeName -
      Returns:
    • deleteItemAttribute

      default com.amazonaws.services.dynamodbv2.model.UpdateItemResult deleteItemAttribute(Object hashKey, String attributeName)
    • updateItemAttribute

      com.amazonaws.services.dynamodbv2.model.UpdateItemResult updateItemAttribute(Object hashKey, Object rangeKey, String attributeName, Object attributeValue, com.amazonaws.services.dynamodbv2.model.AttributeAction action)
      Update a single item attribute
      Parameters:
      hashKey -
      rangeKey -
      attributeName -
      attributeValue -
      action -
      Returns:
    • updateItemAttributes

      com.amazonaws.services.dynamodbv2.model.UpdateItemResult updateItemAttributes(Object hashKey, Object rangeKey, Map<String,Object> values, com.amazonaws.services.dynamodbv2.model.AttributeAction action)
    • updateItemAttribute

      default com.amazonaws.services.dynamodbv2.model.UpdateItemResult updateItemAttribute(Object hashKey, Object rangeKey, String attributeName, Object attributeValue)
      Update a single item attribute
      Parameters:
      hashKey -
      rangeKey -
      attributeName -
      attributeValue -
      Returns:
    • isIndexRangeKey

      boolean isIndexRangeKey(String rangeName)
    • getHashKeyName

      String getHashKeyName()
    • getHashKeyClass

      Class<?> getHashKeyClass()
    • getRangeKeyName

      String getRangeKeyName()
    • getRangeKeyClass

      Class<?> getRangeKeyClass()