Interface DynamoDBService<T>
- Type Parameters:
T- The type of the DynamoDB entity.
Service is preferred.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptiondefault intOptional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)default intOptional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)default intOptional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)default intcount(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)intcount(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 intcountByConditions(Object hashKey, Map<String, com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions) Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)intcountByConditions(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 intcountByDates(Object hashKey, String rangeKeyName, Instant after, Instant before) default intcountByDates(Object hashKey, String rangeKeyName, Instant after, Instant before, Instant maxAfterDate) default intcountByDates(Object hashKey, String rangeKeyName, Date after, Date before) Deprecated.default intDeprecated.Consider using the method with java.time.Instant parameterDynamoDBService.countByDates(Object hashKey, String rangeKeyName, Instant after, Instant before, Instant maxAfterDate)default intcountByDates(Object hashKey, String rangeKeyName, Map rangeKeyDates) Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT) - maxAfterDate (default to null)intcountByDates(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.CreateTableResultCreate the DynamoDB table for the given Class.default com.amazonaws.services.dynamodbv2.model.CreateTableResultcreateTable(Long readCapacityUnits) Create the DynamoDB table for the given Class.com.amazonaws.services.dynamodbv2.model.CreateTableResultcreateTable(Long readCapacityUnits, Long writeCapacityUnits) Create the DynamoDB table for the given Class.default IntegerDecrement a count with an atomic operationdefault IntegerDecrement a count with an atomic operationdefault IntegerDecrement a count with an atomic operationdefault voidDelete item by IDs.voidDelete item by IDs.default voidDelete item from Java objectdefault voidDelete item from Java objectdefault intDelete all items for a given hashKeydefault intDelete all items for a given hashKey and a rangeKey conditiondefault intdeleteAll(Object hashKey, String rangeKeyName, Object rangeKeyValue, com.amazonaws.services.dynamodbv2.model.ComparisonOperator operator) Delete all items for a given hashKey and a rangeKey conditionintdeleteAll(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 conditiondefault intDelete all items for a given hashKeydefault voidDelete a list of items from DynamoDB.voidDelete a list of items from DynamoDB.intdeleteAllByConditions(com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBQueryExpression query, Map settings) default intdeleteAllByConditions(Object hashKey, Map<String, com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions) default intdeleteAllByConditions(Object hashKey, Map<String, com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions, Map settings) intdeleteAllByConditions(Object hashKey, Map<String, com.amazonaws.services.dynamodbv2.model.Condition> rangeKeyConditions, Map settings, String indexName) default voiddeleteByHash(Object id) Delete item from Java objectcom.amazonaws.services.dynamodbv2.model.UpdateItemResultdeleteItemAttribute(Object hashKey, Object rangeKey, String attributeName) Delete a single item attributedefault com.amazonaws.services.dynamodbv2.model.UpdateItemResultdeleteItemAttribute(Object hashKey, String attributeName) default TLoad an itemLoad an itemRetrieve batched items corresponding to a list of item IDs, in the same order.Retrieve batched items corresponding to a list of item IDs, in the same order.Class<?>Class<?>default IntegerIncrement a count with an atomic operationIncrement a count with an atomic operationdefault IntegerIncrement a count with an atomic operationbooleanisIndexRangeKey(String rangeName) com.amazonaws.services.dynamodbv2.datamodeling.PaginatedQueryList<T>query(com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBQueryExpression queryExpression) default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>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>default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>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>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 parameterDynamoDBService.queryByDates(Object hashKey, String rangeKeyName, Instant after, Instant before)default com.amazonaws.services.dynamodbv2.datamodeling.QueryResultPage<T>Deprecated.Consider using the method with java.time.Instant parameterDynamoDBService.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 TSave an item.default TSave an item.Save a list of objects in DynamoDB.Save a list of objects in DynamoDB.Save a list of objects in DynamoDB.default com.amazonaws.services.dynamodbv2.model.UpdateItemResultupdateItemAttribute(Object hashKey, Object rangeKey, String attributeName, Object attributeValue) Update a single item attributecom.amazonaws.services.dynamodbv2.model.UpdateItemResultupdateItemAttribute(Object hashKey, Object rangeKey, String attributeName, Object attributeValue, com.amazonaws.services.dynamodbv2.model.AttributeAction action) Update a single item attributecom.amazonaws.services.dynamodbv2.model.UpdateItemResultupdateItemAttributes(Object hashKey, Object rangeKey, Map<String, Object> values, com.amazonaws.services.dynamodbv2.model.AttributeAction action)
-
Field Details
-
DEFAULT_QUERY_LIMIT
static final int DEFAULT_QUERY_LIMIT- See Also:
-
DEFAULT_COUNT_LIMIT
static final int DEFAULT_COUNT_LIMIT- See Also:
-
BATCH_DELETE_LIMIT
static final int BATCH_DELETE_LIMIT- See Also:
-
WRITE_BATCH_SIZE
static final int WRITE_BATCH_SIZE- See Also:
-
-
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
Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)- Parameters:
hashKey-rangeKeyName-rangeKeyValue-- Returns:
-
count
Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT)- Parameters:
hashKey-rangeKeyValue-- Returns:
-
count
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 parameterDynamoDBService.countByDates(Object hashKey, String rangeKeyName, Instant after, Instant before, Instant maxAfterDate) -
countByDates
Deprecated.Consider using the method with java.time.Instant parameterDynamoDBService.countByDates(Object hashKey, String rangeKeyName, Instant after, Instant before) -
countByDates
-
countByDates
-
countByDates
Optional settings: - consistentRead (default to false) - limit (default to DEFAULT_COUNT_LIMIT) - maxAfterDate (default to null)- Parameters:
hashKey-rangeKeyName-rangeKeyDates-settings-- Returns:
-
countByDates
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
Decrement a count with an atomic operation- Parameters:
hashKey-rangeKey-attributeName-- Returns:
-
decrement
Decrement a count with an atomic operation- Parameters:
hashKey-attributeName-- Returns:
-
delete
Delete item by IDs.- Parameters:
hashKey- hash key of the item to deleterangeKey- range key of the item to deletesettings- settings
-
delete
Delete item by IDs.- Parameters:
hashKey- hash key of the item to deleterangeKey- range key of the item to delete
-
delete
Delete item from Java object- Parameters:
item-settings-
-
delete
Delete item from Java object- Parameters:
item-
-
deleteByHash
Delete item from Java object- Parameters:
id-
-
deleteAll
Delete a list of items from DynamoDB.- Parameters:
itemsToDelete- a list of objects to deletesettings- settings
-
deleteAll
Delete a list of items from DynamoDB.- Parameters:
itemsToDelete- a list of objects to delete
-
deleteAll
Delete all items for a given hashKey- Parameters:
hashKey-settings-- Returns:
-
deleteAll
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
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
Load an item- Parameters:
hashKey-rangeKey-- Returns:
-
get
Load an item- Parameters:
hashKey-- Returns:
-
getAll
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 retrievesettings- only used for setting throttle/readCapacityUnit when getting large sets- Returns:
- a list of DynamoDBItem
-
getAll
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
Increment a count with an atomic operation- Parameters:
hashKey-rangeKey-attributeName-attributeIncrement-- Returns:
-
increment
Increment a count with an atomic operation- Parameters:
hashKey-rangeKey-attributeName-- Returns:
-
increment
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
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
-
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 parameterDynamoDBService.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 parameterDynamoDBService.queryByDates(Object hashKey, String rangeKeyName, Instant after, Instant before, Instant maxAfterDate) -
queryByDates
-
queryByDates
-
save
Save an item.- Parameters:
item- the item to savesettings- settings- Returns:
- the Item after it's been saved
-
save
Save an item.- Parameters:
item- the item to save- Returns:
- the Item after it's been saved
-
saveAll
Save a list of objects in DynamoDB.- Parameters:
itemsToSave- a list of objects to savesettings- settings
-
saveAll
Save a list of objects in DynamoDB.- Parameters:
itemsToSave- a list of objects to save
-
saveAll
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
-
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
-
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
-
getHashKeyName
String getHashKeyName() -
getHashKeyClass
Class<?> getHashKeyClass() -
getRangeKeyName
String getRangeKeyName() -
getRangeKeyClass
Class<?> getRangeKeyClass()
-
DynamoDBService.countByDates(Object hashKey, String rangeKeyName, Instant after, Instant before)