public class Table
extends java.lang.Object
Constructor and Description |
---|
Table(AmazonDynamoDB client,
java.lang.String tableName)
Constructor.
|
Table(AmazonDynamoDB client,
java.lang.String tableName,
TableDescription tableDescription)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Document |
deleteItem(Primitive hashKey)
Delete a document in DynamoDB.
|
Document |
deleteItem(Primitive hashKey,
DeleteItemOperationConfig config)
Delete a document in DynamoDB.
|
Document |
deleteItem(Primitive hashKey,
Primitive rangeKey)
Delete a document in DynamoDB.
|
Document |
deleteItem(Primitive hashKey,
Primitive rangeKey,
DeleteItemOperationConfig config)
Delete a document in DynamoDB.
|
java.util.List<AttributeDefinition> |
getAttributes() |
java.util.Map<java.lang.String,GlobalSecondaryIndexDescription> |
getGlobalSecondaryIndexes() |
java.util.List<java.lang.String> |
getGlobalSecondaryIndexNames() |
java.util.List<java.lang.String> |
getHashKeys() |
Document |
getItem(Primitive hashKey)
Gets a document from DynamoDB by hash primary key.
|
Document |
getItem(Primitive hashKey,
GetItemOperationConfig config)
Gets a document from DynamoDB by hash primary key, using specified
configs.
|
Document |
getItem(Primitive hashKey,
Primitive rangeKey)
Gets a document from DynamoDB by hash-and-range primary key.
|
Document |
getItem(Primitive hashKey,
Primitive rangeKey,
GetItemOperationConfig config)
Gets a document from DynamoDB by hash-and-range primary key, using
specified configs.
|
java.util.Map<java.lang.String,com.amazonaws.mobileconnectors.dynamodbv2.document.internal.KeyDescription> |
getKeys() |
java.util.Map<java.lang.String,LocalSecondaryIndexDescription> |
getLocalSecondaryIndexes() |
java.util.List<java.lang.String> |
getLocalSecondaryIndexNames() |
java.util.List<java.lang.String> |
getRangeKeys() |
TableDescription |
getTableDescription() |
java.lang.String |
getTableName() |
static Table |
loadTable(AmazonDynamoDB client,
java.lang.String tableName)
Load table configuration.
|
void |
loadTableDescription()
Load table description.
|
Document |
putItem(Document document)
Puts a document into DynamoDB.
|
Document |
putItem(Document document,
PutItemOperationConfig config)
Puts a document into DynamoDB.
|
Search |
query(Primitive hashKey)
Initiates a Search object to Query a DynamoDB table, with the specified
hash primary key.
|
Search |
query(Primitive hashKey,
Expression filterExpression)
Initiates a Search object to Query a DynamoDB table, with the specified
hash primary key and filterExpression.
|
Search |
query(Primitive hashKey,
QueryFilter filter)
Initiates a Search object to Query a DynamoDB table, with the specified
hash primary key and filter.
|
Search |
query(QueryFilter filter)
Initiates a Search object to Query a DynamoDB table, with the specified
query filter.
|
Search |
query(QueryOperationConfig config)
Initiates a Search object to Query a DynamoDB table, with the specified
query operation config.
|
Search |
scan(Expression filterExpression)
Initiates a Search object to Scan a DynamoDB table, with the specified
expression.
|
Search |
scan(ScanFilter filter)
Initiates a Search object to Scan a DynamoDB table, with the specified
filter.
|
Search |
scan(ScanOperationConfig config)
Initiates a Search object to Query a DynamoDB table, with the specified
config.
|
Document |
updateItem(Document doc,
Primitive hashKey,
Primitive rangeKey,
UpdateItemOperationConfig config)
Update a document in DynamoDB.
|
Document |
updateItem(Document doc,
Primitive hashKey,
UpdateItemOperationConfig config)
Update a document in DynamoDB.
|
Document |
updateItem(Document doc,
UpdateItemOperationConfig config)
Update a document in DynamoDB.
|
public Table(AmazonDynamoDB client, java.lang.String tableName)
client
- the dynamodb client.tableName
- the table name.public Table(AmazonDynamoDB client, java.lang.String tableName, TableDescription tableDescription)
client
- the dynamodb client.tableName
- the table name.tableDescription
- the table description.public static Table loadTable(AmazonDynamoDB client, java.lang.String tableName)
client
- the dynamodb client.tableName
- the tablename.public void loadTableDescription()
public java.lang.String getTableName()
public TableDescription getTableDescription()
public java.util.Map<java.lang.String,com.amazonaws.mobileconnectors.dynamodbv2.document.internal.KeyDescription> getKeys()
public java.util.Map<java.lang.String,GlobalSecondaryIndexDescription> getGlobalSecondaryIndexes()
public java.util.Map<java.lang.String,LocalSecondaryIndexDescription> getLocalSecondaryIndexes()
public java.util.List<java.lang.String> getLocalSecondaryIndexNames()
public java.util.List<java.lang.String> getGlobalSecondaryIndexNames()
public java.util.List<java.lang.String> getHashKeys()
public java.util.List<java.lang.String> getRangeKeys()
public java.util.List<AttributeDefinition> getAttributes()
public Document putItem(Document document)
document
- the Document
.public Document putItem(Document document, PutItemOperationConfig config)
document
- the Document
.config
- PutItemOperationConfig
.Document
.public Document getItem(Primitive hashKey)
hashKey
- the hash key.Document
.public Document getItem(Primitive hashKey, Primitive rangeKey)
hashKey
- the hash key.rangeKey
- the range key.Document
.public Document getItem(Primitive hashKey, GetItemOperationConfig config)
hashKey
- the hash key.config
- the GetItemOperationConfig
.Document
.public Document getItem(Primitive hashKey, Primitive rangeKey, GetItemOperationConfig config)
hashKey
- the hash key.rangeKey
- the range keyconfig
- the GetItemOperationConfig
.Document
.public Document deleteItem(Primitive hashKey)
hashKey
- the hash key.public Document deleteItem(Primitive hashKey, Primitive rangeKey)
hashKey
- the hash key.rangeKey
- the range key.public Document deleteItem(Primitive hashKey, DeleteItemOperationConfig config)
hashKey
- the hash key.config
- the DeleteItemOperationConfig
.public Document deleteItem(Primitive hashKey, Primitive rangeKey, DeleteItemOperationConfig config)
hashKey
- the hash key.rangeKey
- the range key.config
- the DeleteItemOperationConfig
.public Document updateItem(Document doc, UpdateItemOperationConfig config)
doc
- Document to update.config
- the UpdateItemOperationConfig
.Document
.public Document updateItem(Document doc, Primitive hashKey, UpdateItemOperationConfig config)
doc
- Document to update.hashKey
- the hash key.config
- the UpdateItemOperationConfig
.Document
.public Document updateItem(Document doc, Primitive hashKey, Primitive rangeKey, UpdateItemOperationConfig config)
doc
- Document to update.hashKey
- the hash key.rangeKey
- the range key.config
- the UpdateItemOperationConfig
.Document
.public Search query(Primitive hashKey, QueryFilter filter)
hashKey
- the hash key to query against.filter
- the QueryFilter
.Search
object.public Search query(Primitive hashKey, Expression filterExpression)
hashKey
- the hash KeyfilterExpression
- the filter Expression.public Search query(Primitive hashKey)
hashKey
- the hash key to query against.Search
object.public Search query(QueryFilter filter)
filter
- the QueryFilter
.Search
object.public Search query(QueryOperationConfig config)
config
- the QueryOperationConfig
.Search
object.public Search scan(ScanFilter filter)
filter
- Filter to apply to the scan.public Search scan(Expression filterExpression)
filterExpression
- Expression to apply to the scan.public Search scan(ScanOperationConfig config)
config
- Configuration to use.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.