public class AbstractDynamoDBMapper extends Object implements IDynamoDBMapper
IDynamoDBMapper
. Convenient method forms pass through to the
corresponding overload that takes a request object, which throws an
UnsupportedOperationException
.Modifier and Type | Method and Description |
---|---|
List<DynamoDBMapper.FailedBatch> |
batchDelete(Iterable extends Object> objectsToDelete)
Deletes the objects given using one or more calls to the
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest) API. |
List<DynamoDBMapper.FailedBatch> |
batchDelete(Object... objectsToDelete)
Deletes the objects given using one or more calls to the
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest) API. |
Map<String,List<Object>> |
batchLoad(Iterable extends Object> itemsToGet)
Retrieves multiple items from multiple tables using their primary keys.
|
Map<String,List<Object>> |
batchLoad(Iterable extends Object> itemsToGet,
DynamoDBMapperConfig config)
Retrieves multiple items from multiple tables using their primary keys.
|
Map<String,List<Object>> |
batchLoad(Map<Class>,List<KeyPair>> itemsToGet)
Retrieves the attributes for multiple items from multiple tables using their primary keys.
|
Map<String,List<Object>> |
batchLoad(Map<Class>,List<KeyPair>> itemsToGet,
DynamoDBMapperConfig config)
Retrieves multiple items from multiple tables using their primary keys.
|
List<DynamoDBMapper.FailedBatch> |
batchSave(Iterable extends Object> objectsToSave)
Saves the objects given using one or more calls to the
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest) API. |
List<DynamoDBMapper.FailedBatch> |
batchSave(Object... objectsToSave)
Saves the objects given using one or more calls to the
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest) API. |
List<DynamoDBMapper.FailedBatch> |
batchWrite(Iterable extends Object> objectsToWrite,
Iterable extends Object> objectsToDelete)
Saves and deletes the objects given using one or more calls to the
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest) API. |
List<DynamoDBMapper.FailedBatch> |
batchWrite(Iterable extends Object> objectsToWrite,
Iterable extends Object> objectsToDelete,
DynamoDBMapperConfig config)
Saves and deletes the objects given using one or more calls to the
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest) API. |
int |
count(Class> clazz,
DynamoDBScanExpression scanExpression)
Evaluates the specified scan expression and returns the count of matching items, without
returning any of the actual item data, using the default configuration.
|
int |
count(Class> clazz,
DynamoDBScanExpression scanExpression,
DynamoDBMapperConfig config)
Evaluates the specified scan expression and returns the count of matching items, without
returning any of the actual item data.
|
|
count(Class
Evaluates the specified query expression and returns the count of matching items, without
returning any of the actual item data, using the default configuration.
|
|
count(Class
Evaluates the specified query expression and returns the count of matching items, without
returning any of the actual item data.
|
S3Link |
createS3Link(Region s3region,
String bucketName,
String key)
Creates an S3Link with the specified region, bucket name and key.
|
S3Link |
createS3Link(String bucketName,
String key)
Creates an S3Link with the specified bucket name and key using the default S3 region.
|
S3Link |
createS3Link(String s3region,
String bucketName,
String key)
Creates an S3Link with the specified region, bucket name and key.
|
void |
delete(Object object)
Deletes the given object from its DynamoDB table using the default configuration.
|
void |
delete(Object object,
DynamoDBDeleteExpression deleteExpression)
Deletes the given object from its DynamoDB table using the specified deleteExpression and
default configuration.
|
void |
delete(Object object,
DynamoDBMapperConfig config)
Deletes the given object from its DynamoDB table using the specified configuration.
|
|
delete(T object,
DynamoDBDeleteExpression deleteExpression,
DynamoDBMapperConfig config)
Deletes the given object from its DynamoDB table using the provided deleteExpression and
provided configuration.
|
CreateTableRequest |
generateCreateTableRequest(Class> clazz)
Parse the given POJO class and return the CreateTableRequest for the DynamoDB table it
represents.
|
|
generateCreateTableRequest(Class |
DeleteTableRequest |
generateDeleteTableRequest(Class> clazz)
Parse the given POJO class and return the DeleteTableRequest for the DynamoDB table it
represents.
|
|
generateDeleteTableRequest(Class |
S3ClientCache |
getS3ClientCache()
Returns the underlying
S3ClientCache for accessing S3. |
|
getTableModel(Class
Get the table model for the class, using the default configuration.
|
|
getTableModel(Class
Get the table model for the class using the provided configuration override.
|
|
load(Class
Returns an object with the given hash key, or null if no such item exists.
|
|
load(Class
Returns an object with the given hash key, or null if no such item exists.
|
|
load(Class
Returns an object with the given hash and range key, or null if no such item exists.
|
|
load(Class
Returns an object with the given hash key and range key, or null if no such object exists.
|
|
load(T keyObject)
Returns an object whose keys match those of the prototype key object given, or null if no
such item exists.
|
|
load(T keyObject,
DynamoDBMapperConfig config)
Returns an object whose keys match those of the given prototype key object, or null if no
such item exists.
|
|
marshallIntoObject(Class
Creates and fills in the attributes on an instance of the class given with the attributes
given.
|
|
marshallIntoObject(Class |
|
marshallIntoObjects(Class
Unmarshalls the list of item attributes into objects of type clazz.
|
|
marshallIntoObjects(Class |
|
parallelScan(Class
Scans through an Amazon DynamoDB table on logically partitioned segments in parallel and
returns the matching results in one unmodifiable list of instantiated objects, using the
default configuration.
|
|
parallelScan(Class
Scans through an Amazon DynamoDB table on logically partitioned segments in parallel.
|
|
query(Class
Queries an Amazon DynamoDB table and returns the matching results as an unmodifiable list of
instantiated objects, using the default configuration.
|
|
query(Class
Queries an Amazon DynamoDB table and returns the matching results as an unmodifiable list of
instantiated objects.
|
|
queryPage(Class
Queries an Amazon DynamoDB table and returns a single page of matching results.
|
|
queryPage(Class
Queries an Amazon DynamoDB table and returns a single page of matching results.
|
|
save(T object)
Saves the object given into DynamoDB, using the default configuration.
|
|
save(T object,
DynamoDBMapperConfig config)
Saves the object given into DynamoDB, using the specified configuration.
|
|
save(T object,
DynamoDBSaveExpression saveExpression)
Saves the object given into DynamoDB, using the default configuration and the specified
saveExpression.
|
|
save(T object,
DynamoDBSaveExpression saveExpression,
DynamoDBMapperConfig config)
Saves an item in DynamoDB.
|
|
scan(Class
Scans through an Amazon DynamoDB table and returns the matching results as an unmodifiable
list of instantiated objects, using the default configuration.
|
|
scan(Class
Scans through an Amazon DynamoDB table and returns the matching results as an unmodifiable
list of instantiated objects.
|
|
scanPage(Class
Scans through an Amazon DynamoDB table and returns a single page of matching results.
|
|
scanPage(Class
Scans through an Amazon DynamoDB table and returns a single page of matching results.
|
List<Object> |
transactionLoad(TransactionLoadRequest transactionLoadRequest)
Transactionally loads objects specified by transactionLoadRequest by calling
AmazonDynamoDB.transactGetItems(TransactGetItemsRequest) API. |
List<Object> |
transactionLoad(TransactionLoadRequest transactionLoadRequest,
DynamoDBMapperConfig config)
Transactionally loads objects specified by transactionLoadRequest by calling
AmazonDynamoDB.transactGetItems(TransactGetItemsRequest) API. |
void |
transactionWrite(TransactionWriteRequest transactionWriteRequest)
Transactionally writes objects specified by transactionWriteRequest by calling
AmazonDynamoDB.transactWriteItems(TransactWriteItemsRequest) API. |
void |
transactionWrite(TransactionWriteRequest transactionWriteRequest,
DynamoDBMapperConfig config)
Transactionally writes objects specified by transactionWriteRequest by calling
AmazonDynamoDB.transactWriteItems(TransactWriteItemsRequest) API. |
publicDynamoDBMapperTableModel getTableModel(Class clazz)
IDynamoDBMapper
getTableModel
in interface IDynamoDBMapper
DynamoDBMapper.getTableModel(Class, DynamoDBMapperConfig)
publicDynamoDBMapperTableModel getTableModel(Class clazz, DynamoDBMapperConfig config)
IDynamoDBMapper
getTableModel
in interface IDynamoDBMapper
publicT load(Class clazz, Object hashKey, DynamoDBMapperConfig config)
IDynamoDBMapper
load
in interface IDynamoDBMapper
DynamoDBMapper.load(Class, Object, Object, DynamoDBMapperConfig)
publicT load(Class clazz, Object hashKey)
IDynamoDBMapper
load
in interface IDynamoDBMapper
DynamoDBMapper.load(Class, Object, Object, DynamoDBMapperConfig)
publicT load(Class clazz, Object hashKey, Object rangeKey)
IDynamoDBMapper
load
in interface IDynamoDBMapper
DynamoDBMapper.load(Class, Object, Object, DynamoDBMapperConfig)
publicT load(Class clazz, Object hashKey, Object rangeKey, DynamoDBMapperConfig config)
IDynamoDBMapper
load
in interface IDynamoDBMapper
clazz
- The class to load, corresponding to a DynamoDB table.hashKey
- The key of the object.rangeKey
- The range key of the object, or null for tables without a range key.config
- Configuration for the service call to retrieve the object from DynamoDB. This
configuration overrides the default given at construction.publicT load(T keyObject)
IDynamoDBMapper
load
in interface IDynamoDBMapper
keyObject
- An object of the class to load with the keys values to match.DynamoDBMapper.load(Object, DynamoDBMapperConfig)
publicT load(T keyObject, DynamoDBMapperConfig config)
IDynamoDBMapper
load
in interface IDynamoDBMapper
keyObject
- An object of the class to load with the keys values to match.config
- Configuration for the service call to retrieve the object from DynamoDB. This
configuration overrides the default given at construction.publicT marshallIntoObject(Class clazz, Map<String,AttributeValue> itemAttributes)
IDynamoDBMapper
This is accomplished by looking for getter methods annotated with an appropriate annotation, then looking for matching attribute names in the item attribute map.
This method is no longer called by load/scan/query methods. If you are overriding this method, please switch to using an AttributeTransformer
marshallIntoObject
in interface IDynamoDBMapper
clazz
- The class to instantiate and hydrateitemAttributes
- The set of item attributes, keyed by attribute name.publicT marshallIntoObject(Class clazz, Map<String,AttributeValue> itemAttributes, DynamoDBMapperConfig config)
publicList marshallIntoObjects(Class clazz, List<Map<String,AttributeValue>> itemAttributes)
IDynamoDBMapper
This method is no longer called by load/scan/query methods. If you are overriding this method, please switch to using an AttributeTransformer
marshallIntoObjects
in interface IDynamoDBMapper
marshallIntoObject(Class, Map)
publicList marshallIntoObjects(Class clazz, List<Map<String,AttributeValue>> itemAttributes, DynamoDBMapperConfig config)
publicvoid save(T object)
IDynamoDBMapper
save
in interface IDynamoDBMapper
DynamoDBMapper.save(Object, DynamoDBSaveExpression, DynamoDBMapperConfig)
publicvoid save(T object, DynamoDBSaveExpression saveExpression)
IDynamoDBMapper
save
in interface IDynamoDBMapper
DynamoDBMapper.save(Object, DynamoDBSaveExpression, DynamoDBMapperConfig)
publicvoid save(T object, DynamoDBMapperConfig config)
IDynamoDBMapper
save
in interface IDynamoDBMapper
DynamoDBMapper.save(Object, DynamoDBSaveExpression, DynamoDBMapperConfig)
publicvoid save(T object, DynamoDBSaveExpression saveExpression, DynamoDBMapperConfig config)
IDynamoDBMapper
DynamoDBMapperConfig.getSaveBehavior()
value, to use either
AmazonDynamoDB.putItem(PutItemRequest)
or
AmazonDynamoDB.updateItem(UpdateItemRequest)
:
save
in interface IDynamoDBMapper
object
- The object to save into DynamoDBsaveExpression
- The options to apply to this save requestconfig
- The configuration to use, which overrides the default provided at object
construction.DynamoDBMapperConfig.SaveBehavior
public void delete(Object object)
IDynamoDBMapper
delete
in interface IDynamoDBMapper
public void delete(Object object, DynamoDBDeleteExpression deleteExpression)
IDynamoDBMapper
delete
in interface IDynamoDBMapper
public void delete(Object object, DynamoDBMapperConfig config)
IDynamoDBMapper
delete
in interface IDynamoDBMapper
publicvoid delete(T object, DynamoDBDeleteExpression deleteExpression, DynamoDBMapperConfig config)
IDynamoDBMapper
delete
in interface IDynamoDBMapper
deleteExpression
- The options to apply to this delete requestconfig
- Config override object. If DynamoDBMapperConfig.SaveBehavior.CLOBBER
is supplied, version
fields will not be considered when deleting the object.public void transactionWrite(TransactionWriteRequest transactionWriteRequest)
IDynamoDBMapper
AmazonDynamoDB.transactWriteItems(TransactWriteItemsRequest)
API.
Changes to objects which are put or updated are applied in-memory. Such in-memory updates are NOT thread safe.
This method ignores any SaveBehavior set on the mapper. Whether an object is put or updated is solely determined by the
TransactionWriteRequest
method called by user while constructing request object. Furthermore, put and update work
as if SaveBehavior is set as CLOBBER.
This method supports versioning annotations, but not in conjunction with condition expressions. It throws
SdkClientException
exception if class of any input object is annotated with
DynamoDBVersionAttribute
or DynamoDBVersioned
and a condition expression is also present
Any exceptions from underlying API are thrown as is. For more information, please refer https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html
transactionWrite
in interface IDynamoDBMapper
transactionWriteRequest
- Specifies objects to write along with appropriate condition expressions.DynamoDBMapper.transactionWrite(TransactionWriteRequest, DynamoDBMapperConfig)
public void transactionWrite(TransactionWriteRequest transactionWriteRequest, DynamoDBMapperConfig config)
IDynamoDBMapper
AmazonDynamoDB.transactWriteItems(TransactWriteItemsRequest)
API.
Changes to objects which are put or updated are applied in-memory. Such in-memory updates are NOT thread safe.
This method ignores any SaveBehavior set on the mapper. Whether an object is put or updated is solely determined by the
TransactionWriteRequest
method called by user while constructing request object. Furthermore, put and update work
as if SaveBehavior is set as CLOBBER.
This method supports versioning annotations, but not in conjunction with condition expressions. It throws
SdkClientException
exception if class of any input object is annotated with
DynamoDBVersionAttribute
or DynamoDBVersioned
and a condition expression is also present
Any exceptions from underlying API are thrown as is. For more information, please refer https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html
transactionWrite
in interface IDynamoDBMapper
transactionWriteRequest
- Specifies objects to write along with appropriate condition expressions.config
- Only DynamoDBMapperConfig.getTableNameOverride()
, DynamoDBMapperConfig.getTableNameResolver()
,
DynamoDBMapperConfig.getObjectTableNameResolver()
and DynamoDBMapperConfig.getTypeConverterFactory()
are considered.
If DynamoDBMapperConfig.TableNameOverride
is specified then, given table override will be used as table name for all input objects.DynamoDBMapper.transactionWrite(TransactionWriteRequest, DynamoDBMapperConfig)
public List<Object> transactionLoad(TransactionLoadRequest transactionLoadRequest)
IDynamoDBMapper
AmazonDynamoDB.transactGetItems(TransactGetItemsRequest)
API.
Any exceptions from underlying API are thrown as is. For more information, please refer https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactGetItems.html
transactionLoad
in interface IDynamoDBMapper
transactionLoadRequest
- Specifies objects to load along with appropriate projection expressions.DynamoDBMapper.transactionLoad(TransactionLoadRequest, DynamoDBMapperConfig)
public List<Object> transactionLoad(TransactionLoadRequest transactionLoadRequest, DynamoDBMapperConfig config)
IDynamoDBMapper
AmazonDynamoDB.transactGetItems(TransactGetItemsRequest)
API.
Any exceptions from underlying API are thrown as is. For more information, please refer https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactGetItems.html
transactionLoad
in interface IDynamoDBMapper
transactionLoadRequest
- Specifies objects to load along with appropriate projection expressions.config
- Only DynamoDBMapperConfig.getTableNameOverride()
, DynamoDBMapperConfig.getTableNameResolver()
,
DynamoDBMapperConfig.getObjectTableNameResolver()
and DynamoDBMapperConfig.getTypeConverterFactory()
are supported.
If DynamoDBMapperConfig.TableNameOverride
is specified then, given table override will be used as table name for all input objects.DynamoDBMapper.transactionLoad(TransactionLoadRequest, DynamoDBMapperConfig)
public List<DynamoDBMapper.FailedBatch> batchDelete(Iterable extends Object> objectsToDelete)
IDynamoDBMapper
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest)
API. No version checks are
performed, as required by the API.batchDelete
in interface IDynamoDBMapper
batchWrite(Iterable, Iterable)
public List<DynamoDBMapper.FailedBatch> batchDelete(Object... objectsToDelete)
IDynamoDBMapper
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest)
API. No version checks are
performed, as required by the API.batchDelete
in interface IDynamoDBMapper
batchWrite(Iterable, Iterable)
public List<DynamoDBMapper.FailedBatch> batchSave(Iterable extends Object> objectsToSave)
IDynamoDBMapper
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest)
API. No version checks are
performed, as required by the API.
This method ignores any SaveBehavior set on the mapper, and always behaves as if
SaveBehavior.CLOBBER was specified, as the AmazonDynamoDB.batchWriteItem() request does not
support updating existing items.
This method fails to save the batch if the size of an individual object in the batch exceeds 400 KB. For more information on batch restrictions see, http://docs.aws.amazon .com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html
batchSave
in interface IDynamoDBMapper
batchWrite(Iterable, Iterable)
public List<DynamoDBMapper.FailedBatch> batchSave(Object... objectsToSave)
IDynamoDBMapper
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest)
API. No version checks are
performed, as required by the API.
This method ignores any SaveBehavior set on the mapper, and always behaves as if
SaveBehavior.CLOBBER was specified, as the AmazonDynamoDB.batchWriteItem() request does not
support updating existing items. *
This method fails to save the batch if the size of an individual object in the batch exceeds 400 KB. For more information on batch restrictions see, http://docs.aws.amazon .com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html
batchSave
in interface IDynamoDBMapper
batchWrite(Iterable, Iterable)
public List<DynamoDBMapper.FailedBatch> batchWrite(Iterable extends Object> objectsToWrite, Iterable extends Object> objectsToDelete)
IDynamoDBMapper
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest)
API. No version checks are
performed, as required by the API.
This method ignores any SaveBehavior set on the mapper, and always behaves as if
SaveBehavior.CLOBBER was specified, as the AmazonDynamoDB.batchWriteItem() request does not
support updating existing items.
This method fails to save the batch if the size of an individual object in the batch exceeds 400 KB. For more information on batch restrictions see, http://docs.aws.amazon .com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html
If one of the write requests is for a table that is not present, this method does not throw a ResourceNotFoundException but returns a FailedBatch which includes this exception and the unprocessed items.
batchWrite
in interface IDynamoDBMapper
batchWrite(Iterable, Iterable)
public List<DynamoDBMapper.FailedBatch> batchWrite(Iterable extends Object> objectsToWrite, Iterable extends Object> objectsToDelete, DynamoDBMapperConfig config)
IDynamoDBMapper
AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest)
API. Use mapper config to
control the retry strategy when UnprocessedItems are returned by the BatchWriteItem API
This method fails to save the batch if the size of an individual object in the batch exceeds 400 KB. For more information on batch restrictions see, http://docs.aws.amazon .com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html
If one of the write requests is for a table that is not present, this method does not throw a ResourceNotFoundException but returns a FailedBatch which includes this exception and the unprocessed items.
batchWrite
in interface IDynamoDBMapper
objectsToWrite
- A list of objects to save to DynamoDB. No version checks are performed, as
required by the AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest)
API.objectsToDelete
- A list of objects to delete from DynamoDB. No version checks are performed,
as required by the AmazonDynamoDB.batchWriteItem(BatchWriteItemRequest)
API.config
- Only DynamoDBMapperConfig.getTableNameOverride()
and
DynamoDBMapperConfig.getBatchWriteRetryStrategy()
are considered. If
TableNameOverride is specified, all objects in the two parameter lists will be
considered to belong to the given table override. In particular, this method
always acts as if SaveBehavior.CLOBBER was specified regardless of the
value of the config parameter.DynamoDBMapperConfig.getTableNameOverride()
,
DynamoDBMapperConfig.getBatchWriteRetryStrategy()
public Map<String,List<Object>> batchLoad(Iterable extends Object> itemsToGet)
IDynamoDBMapper
batchLoad
in interface IDynamoDBMapper
DynamoDBMapper#batchLoad(List, DynamoDBMapperConfig)
public Map<String,List<Object>> batchLoad(Iterable extends Object> itemsToGet, DynamoDBMapperConfig config)
IDynamoDBMapper
batchLoad
in interface IDynamoDBMapper
itemsToGet
- Key objects, corresponding to the class to fetch, with their primary key values
set.config
- Only DynamoDBMapperConfig.getTableNameOverride()
and
DynamoDBMapperConfig.getConsistentReads()
are considered.public Map<String,List<Object>> batchLoad(Map<Class>,List<KeyPair>> itemsToGet)
IDynamoDBMapper
AmazonDynamoDB.batchGetItem(BatchGetItemRequest)
API.batchLoad
in interface IDynamoDBMapper
#batchLoad(List, DynamoDBMapperConfig)
,
IDynamoDBMapper.batchLoad(Map, DynamoDBMapperConfig)
public Map<String,List<Object>> batchLoad(Map<Class>,List<KeyPair>> itemsToGet, DynamoDBMapperConfig config)
IDynamoDBMapper
DynamoDBMapper#batchLoad(List, DynamoDBMapperConfig)
batchLoad
in interface IDynamoDBMapper
itemsToGet
- Map from class to load to list of primary key attributes.config
- Only DynamoDBMapperConfig.getTableNameOverride()
and
DynamoDBMapperConfig.getConsistentReads()
are considered.publicPaginatedScanList scan(Class clazz, DynamoDBScanExpression scanExpression)
IDynamoDBMapper
scan
in interface IDynamoDBMapper
DynamoDBMapper.scan(Class, DynamoDBScanExpression, DynamoDBMapperConfig)
publicPaginatedScanList scan(Class clazz, DynamoDBScanExpression scanExpression, DynamoDBMapperConfig config)
IDynamoDBMapper
Callers should be aware that the returned list is unmodifiable, and any attempts to modify the list will result in an UnsupportedOperationException.
You can specify the pagination loading strategy for this scan operation. By default, the list returned is lazily loaded when possible.
scan
in interface IDynamoDBMapper
T
- The type of the objects being returned.clazz
- The class annotated with DynamoDB annotations describing how to store the object
data in Amazon DynamoDB.scanExpression
- Details on how to run the scan, including any filters to apply to limit results.config
- The configuration to use for this scan, which overrides the default provided at
object construction.PaginatedScanList
,
DynamoDBMapperConfig.PaginationLoadingStrategy
publicPaginatedParallelScanList parallelScan(Class clazz, DynamoDBScanExpression scanExpression, int totalSegments)
IDynamoDBMapper
parallelScan
in interface IDynamoDBMapper
DynamoDBMapper.parallelScan(Class, DynamoDBScanExpression,int, DynamoDBMapperConfig)
publicPaginatedParallelScanList parallelScan(Class clazz, DynamoDBScanExpression scanExpression, int totalSegments, DynamoDBMapperConfig config)
IDynamoDBMapper
Callers should be aware that the returned list is unmodifiable, and any attempts to modify the list will result in an UnsupportedOperationException.
You can specify the pagination loading strategy for this parallel scan operation. By default, the list returned is lazily loaded when possible.
parallelScan
in interface IDynamoDBMapper
T
- The type of the objects being returned.clazz
- The class annotated with DynamoDB annotations describing how to store the object
data in Amazon DynamoDB.scanExpression
- Details on how to run the scan, including any filters to apply to limit results.totalSegments
- Number of total parallel scan segments. Range: 1 - 4096config
- The configuration to use for this scan, which overrides the default provided at
object construction.PaginatedParallelScanList
,
DynamoDBMapperConfig.PaginationLoadingStrategy
publicScanResultPage scanPage(Class clazz, DynamoDBScanExpression scanExpression)
IDynamoDBMapper
scanPage
in interface IDynamoDBMapper
DynamoDBMapper.scanPage(Class, DynamoDBScanExpression, DynamoDBMapperConfig)
publicScanResultPage scanPage(Class clazz, DynamoDBScanExpression scanExpression, DynamoDBMapperConfig config)
IDynamoDBMapper
scanPage
in interface IDynamoDBMapper
T
- The type of the objects being returned.clazz
- The class annotated with DynamoDB annotations describing how to store the object
data in Amazon DynamoDB.scanExpression
- Details on how to run the scan, including any filters to apply to limit results.config
- The configuration to use for this scan, which overrides the default provided at
object construction.public int count(Class> clazz, DynamoDBScanExpression scanExpression)
IDynamoDBMapper
count
in interface IDynamoDBMapper
DynamoDBMapper.count(Class, DynamoDBScanExpression, DynamoDBMapperConfig)
public int count(Class> clazz, DynamoDBScanExpression scanExpression, DynamoDBMapperConfig config)
IDynamoDBMapper
This operation will scan your entire table, and can therefore be very expensive. Use with caution.
count
in interface IDynamoDBMapper
clazz
- The class mapped to a DynamoDB table.scanExpression
- The parameters for running the scan.config
- The configuration to use for this scan, which overrides the default provided at
object construction.publicPaginatedQueryList query(Class clazz, DynamoDBQueryExpression queryExpression)
IDynamoDBMapper
query
in interface IDynamoDBMapper
DynamoDBMapper.query(Class, DynamoDBQueryExpression, DynamoDBMapperConfig)
publicPaginatedQueryList query(Class clazz, DynamoDBQueryExpression queryExpression, DynamoDBMapperConfig config)
IDynamoDBMapper
When the query is on any local/global secondary index, callers should be aware that the returned object(s) will only contain item attributes that are projected into the index. All the other unprojected attributes will be saved as type default values.
Callers should also be aware that the returned list is unmodifiable, and any attempts to modify the list will result in an UnsupportedOperationException.
You can specify the pagination loading strategy for this query operation. By default, the list returned is lazily loaded when possible.
query
in interface IDynamoDBMapper
T
- The type of the objects being returned.clazz
- The class annotated with DynamoDB annotations describing how to store the object
data in Amazon DynamoDB.queryExpression
- Details on how to run the query, including any conditions on the key valuesconfig
- The configuration to use for this query, which overrides the default provided at
object construction.PaginatedQueryList
,
DynamoDBMapperConfig.PaginationLoadingStrategy
publicQueryResultPage queryPage(Class clazz, DynamoDBQueryExpression queryExpression)
IDynamoDBMapper
queryPage
in interface IDynamoDBMapper
DynamoDBMapper.queryPage(Class, DynamoDBQueryExpression, DynamoDBMapperConfig)
publicQueryResultPage queryPage(Class clazz, DynamoDBQueryExpression queryExpression, DynamoDBMapperConfig config)
IDynamoDBMapper
queryPage
in interface IDynamoDBMapper
T
- The type of the objects being returned.clazz
- The class annotated with DynamoDB annotations describing how to store the object
data in AWS DynamoDB.queryExpression
- Details on how to run the query, including any conditions on the key valuesconfig
- The configuration to use for this query, which overrides the default provided at
object construction.publicint count(Class clazz, DynamoDBQueryExpression queryExpression)
IDynamoDBMapper
count
in interface IDynamoDBMapper
DynamoDBMapper.count(Class, DynamoDBQueryExpression, DynamoDBMapperConfig)
publicint count(Class clazz, DynamoDBQueryExpression queryExpression, DynamoDBMapperConfig config)
IDynamoDBMapper
count
in interface IDynamoDBMapper
clazz
- The class mapped to a DynamoDB table.queryExpression
- The parameters for running the query.config
- The mapper configuration to use for the query, which overrides the default
provided at object construction.public S3ClientCache getS3ClientCache()
IDynamoDBMapper
S3ClientCache
for accessing S3.getS3ClientCache
in interface IDynamoDBMapper
public S3Link createS3Link(String bucketName, String key)
IDynamoDBMapper
createS3Link
in interface IDynamoDBMapper
public S3Link createS3Link(Region s3region, String bucketName, String key)
IDynamoDBMapper
createS3Link
in interface IDynamoDBMapper
public S3Link createS3Link(String s3region, String bucketName, String key)
IDynamoDBMapper
createS3Link
in interface IDynamoDBMapper
public CreateTableRequest generateCreateTableRequest(Class> clazz)
IDynamoDBMapper
generateCreateTableRequest
in interface IDynamoDBMapper
publicCreateTableRequest generateCreateTableRequest(Class clazz, DynamoDBMapperConfig config)
public DeleteTableRequest generateDeleteTableRequest(Class> clazz)
IDynamoDBMapper
generateDeleteTableRequest
in interface IDynamoDBMapper
publicDeleteTableRequest generateDeleteTableRequest(Class clazz, DynamoDBMapperConfig config)