@ThreadSafe public class Table extends Object implements PutItemApi, GetItemApi, QueryApi, ScanApi, UpdateItemApi, DeleteItemApi
DynamoDB.getTable(String)
.Constructor and Description |
---|
Table(AmazonDynamoDB client,
String tableName) |
Table(AmazonDynamoDB client,
String tableName,
TableDescription tableDescription) |
Modifier and Type | Method and Description |
---|---|
Index |
createGSI(CreateGlobalSecondaryIndexAction create,
AttributeDefinition hashKeyDefinition)
Creates a global secondary index (GSI) with only a hash key on this
table.
|
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.
|
DeleteTableResult |
delete()
Deletes the table from DynamoDB.
|
DeleteItemOutcome |
deleteItem(DeleteItemSpec spec)
Deletes an item by specifying all the details.
|
DeleteItemOutcome |
deleteItem(KeyAttribute... primaryKeyComponents)
Deletes an item by primary key.
|
DeleteItemOutcome |
deleteItem(PrimaryKey primaryKey)
Deletes an item by primary key.
|
DeleteItemOutcome |
deleteItem(PrimaryKey primaryKey,
DeleteItemExpressionSpec conditionExpressions) |
DeleteItemOutcome |
deleteItem(PrimaryKey primaryKey,
Expected... expected)
Conditional delete with the specified primary key and expected
conditions.
|
DeleteItemOutcome |
deleteItem(PrimaryKey primaryKey,
String conditionExpression,
Map<String,String> nameMap,
Map<String,Object> valueMap)
Conditional delete with the specified primary key and condition
expression.
|
DeleteItemOutcome |
deleteItem(String hashKeyName,
Object hashKeyValue)
Deletes an item by hash-only primary key.
|
DeleteItemOutcome |
deleteItem(String hashKeyName,
Object hashKeyValue,
Expected... expected)
Conditional delete with the specified hash-only primary key and expected
conditions.
|
DeleteItemOutcome |
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.
|
DeleteItemOutcome |
deleteItem(String hashKeyName,
Object hashKeyValue,
String rangeKeyName,
Object rangeKeyValue)
Deletes an item by hash key-and-range primary key.
|
DeleteItemOutcome |
deleteItem(String hashKeyName,
Object hashKeyValue,
String rangeKeyName,
Object rangeKeyValue,
DeleteItemExpressionSpec conditionExpressions) |
DeleteItemOutcome |
deleteItem(String hashKeyName,
Object hashKeyValue,
String rangeKeyName,
Object rangeKeyValue,
Expected... expected)
Conditional delete with the specified hash-and-range primary key and
expected conditions.
|
DeleteItemOutcome |
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.
|
TableDescription |
describe()
Retrieves the table description from DynamoDB.
|
TableDescription |
getDescription()
Returns the table description; or null if the table description has not
yet been described via
describe() . |
Index |
getIndex(String indexName)
Gets a reference to the specified index.
|
Item |
getItem(GetItemSpec spec)
Retrieves an item by specifying all the details.
|
Item |
getItem(KeyAttribute... primaryKeyComponents)
Retrieves an item by primary key.
|
Item |
getItem(PrimaryKey primaryKey)
Retrieves an item by primary key; or null if the item doesn't exist.
|
Item |
getItem(PrimaryKey primaryKey,
String projectionExpression,
Map<String,String> nameMap)
Retrieves an item using projection expression.
|
Item |
getItem(String hashKeyName,
Object hashKeyValue)
Retrieves an item by primary key when the primary key is a hash-only key.
|
Item |
getItem(String hashKeyName,
Object hashKeyValue,
String projectionExpression,
Map<String,String> nameMap)
Retrieves an item via the specified hash key using projection expression.
|
Item |
getItem(String hashKeyName,
Object hashKeyValue,
String rangeKeyName,
Object rangeKeyValue)
Retrieves an item by primary key when the primary key consists of both a
hash-key and a range-key.
|
Item |
getItem(String hashKeyName,
Object hashKeyValue,
String rangeKeyName,
Object rangeKeyValue,
GetItemExpressionSpec projectionExpressions) |
Item |
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.
|
GetItemOutcome |
getItemOutcome(GetItemSpec params)
Retrieves an item and the associated information by specifying all the
details.
|
GetItemOutcome |
getItemOutcome(KeyAttribute... primaryKeyComponents)
Retrieves an item and the associated information by primary key when the
primary key is a hash-only key.
|
GetItemOutcome |
getItemOutcome(PrimaryKey primaryKey)
Retrieves an item and the associated information by primary key.
|
GetItemOutcome |
getItemOutcome(PrimaryKey primaryKey,
String projectionExpression,
Map<String,String> nameMap)
Retrieves an item and the associated information using projection
expression.
|
GetItemOutcome |
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 |
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.
|
GetItemOutcome |
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 |
getItemOutcome(String hashKeyName,
Object hashKeyValue,
String rangeKeyName,
Object rangeKeyValue,
GetItemExpressionSpec projectionExpressions) |
GetItemOutcome |
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.
|
String |
getTableName() |
PutItemOutcome |
putItem(Item item)
Unconditional put.
|
PutItemOutcome |
putItem(Item item,
Expected... expected)
Conditional put.
|
PutItemOutcome |
putItem(Item item,
String conditionExpression,
Map<String,String> nameMap,
Map<String,Object> valueMap)
Conditional put via condition expression.
|
PutItemOutcome |
putItem(PutItemSpec spec)
Puts an item by specifying all the details.
|
ItemCollection<QueryOutcome> |
query(KeyAttribute hashKey)
Retrieves items by the specified hash key.
|
ItemCollection<QueryOutcome> |
query(KeyAttribute hashKey,
RangeKeyCondition rangeKeyCondition)
Retrieves items by the specified hash key and a range key condition.
|
ItemCollection<QueryOutcome> |
query(KeyAttribute hashKey,
RangeKeyCondition rangeKeyCondition,
QueryFilter... queryFilters)
Retrieves items by the specified hash key, a range key condition
and a list of query filters.
|
ItemCollection<QueryOutcome> |
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.
|
ItemCollection<QueryOutcome> |
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.
|
ItemCollection<QueryOutcome> |
query(QuerySpec spec)
Queries table by specifying all the details.
|
ItemCollection<QueryOutcome> |
query(String hashKeyName,
Object hashKeyValue)
Retrieves items by the specified hash key.
|
ItemCollection<QueryOutcome> |
query(String hashKeyName,
Object hashKeyValue,
RangeKeyCondition rangeKeyCondition) |
ItemCollection<QueryOutcome> |
query(String hashKeyName,
Object hashKeyValue,
RangeKeyCondition rangeKeyCondition,
QueryExpressionSpec queryExpressions) |
ItemCollection<QueryOutcome> |
query(String hashKeyName,
Object hashKeyValue,
RangeKeyCondition rangeKeyCondition,
QueryFilter... queryFilters) |
ItemCollection<QueryOutcome> |
query(String hashKeyName,
Object hashKeyValue,
RangeKeyCondition rangeKeyCondition,
String filterExpression,
Map<String,String> nameMap,
Map<String,Object> valueMap) |
ItemCollection<QueryOutcome> |
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.
|
ItemCollection<ScanOutcome> |
scan(ScanExpressionSpec scanExpressions) |
ItemCollection<ScanOutcome> |
scan(ScanFilter... scanFilters)
Retrieves items by the specified list of scan filters.
|
ItemCollection<ScanOutcome> |
scan(ScanSpec params)
Scans table by specifying all the details.
|
ItemCollection<ScanOutcome> |
scan(String filterExpression,
Map<String,String> nameMap,
Map<String,Object> valueMap)
Scans table using a Filter Expression.
|
ItemCollection<ScanOutcome> |
scan(String filterExpression,
String projectionExpression,
Map<String,String> nameMap,
Map<String,Object> valueMap)
Scans table using a Filter Expression and a Projection Expression.
|
String |
toString() |
UpdateItemOutcome |
updateItem(PrimaryKey primaryKey,
AttributeUpdate... attributeUpdates)
Updates an item with the attributes specified.
|
UpdateItemOutcome |
updateItem(PrimaryKey primaryKey,
Collection<Expected> expected,
AttributeUpdate... attributeUpdates)
Updates an item with the attributes specified.
|
UpdateItemOutcome |
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.
|
UpdateItemOutcome |
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.
|
UpdateItemOutcome |
updateItem(String hashKeyName,
Object hashKeyValue,
AttributeUpdate... attributeUpdates) |
UpdateItemOutcome |
updateItem(String hashKeyName,
Object hashKeyValue,
Collection<Expected> expected,
AttributeUpdate... attributeUpdates)
Updates an item with the specified hash-only key and attributes.
|
UpdateItemOutcome |
updateItem(String hashKeyName,
Object hashKeyValue,
String updateExpression,
Map<String,String> nameMap,
Map<String,Object> valueMap) |
UpdateItemOutcome |
updateItem(String hashKeyName,
Object hashKeyValue,
String rangeKeyName,
Object rangeKeyValue,
AttributeUpdate... attributeUpdates) |
UpdateItemOutcome |
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.
|
UpdateItemOutcome |
updateItem(String hashKeyName,
Object hashKeyValue,
String rangeKeyName,
Object rangeKeyValue,
String updateExpression,
Map<String,String> nameMap,
Map<String,Object> valueMap) |
UpdateItemOutcome |
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.
|
UpdateItemOutcome |
updateItem(String hashKeyName,
Object hashKeyValue,
String rangeKeyName,
Object rangeKeyValue,
UpdateItemExpressionSpec updateExpressions) |
UpdateItemOutcome |
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.
|
UpdateItemOutcome |
updateItem(String hashKeyName,
Object hashKeyValue,
UpdateItemExpressionSpec updateExpressions) |
UpdateItemOutcome |
updateItem(UpdateItemSpec updateItemSpec)
Performs an update on an item in the table by specifying all the details.
|
TableDescription |
updateTable(ProvisionedThroughput provisionedThroughput)
Updates the provisioned throughput for this table.
|
TableDescription |
updateTable(UpdateTableSpec spec)
Updates the provisioned throughput for this table.
|
TableDescription |
waitForActive()
A convenient blocking call that can be used, typically during table
creation, to wait for the table to become active.
|
TableDescription |
waitForActiveOrDelete()
Deprecated.
If this method is called immediately after
AmazonDynamoDB.createTable(CreateTableRequest) or
AmazonDynamoDB.deleteTable(DeleteTableRequest) operation,
the result might be incorrect as all AmazonDynamoDB
operations are eventually consistent and might have a few seconds delay before the status is changed. |
TableDescription |
waitForAllActiveOrDelete()
Deprecated.
If this method is called immediately after
AmazonDynamoDB.createTable(CreateTableRequest) or
AmazonDynamoDB.deleteTable(DeleteTableRequest) operation,
the result might be incorrect as all AmazonDynamoDB
operations are eventually consistent and might have a few seconds delay before the status is changed. |
void |
waitForDelete()
A convenient blocking call that can be used, typically during table
deletion, to wait for the table to become deleted.
|
public Table(AmazonDynamoDB client, String tableName)
public Table(AmazonDynamoDB client, String tableName, TableDescription tableDescription)
public String getTableName()
public TableDescription getDescription()
describe()
. No network call.public TableDescription describe()
ResourceNotFoundException
- if the table doesn't existpublic Index getIndex(String indexName)
public PutItemOutcome putItem(Item item)
PutItemApi
putItem
in interface PutItemApi
public PutItemOutcome putItem(Item item, Expected... expected)
PutItemApi
putItem
in interface PutItemApi
public PutItemOutcome putItem(Item item, String conditionExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
PutItemApi
putItem
in interface PutItemApi
public PutItemOutcome putItem(PutItemSpec spec)
PutItemApi
putItem
in interface PutItemApi
public GetItemOutcome getItemOutcome(KeyAttribute... primaryKeyComponents)
GetItemApi
getItemOutcome
in interface GetItemApi
public GetItemOutcome getItemOutcome(PrimaryKey primaryKey)
GetItemApi
getItemOutcome
in interface GetItemApi
public GetItemOutcome getItemOutcome(PrimaryKey primaryKey, String projectionExpression, Map<String,String> nameMap)
GetItemApi
getItemOutcome
in interface GetItemApi
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.public GetItemOutcome getItemOutcome(GetItemSpec params)
GetItemApi
getItemOutcome
in interface GetItemApi
public UpdateItemOutcome updateItem(PrimaryKey primaryKey, AttributeUpdate... attributeUpdates)
UpdateItemApi
updateItem
in interface UpdateItemApi
primaryKey
- primary key of the item to be updatedattributeUpdates
- attributes to be updatedpublic UpdateItemOutcome updateItem(PrimaryKey primaryKey, Collection<Expected> expected, AttributeUpdate... attributeUpdates)
UpdateItemApi
updateItem
in interface UpdateItemApi
primaryKey
- primary key of the item to be updatedexpected
- the condition to match for the update to succeed.attributeUpdates
- attributes to be updatedpublic UpdateItemOutcome updateItem(PrimaryKey primaryKey, String updateExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
UpdateItemApi
updateItem
in interface UpdateItemApi
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
attributepublic UpdateItemOutcome updateItem(PrimaryKey primaryKey, String updateExpression, String conditionExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
UpdateItemApi
updateItem
in interface UpdateItemApi
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 attributepublic UpdateItemOutcome updateItem(UpdateItemSpec updateItemSpec)
UpdateItemApi
updateItem
in interface UpdateItemApi
updateItemSpec
- the update specification for the item to be updated.public ItemCollection<QueryOutcome> query(String hashKeyName, Object hashKeyValue)
QueryApi
public ItemCollection<QueryOutcome> query(KeyAttribute hashKey)
QueryApi
public ItemCollection<QueryOutcome> query(KeyAttribute hashKey, RangeKeyCondition rangeKeyCondition)
QueryApi
public ItemCollection<QueryOutcome> query(KeyAttribute hashKey, RangeKeyCondition rangeKeyCondition, String filterExpression, String projectionExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
QueryApi
query
in interface QueryApi
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.public ItemCollection<QueryOutcome> query(KeyAttribute hashKey, RangeKeyCondition rangeKeyCondition, QueryFilter... queryFilters)
QueryApi
public ItemCollection<QueryOutcome> query(KeyAttribute hashKey, RangeKeyCondition rangeKeyCondition, String filterExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
QueryApi
query
in interface QueryApi
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.public ItemCollection<QueryOutcome> query(QuerySpec spec)
QueryApi
public ItemCollection<ScanOutcome> scan(ScanFilter... scanFilters)
ScanApi
public ItemCollection<ScanOutcome> scan(String filterExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
ScanApi
scan
in interface ScanApi
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.public ItemCollection<ScanOutcome> scan(String filterExpression, String projectionExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
ScanApi
scan
in interface ScanApi
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.public ItemCollection<ScanOutcome> scan(ScanSpec params)
ScanApi
@Beta public ItemCollection<ScanOutcome> scan(ScanExpressionSpec scanExpressions)
public DeleteItemOutcome deleteItem(KeyAttribute... primaryKeyComponents)
DeleteItemApi
deleteItem
in interface DeleteItemApi
public DeleteItemOutcome deleteItem(PrimaryKey primaryKey)
DeleteItemApi
deleteItem
in interface DeleteItemApi
public DeleteItemOutcome deleteItem(PrimaryKey primaryKey, Expected... expected)
DeleteItemApi
deleteItem
in interface DeleteItemApi
public DeleteItemOutcome deleteItem(PrimaryKey primaryKey, String conditionExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
DeleteItemApi
deleteItem
in interface DeleteItemApi
@Beta public DeleteItemOutcome deleteItem(PrimaryKey primaryKey, DeleteItemExpressionSpec conditionExpressions)
public DeleteItemOutcome deleteItem(DeleteItemSpec spec)
DeleteItemApi
deleteItem
in interface DeleteItemApi
public TableDescription updateTable(UpdateTableSpec spec)
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 the UPDATING
state. While the table is in the UPDATING
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 the ACTIVE
state after the UpdateTable
operation.
You can create, update or delete indexes using UpdateTable.
spec
- used to specify all the detailed parameterspublic Index createGSI(CreateGlobalSecondaryIndexAction create, AttributeDefinition hashKeyDefinition)
ACTIVE
state for this operation to succeed. Creating a
global secondary index is an asynchronous operation; while executing the
operation, the index is in the CREATING
state. Once created,
the index will be in ACTIVE
state.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.public Index createGSI(CreateGlobalSecondaryIndexAction create, AttributeDefinition hashKeyDefinition, AttributeDefinition rangeKeyDefinition)
ACTIVE
state for this operation to succeed. Creating a
global secondary index is an asynchronous operation; while executing the
operation, the index is in the CREATING
state. Once created,
the index will be in ACTIVE
state.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.public TableDescription updateTable(ProvisionedThroughput provisionedThroughput)
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 the UPDATING
state. While the table is in the UPDATING
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 the ACTIVE
state after the UpdateTable
operation.
You can create, update or delete indexes using UpdateTable.
provisionedThroughput
- target provisioned throughputpublic TableDescription waitForActive() throws InterruptedException
AmazonDynamoDBWaiters
to poll the status of the table every 5 seconds.IllegalArgumentException
- if the table is being deletedResourceNotFoundException
- if the table doesn't existInterruptedException
public void waitForDelete() throws InterruptedException
AmazonDynamoDBWaiters
to poll the status of the table every 5 seconds.InterruptedException
@Deprecated public TableDescription waitForActiveOrDelete() throws InterruptedException
AmazonDynamoDB.createTable(CreateTableRequest)
or
AmazonDynamoDB.deleteTable(DeleteTableRequest)
operation,
the result might be incorrect as all AmazonDynamoDB
operations are eventually consistent and might have a few seconds delay before the status is changed.InterruptedException
@Deprecated public TableDescription waitForAllActiveOrDelete() throws InterruptedException
AmazonDynamoDB.createTable(CreateTableRequest)
or
AmazonDynamoDB.deleteTable(DeleteTableRequest)
operation,
the result might be incorrect as all AmazonDynamoDB
operations are eventually consistent and might have a few seconds delay before the status is changed.InterruptedException
public DeleteTableResult delete()
public Item getItem(KeyAttribute... primaryKeyComponents)
GetItemApi
getItem
in interface GetItemApi
public Item getItem(PrimaryKey primaryKey)
GetItemApi
getItem
in interface GetItemApi
public Item getItem(PrimaryKey primaryKey, String projectionExpression, Map<String,String> nameMap)
GetItemApi
getItem
in interface GetItemApi
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.public Item getItem(GetItemSpec spec)
GetItemApi
getItem
in interface GetItemApi
public GetItemOutcome getItemOutcome(String hashKeyName, Object hashKeyValue)
GetItemApi
getItemOutcome
in interface GetItemApi
public GetItemOutcome getItemOutcome(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue)
GetItemApi
getItemOutcome
in interface GetItemApi
public Item getItem(String hashKeyName, Object hashKeyValue)
GetItemApi
getItem
in interface GetItemApi
public Item getItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue)
GetItemApi
getItem
in interface GetItemApi
public ItemCollection<QueryOutcome> query(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition)
public ItemCollection<QueryOutcome> query(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition, QueryFilter... queryFilters)
public ItemCollection<QueryOutcome> query(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition, String filterExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
public ItemCollection<QueryOutcome> query(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition, String filterExpression, String projectionExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
QueryApi
query
in interface QueryApi
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.@Beta public ItemCollection<QueryOutcome> query(String hashKeyName, Object hashKeyValue, RangeKeyCondition rangeKeyCondition, QueryExpressionSpec queryExpressions)
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, AttributeUpdate... attributeUpdates)
updateItem
in interface UpdateItemApi
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, AttributeUpdate... attributeUpdates)
updateItem
in interface UpdateItemApi
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, Collection<Expected> expected, AttributeUpdate... attributeUpdates)
UpdateItemApi
updateItem
in interface UpdateItemApi
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, Collection<Expected> expected, AttributeUpdate... attributeUpdates)
UpdateItemApi
updateItem
in interface UpdateItemApi
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String updateExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
updateItem
in interface UpdateItemApi
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String updateExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
updateItem
in interface UpdateItemApi
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String updateExpression, String conditionExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
UpdateItemApi
updateItem
in interface UpdateItemApi
@Beta public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, UpdateItemExpressionSpec updateExpressions)
public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String updateExpression, String conditionExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
UpdateItemApi
updateItem
in interface UpdateItemApi
@Beta public UpdateItemOutcome updateItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, UpdateItemExpressionSpec updateExpressions)
public GetItemOutcome getItemOutcome(String hashKeyName, Object hashKeyValue, String projectionExpression, Map<String,String> nameMap)
GetItemApi
getItemOutcome
in interface GetItemApi
public GetItemOutcome getItemOutcome(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String projectionExpression, Map<String,String> nameMap)
GetItemApi
getItemOutcome
in interface GetItemApi
@Beta public GetItemOutcome getItemOutcome(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, GetItemExpressionSpec projectionExpressions)
public Item getItem(String hashKeyName, Object hashKeyValue, String projectionExpression, Map<String,String> nameMap)
GetItemApi
getItem
in interface GetItemApi
public Item getItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String projectionExpression, Map<String,String> nameMap)
GetItemApi
getItem
in interface GetItemApi
@Beta public Item getItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, GetItemExpressionSpec projectionExpressions)
public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue)
DeleteItemApi
deleteItem
in interface DeleteItemApi
public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue)
DeleteItemApi
deleteItem
in interface DeleteItemApi
public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue, Expected... expected)
DeleteItemApi
deleteItem
in interface DeleteItemApi
public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, Expected... expected)
DeleteItemApi
deleteItem
in interface DeleteItemApi
public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue, String conditionExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
DeleteItemApi
deleteItem
in interface DeleteItemApi
public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, String conditionExpression, Map<String,String> nameMap, Map<String,Object> valueMap)
DeleteItemApi
deleteItem
in interface DeleteItemApi
@Beta public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, DeleteItemExpressionSpec conditionExpressions)