Class Table
- All Implemented Interfaces:
DeleteItemApi
,GetItemApi
,PutItemApi
,QueryApi
,ScanApi
,UpdateItemApi
DynamoDB.getTable(String)
.-
Constructor Summary
ConstructorsConstructorDescriptionTable
(AmazonDynamoDB client, String tableName) Table
(AmazonDynamoDB client, String tableName, TableDescription tableDescription) -
Method Summary
Modifier and TypeMethodDescriptioncreateGSI
(CreateGlobalSecondaryIndexAction create, AttributeDefinition hashKeyDefinition) Creates a global secondary index (GSI) with only a hash key on this table.createGSI
(CreateGlobalSecondaryIndexAction create, AttributeDefinition hashKeyDefinition, AttributeDefinition rangeKeyDefinition) Creates a global secondary index (GSI) with both a hash key and a range key on this table.delete()
Deletes the table from DynamoDB.deleteItem
(KeyAttribute... primaryKeyComponents) Deletes an item by primary key.deleteItem
(PrimaryKey primaryKey) Deletes an item by primary key.deleteItem
(PrimaryKey primaryKey, Expected... expected) Conditional delete with the specified primary key and expected conditions.deleteItem
(PrimaryKey primaryKey, DeleteItemExpressionSpec conditionExpressions) deleteItem
(PrimaryKey primaryKey, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Conditional delete with the specified primary key and condition expression.deleteItem
(DeleteItemSpec spec) Deletes an item by specifying all the details.deleteItem
(String hashKeyName, Object hashKeyValue) Deletes an item by hash-only primary key.deleteItem
(String hashKeyName, Object hashKeyValue, Expected... expected) Conditional delete with the specified hash-only primary key and expected conditions.deleteItem
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue) Deletes an item by hash key-and-range primary key.deleteItem
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, Expected... expected) Conditional delete with the specified hash-and-range primary key and expected conditions.deleteItem
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, DeleteItemExpressionSpec conditionExpressions) deleteItem
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Conditional delete with the specified hash-and-range primary key and condition expression.deleteItem
(String hashKeyName, Object hashKeyValue, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Conditional delete with the specified hash-only primary key and condition expression.describe()
Retrieves the table description from DynamoDB.Returns the table description; or null if the table description has not yet been described viadescribe()
.Gets a reference to the specified index.getItem
(KeyAttribute... primaryKeyComponents) Retrieves an item by primary key.getItem
(PrimaryKey primaryKey) Retrieves an item by primary key; or null if the item doesn't exist.Retrieves an item using projection expression.getItem
(GetItemSpec spec) Retrieves an item by specifying all the details.Retrieves an item by primary key when the primary key is a hash-only key.Retrieves an item by primary key when the primary key consists of both a hash-key and a range-key.getItem
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, GetItemExpressionSpec projectionExpressions) getItem
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String projectionExpression, Map<String, String> nameMap) Retrieves an item via the specified hash key and range key using projection expression.getItem
(String hashKeyName, Object hashKeyValue, String projectionExpression, Map<String, String> nameMap) Retrieves an item via the specified hash key using projection expression.getItemOutcome
(KeyAttribute... primaryKeyComponents) Retrieves an item and the associated information by primary key when the primary key is a hash-only key.getItemOutcome
(PrimaryKey primaryKey) Retrieves an item and the associated information by primary key.getItemOutcome
(PrimaryKey primaryKey, String projectionExpression, Map<String, String> nameMap) Retrieves an item and the associated information using projection expression.getItemOutcome
(GetItemSpec params) Retrieves an item and the associated information by specifying all the details.getItemOutcome
(String hashKeyName, Object hashKeyValue) Retrieves an item and the associated information by primary key when the primary key is a hash-only key.getItemOutcome
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue) Retrieves an item and the associated information by primary key when the primary key consists of both a hash-key and a range-key.getItemOutcome
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, GetItemExpressionSpec projectionExpressions) getItemOutcome
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String projectionExpression, Map<String, String> nameMap) Retrieves an item and the associated information via the specified hash key and range key using projection expression.getItemOutcome
(String hashKeyName, Object hashKeyValue, String projectionExpression, Map<String, String> nameMap) Retrieves an item and the associated information via the specified hash key using projection expression.Unconditional put.Conditional put.putItem
(Item item, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Conditional put via condition expression.putItem
(PutItemSpec spec) Puts an item by specifying all the details.query
(KeyAttribute hashKey) Retrieves items by the specified hash key.query
(KeyAttribute hashKey, RangeKeyCondition rangeKeyCondition) Retrieves items by the specified hash key and a range key condition.query
(KeyAttribute hashKey, RangeKeyCondition rangeKeyCondition, QueryFilter... queryFilters) Retrieves items by the specified hash key, a range key condition and a list of query filters.query
(KeyAttribute hashKey, RangeKeyCondition rangeKeyCondition, String filterExpression, String projectionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Retrieves items by the specified hash key, a range key condition, a filter expression and a projection expression.query
(KeyAttribute hashKey, RangeKeyCondition rangeKeyCondition, String filterExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Retrieves items by the specified hash key, a range key condition, and a filter expression string.Queries table by specifying all the details.Retrieves items by the specified hash key.query
(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition) query
(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition, QueryFilter... queryFilters) query
(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition, QueryExpressionSpec queryExpressions) query
(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition, String filterExpression, String projectionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Retrieves items by the specified hash key, a range key condition, a filter expression and a projection expression.query
(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition, String filterExpression, Map<String, String> nameMap, Map<String, Object> valueMap) scan
(ScanFilter... scanFilters) Retrieves items by the specified list of scan filters.Scans table by specifying all the details.scan
(ScanExpressionSpec scanExpressions) scan
(String filterExpression, String projectionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Scans table using a Filter Expression and a Projection Expression.Scans table using a Filter Expression.toString()
updateItem
(PrimaryKey primaryKey, AttributeUpdate... attributeUpdates) Updates an item with the attributes specified.updateItem
(PrimaryKey primaryKey, String updateExpression, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Updates an item with the specified primary key using the given update expression provided the condition expression evaluates to true.updateItem
(PrimaryKey primaryKey, String updateExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Performs an update on an item in the table using the given update expression string.updateItem
(PrimaryKey primaryKey, Collection<Expected> expected, AttributeUpdate... attributeUpdates) Updates an item with the attributes specified.updateItem
(UpdateItemSpec updateItemSpec) Performs an update on an item in the table by specifying all the details.updateItem
(String hashKeyName, Object hashKeyValue, AttributeUpdate... attributeUpdates) updateItem
(String hashKeyName, Object hashKeyValue, UpdateItemExpressionSpec updateExpressions) updateItem
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, AttributeUpdate... attributeUpdates) updateItem
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, UpdateItemExpressionSpec updateExpressions) updateItem
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String updateExpression, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Updates an item with the specified hash key and range key using the given update expression provided the condition expression evaluates to true.updateItem
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String updateExpression, Map<String, String> nameMap, Map<String, Object> valueMap) updateItem
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, Collection<Expected> expected, AttributeUpdate... attributeUpdates) Updates an item with the specified hash key, range key and attributes.updateItem
(String hashKeyName, Object hashKeyValue, String updateExpression, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Updates an item with the specified hash key using the given update expression provided the condition expression evaluates to true.updateItem
(String hashKeyName, Object hashKeyValue, String updateExpression, Map<String, String> nameMap, Map<String, Object> valueMap) updateItem
(String hashKeyName, Object hashKeyValue, Collection<Expected> expected, AttributeUpdate... attributeUpdates) Updates an item with the specified hash-only key and attributes.updateTable
(UpdateTableSpec spec) Updates the provisioned throughput for this table.updateTable
(ProvisionedThroughput provisionedThroughput) Updates the provisioned throughput for this table.A convenient blocking call that can be used, typically during table creation, to wait for the table to become active by polling the table every 5 seconds.A convenient blocking call that can be used to wait on a table until it has either become active or deleted (ie no longer exists) by polling the table every 5 seconds.A convenient blocking call that can be used to wait on a table and all it's indexes until both the table and it's indexes have either become active or deleted (ie no longer exists) by polling the table every 5 seconds.void
A convenient blocking call that can be used, typically during table deletion, to wait for the table to become deleted by polling the table every 5 seconds.
-
Constructor Details
-
Table
-
Table
-
-
Method Details
-
getTableName
-
getDescription
Returns the table description; or null if the table description has not yet been described viadescribe()
. No network call. -
describe
Retrieves the table description from DynamoDB. Involves network calls. Meant to be called as infrequently as possible to avoid throttling exception from the server side.- Returns:
- a non-null table description
- Throws:
ResourceNotFoundException
- if the table doesn't exist
-
getIndex
Gets a reference to the specified index. No network call. -
putItem
Description copied from interface:PutItemApi
Unconditional put.- Specified by:
putItem
in interfacePutItemApi
-
putItem
Description copied from interface:PutItemApi
Conditional put.- Specified by:
putItem
in interfacePutItemApi
-
putItem
public PutItemOutcome putItem(Item item, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:PutItemApi
Conditional put via condition expression.- Specified by:
putItem
in interfacePutItemApi
-
putItem
Description copied from interface:PutItemApi
Puts an item by specifying all the details.- Specified by:
putItem
in interfacePutItemApi
-
getItemOutcome
Description copied from interface:GetItemApi
Retrieves an item and the associated information by primary key when the primary key is a hash-only key. Incurs network access.- Specified by:
getItemOutcome
in interfaceGetItemApi
- Returns:
- the (non-null) result of item retrieval.
-
getItemOutcome
Description copied from interface:GetItemApi
Retrieves an item and the associated information by primary key. Incurs network access.- Specified by:
getItemOutcome
in interfaceGetItemApi
- Returns:
- the (non-null) result of item retrieval.
-
getItemOutcome
public GetItemOutcome getItemOutcome(PrimaryKey primaryKey, String projectionExpression, Map<String, String> nameMap) Description copied from interface:GetItemApi
Retrieves an item and the associated information using projection expression. Incurs network access.- Specified by:
getItemOutcome
in interfaceGetItemApi
projectionExpression
- projection expression, example: "a.b , c[0].e"nameMap
- actual values for the attribute-name place holders; can be null if there is no attribute-name placeholder.- Returns:
- the (non-null) result of item retrieval.
-
getItemOutcome
Description copied from interface:GetItemApi
Retrieves an item and the associated information by specifying all the details. Incurs network access.- Specified by:
getItemOutcome
in interfaceGetItemApi
- Returns:
- the (non-null) result of item retrieval.
-
updateItem
Description copied from interface:UpdateItemApi
Updates an item with the attributes specified.- Specified by:
updateItem
in interfaceUpdateItemApi
- Parameters:
primaryKey
- primary key of the item to be updatedattributeUpdates
- attributes to be updated
-
updateItem
public UpdateItemOutcome updateItem(PrimaryKey primaryKey, Collection<Expected> expected, AttributeUpdate... attributeUpdates) Description copied from interface:UpdateItemApi
Updates an item with the attributes specified.- Specified by:
updateItem
in interfaceUpdateItemApi
- Parameters:
primaryKey
- primary key of the item to be updatedexpected
- the condition to match for the update to succeed.attributeUpdates
- attributes to be updated
-
updateItem
public UpdateItemOutcome updateItem(PrimaryKey primaryKey, String updateExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:UpdateItemApi
Performs an update on an item in the table using the given update expression string.- Specified by:
updateItem
in interfaceUpdateItemApi
- Parameters:
primaryKey
- primary key of the item to be updatedupdateExpression
- the update expression that specifies the attributes to be updated.nameMap
- the map containing the mapping between attribute names used in update expression and the actual name of the attributesvalueMap
- the map containing the mapping between the attribute value used in update expression and the actual value of the attribute
-
updateItem
public UpdateItemOutcome updateItem(PrimaryKey primaryKey, String updateExpression, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:UpdateItemApi
Updates an item with the specified primary key using the given update expression provided the condition expression evaluates to true.- Specified by:
updateItem
in interfaceUpdateItemApi
- Parameters:
primaryKey
- primary key of the item to be updatedupdateExpression
- the update expression that specifies the attributes to be updated.conditionExpression
- the condition expression that specifies the condition that needs to be evaluated to truenameMap
- the map containing the mapping between attribute names used in update and condition expression and the actual name of the attributesvalueMap
- the map containing the mapping between the attribute value used in update and condition expression and the actual value of the attribute
-
updateItem
Description copied from interface:UpdateItemApi
Performs an update on an item in the table by specifying all the details.- Specified by:
updateItem
in interfaceUpdateItemApi
- Parameters:
updateItemSpec
- the update specification for the item to be updated.
-
query
Description copied from interface:QueryApi
Retrieves items by the specified hash key. -
query
Description copied from interface:QueryApi
Retrieves items by the specified hash key. -
query
public ItemCollection<QueryOutcome> query(KeyAttribute hashKey, RangeKeyCondition rangeKeyCondition) Description copied from interface:QueryApi
Retrieves items by the specified hash key and a range key condition. -
query
public ItemCollection<QueryOutcome> query(KeyAttribute hashKey, RangeKeyCondition rangeKeyCondition, String filterExpression, String projectionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:QueryApi
Retrieves items by the specified hash key, a range key condition, a filter expression and a projection expression.- Specified by:
query
in interfaceQueryApi
filterExpression
- filter expression example: "(#a > :a) AND (#c > :c OR #e < :e)"projectionExpression
- projection expression example: "a.b, c[0].e"nameMap
- actual values for the attribute-name place holders; can be null if there is no attribute-name placeholder.valueMap
- actual values for the value place holders can be null if there is no attribute-value placeholder.
-
query
public ItemCollection<QueryOutcome> query(KeyAttribute hashKey, RangeKeyCondition rangeKeyCondition, QueryFilter... queryFilters) Description copied from interface:QueryApi
Retrieves items by the specified hash key, a range key condition and a list of query filters. -
query
public ItemCollection<QueryOutcome> query(KeyAttribute hashKey, RangeKeyCondition rangeKeyCondition, String filterExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:QueryApi
Retrieves items by the specified hash key, a range key condition, and a filter expression string.- Specified by:
query
in interfaceQueryApi
filterExpression
- filter expression example: "(#a > :a) AND (#c > :c OR #e < :e)"nameMap
- actual values for the attribute-name place holders; can be null if there is no attribute-name placeholder.valueMap
- actual values for the value place holders can be null if there is no attribute-value placeholder.
-
query
Description copied from interface:QueryApi
Queries table by specifying all the details. -
scan
Description copied from interface:ScanApi
Retrieves items by the specified list of scan filters. -
scan
public ItemCollection<ScanOutcome> scan(String filterExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:ScanApi
Scans table using a Filter Expression.- Specified by:
scan
in interfaceScanApi
- Parameters:
filterExpression
- condition expression example: "(#a > :a) AND (#c > :c OR #e < :e)"nameMap
- actual values for the attribute-name place holders; can be null if there is no attribute-name placeholder.valueMap
- actual values for the value place holders can be null if there is no attribute-value placeholder.
-
scan
public ItemCollection<ScanOutcome> scan(String filterExpression, String projectionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:ScanApi
Scans table using a Filter Expression and a Projection Expression.- Specified by:
scan
in interfaceScanApi
- Parameters:
filterExpression
- condition expression example: "(#a > :a) AND (#c > :c OR #e < :e)"projectionExpression
- projection expression example: "a.b , c[0].e"nameMap
- actual values for the attribute-name place holders; can be null if there is no attribute-name placeholder.valueMap
- actual values for the value place holders can be null if there is no attribute-value placeholder.
-
scan
Description copied from interface:ScanApi
Scans table by specifying all the details. -
scan
-
deleteItem
Description copied from interface:DeleteItemApi
Deletes an item by primary key.- Specified by:
deleteItem
in interfaceDeleteItemApi
-
deleteItem
Description copied from interface:DeleteItemApi
Deletes an item by primary key.- Specified by:
deleteItem
in interfaceDeleteItemApi
-
deleteItem
Description copied from interface:DeleteItemApi
Conditional delete with the specified primary key and expected conditions.- Specified by:
deleteItem
in interfaceDeleteItemApi
-
deleteItem
public DeleteItemOutcome deleteItem(PrimaryKey primaryKey, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:DeleteItemApi
Conditional delete with the specified primary key and condition expression.- Specified by:
deleteItem
in interfaceDeleteItemApi
-
deleteItem
@Beta public DeleteItemOutcome deleteItem(PrimaryKey primaryKey, DeleteItemExpressionSpec conditionExpressions) -
deleteItem
Description copied from interface:DeleteItemApi
Deletes an item by specifying all the details.- Specified by:
deleteItem
in interfaceDeleteItemApi
-
updateTable
Updates the provisioned throughput for this table. Setting the throughput for a table helps you manage performance and is part of the provisioned throughput feature of DynamoDB.The provisioned throughput values can be upgraded or downgraded based on the maximums and minimums listed in the Limits section in the Amazon DynamoDB Developer Guide.
This table must be in the
ACTIVE
state for this operation to succeed. UpdateTable is an asynchronous operation; while executing the operation, the table is in theUPDATING
state. While the table is in theUPDATING
state, the table still has the provisioned throughput from before the call. The new provisioned throughput setting is in effect only when the table returns to theACTIVE
state after the UpdateTable operation.You can create, update or delete indexes using UpdateTable.
- Parameters:
spec
- used to specify all the detailed parameters- Returns:
- the updated table description returned from DynamoDB.
-
createGSI
public Index createGSI(CreateGlobalSecondaryIndexAction create, AttributeDefinition hashKeyDefinition) Creates a global secondary index (GSI) with only a hash key on this table. Involves network calls. This table must be in theACTIVE
state for this operation to succeed. Creating a global secondary index is an asynchronous operation; while executing the operation, the index is in theCREATING
state. Once created, the index will be inACTIVE
state.- Parameters:
create
- used to specify the details of the index creationhashKeyDefinition
- used to specify the attribute for describing the key schema for the hash key of the GSI to be created for this table.- Returns:
- the index being created
-
createGSI
public Index createGSI(CreateGlobalSecondaryIndexAction create, AttributeDefinition hashKeyDefinition, AttributeDefinition rangeKeyDefinition) Creates a global secondary index (GSI) with both a hash key and a range key on this table. Involves network calls. This table must be in theACTIVE
state for this operation to succeed. Creating a global secondary index is an asynchronous operation; while executing the operation, the index is in theCREATING
state. Once created, the index will be inACTIVE
state.- Parameters:
create
- used to specify the details of the index creationhashKeyDefinition
- used to specify the attribute for describing the key schema for the hash key of the GSI to be created for this table.rangeKeyDefinition
- used to specify the attribute for describing the key schema for the range key of the GSI to be created for this table.- Returns:
- the index being created
-
updateTable
Updates the provisioned throughput for this table. Setting the throughput for a table helps you manage performance and is part of the provisioned throughput feature of DynamoDB.The provisioned throughput values can be upgraded or downgraded based on the maximums and minimums listed in the Limits section in the Amazon DynamoDB Developer Guide.
This table must be in the
ACTIVE
state for this operation to succeed. UpdateTable is an asynchronous operation; while executing the operation, the table is in theUPDATING
state. While the table is in theUPDATING
state, the table still has the provisioned throughput from before the call. The new provisioned throughput setting is in effect only when the table returns to theACTIVE
state after the UpdateTable operation.You can create, update or delete indexes using UpdateTable.
- Parameters:
provisionedThroughput
- target provisioned throughput- Returns:
- the updated table description returned from DynamoDB.
-
waitForActive
A convenient blocking call that can be used, typically during table creation, to wait for the table to become active by polling the table every 5 seconds.- Returns:
- the table description when the table has become active
- Throws:
IllegalArgumentException
- if the table is being deletedResourceNotFoundException
- if the table doesn't existInterruptedException
-
waitForDelete
A convenient blocking call that can be used, typically during table deletion, to wait for the table to become deleted by polling the table every 5 seconds.- Throws:
InterruptedException
-
waitForActiveOrDelete
A convenient blocking call that can be used to wait on a table until it has either become active or deleted (ie no longer exists) by polling the table every 5 seconds.- Returns:
- the table description if the table has become active; or null if the table has been deleted.
- Throws:
InterruptedException
-
waitForAllActiveOrDelete
A convenient blocking call that can be used to wait on a table and all it's indexes until both the table and it's indexes have either become active or deleted (ie no longer exists) by polling the table every 5 seconds.- Returns:
- the table description if the table and all it's indexes have become active; or null if the table has been deleted.
- Throws:
InterruptedException
-
delete
Deletes the table from DynamoDB. Involves network calls. -
getItem
Description copied from interface:GetItemApi
Retrieves an item by primary key. Incurs network access.- Specified by:
getItem
in interfaceGetItemApi
- Returns:
- the retrieved item; or null if the item doesn't exist.
-
getItem
Description copied from interface:GetItemApi
Retrieves an item by primary key; or null if the item doesn't exist. Incurs network access.- Specified by:
getItem
in interfaceGetItemApi
- Returns:
- the retrieved item; or null if the item doesn't exist.
-
getItem
Description copied from interface:GetItemApi
Retrieves an item using projection expression. Incurs network access.- Specified by:
getItem
in interfaceGetItemApi
projectionExpression
- projection expression, example: "a.b , c[0].e"nameMap
- actual values for the attribute-name place holders; can be null if there is no attribute-name placeholder.- Returns:
- the retrieved item; or null if the item doesn't exist.
-
getItem
Description copied from interface:GetItemApi
Retrieves an item by specifying all the details. Incurs network access.- Specified by:
getItem
in interfaceGetItemApi
- Returns:
- the retrieved item; or null if the item doesn't exist.
-
getItemOutcome
Description copied from interface:GetItemApi
Retrieves an item and the associated information by primary key when the primary key is a hash-only key. Incurs network access.- Specified by:
getItemOutcome
in interfaceGetItemApi
- Returns:
- the (non-null) result of item retrieval.
-
getItemOutcome
public GetItemOutcome getItemOutcome(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue) Description copied from interface:GetItemApi
Retrieves an item and the associated information by primary key when the primary key consists of both a hash-key and a range-key. Incurs network access.- Specified by:
getItemOutcome
in interfaceGetItemApi
- Returns:
- the (non-null) result of item retrieval.
-
getItem
Description copied from interface:GetItemApi
Retrieves an item by primary key when the primary key is a hash-only key. Incurs network access.- Specified by:
getItem
in interfaceGetItemApi
- Returns:
- the retrieved item; or null if the item doesn't exist.
-
getItem
public Item getItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue) Description copied from interface:GetItemApi
Retrieves an item by primary key when the primary key consists of both a hash-key and a range-key. Incurs network access.- Specified by:
getItem
in interfaceGetItemApi
- Returns:
- the retrieved item; or null if the item doesn't exist.
-
query
public ItemCollection<QueryOutcome> query(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition) -
query
public ItemCollection<QueryOutcome> query(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition, QueryFilter... queryFilters) -
query
public ItemCollection<QueryOutcome> query(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition, String filterExpression, Map<String, String> nameMap, Map<String, Object> valueMap) -
query
public ItemCollection<QueryOutcome> query(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition, String filterExpression, String projectionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:QueryApi
Retrieves items by the specified hash key, a range key condition, a filter expression and a projection expression.- Specified by:
query
in interfaceQueryApi
filterExpression
- filter expression example: "(#a > :a) AND (#c > :c OR #e < :e)"projectionExpression
- projection expression example: "a.b, c[0].e"nameMap
- actual values for the attribute-name place holders; can be null if there is no attribute-name placeholder.valueMap
- actual values for the value place holders can be null if there is no attribute-value placeholder.
-
query
@Beta public ItemCollection<QueryOutcome> query(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition, QueryExpressionSpec queryExpressions) -
updateItem
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, AttributeUpdate... attributeUpdates) - Specified by:
updateItem
in interfaceUpdateItemApi
-
updateItem
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, AttributeUpdate... attributeUpdates) - Specified by:
updateItem
in interfaceUpdateItemApi
-
updateItem
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, Collection<Expected> expected, AttributeUpdate... attributeUpdates) Description copied from interface:UpdateItemApi
Updates an item with the specified hash-only key and attributes.- Specified by:
updateItem
in interfaceUpdateItemApi
-
updateItem
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, Collection<Expected> expected, AttributeUpdate... attributeUpdates) Description copied from interface:UpdateItemApi
Updates an item with the specified hash key, range key and attributes.- Specified by:
updateItem
in interfaceUpdateItemApi
-
updateItem
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String updateExpression, Map<String, String> nameMap, Map<String, Object> valueMap) - Specified by:
updateItem
in interfaceUpdateItemApi
-
updateItem
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String updateExpression, Map<String, String> nameMap, Map<String, Object> valueMap) - Specified by:
updateItem
in interfaceUpdateItemApi
-
updateItem
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String updateExpression, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:UpdateItemApi
Updates an item with the specified hash key using the given update expression provided the condition expression evaluates to true.- Specified by:
updateItem
in interfaceUpdateItemApi
-
updateItem
@Beta public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, UpdateItemExpressionSpec updateExpressions) -
updateItem
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String updateExpression, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:UpdateItemApi
Updates an item with the specified hash key and range key using the given update expression provided the condition expression evaluates to true.- Specified by:
updateItem
in interfaceUpdateItemApi
-
updateItem
@Beta public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, UpdateItemExpressionSpec updateExpressions) -
getItemOutcome
public GetItemOutcome getItemOutcome(String hashKeyName, Object hashKeyValue, String projectionExpression, Map<String, String> nameMap) Description copied from interface:GetItemApi
Retrieves an item and the associated information via the specified hash key using projection expression. Incurs network access.- Specified by:
getItemOutcome
in interfaceGetItemApi
- Returns:
- the (non-null) result of item retrieval.
-
getItemOutcome
public GetItemOutcome getItemOutcome(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String projectionExpression, Map<String, String> nameMap) Description copied from interface:GetItemApi
Retrieves an item and the associated information via the specified hash key and range key using projection expression. Incurs network access.- Specified by:
getItemOutcome
in interfaceGetItemApi
- Returns:
- the (non-null) result of item retrieval.
-
getItemOutcome
@Beta public GetItemOutcome getItemOutcome(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, GetItemExpressionSpec projectionExpressions) -
getItem
public Item getItem(String hashKeyName, Object hashKeyValue, String projectionExpression, Map<String, String> nameMap) Description copied from interface:GetItemApi
Retrieves an item via the specified hash key using projection expression. Incurs network access.- Specified by:
getItem
in interfaceGetItemApi
- Returns:
- the retrieved item; or null if the item doesn't exist.
-
getItem
public Item getItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String projectionExpression, Map<String, String> nameMap) Description copied from interface:GetItemApi
Retrieves an item via the specified hash key and range key using projection expression. Incurs network access.- Specified by:
getItem
in interfaceGetItemApi
- Returns:
- the retrieved item; or null if the item doesn't exist.
-
getItem
-
deleteItem
Description copied from interface:DeleteItemApi
Deletes an item by hash-only primary key.- Specified by:
deleteItem
in interfaceDeleteItemApi
-
deleteItem
public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue) Description copied from interface:DeleteItemApi
Deletes an item by hash key-and-range primary key.- Specified by:
deleteItem
in interfaceDeleteItemApi
-
deleteItem
Description copied from interface:DeleteItemApi
Conditional delete with the specified hash-only primary key and expected conditions.- Specified by:
deleteItem
in interfaceDeleteItemApi
-
deleteItem
public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, Expected... expected) Description copied from interface:DeleteItemApi
Conditional delete with the specified hash-and-range primary key and expected conditions.- Specified by:
deleteItem
in interfaceDeleteItemApi
-
deleteItem
public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:DeleteItemApi
Conditional delete with the specified hash-only primary key and condition expression.- Specified by:
deleteItem
in interfaceDeleteItemApi
-
deleteItem
public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String conditionExpression, Map<String, String> nameMap, Map<String, Object> valueMap) Description copied from interface:DeleteItemApi
Conditional delete with the specified hash-and-range primary key and condition expression.- Specified by:
deleteItem
in interfaceDeleteItemApi
-
deleteItem
@Beta public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, DeleteItemExpressionSpec conditionExpressions) -
toString
-