List of usage examples for com.amazonaws.services.dynamodbv2.datamodeling DynamoDBMapper load
@Override
public <T> T load(T keyObject)
From source file:com.github.sporcina.mule.modules.DynamoDBConnector.java
License:Open Source License
/** * Acquire a document processor/*from w w w .j a va 2 s. c o m*/ * <p/> * {@sample.xml ../../../doc/DynamoDB-connector.xml.sample dynamodb:get-document} * * @param tableName * the name of the table to get the document from * @param template * an object with the document data that DynamoDB will match against * * @return Object the document from the table */ @Processor public Object getDocument(final String tableName, @Optional @Default(PAYLOAD) final Object template) { DynamoDBMapper mapper = getDbObjectMapper(tableName); return mapper.load(template); }
From source file:lifecounter.database.LifeCounterDynamoDbClient.java
License:Open Source License
/** * Loads an item from DynamoDB by primary Hash Key. Callers of this method should pass in an * object which represents an item in the DynamoDB table item with the primary key populated. * /*from ww w .ja v a 2 s . com*/ * @param tableItem * @return */ public LifeCounterUserDataItem loadItem(final LifeCounterUserDataItem tableItem) { DynamoDBMapper mapper = createDynamoDBMapper(); LifeCounterUserDataItem item = mapper.load(tableItem); return item; }
From source file:org.onebusaway.alexa.storage.ObaDynamoDbClient.java
License:Apache License
/** * Loads an item from DynamoDB by primary Hash Key. Callers of this method * should pass in an object which represents an item in the DynamoDB table * item with the primary key populated./* ww w .j a va 2 s .c o m*/ * * @param tableItem * @return */ public Optional<ObaUserDataItem> loadItem(final ObaUserDataItem tableItem) { DynamoDBMapper mapper = createDynamoDBMapper(); ObaUserDataItem item = mapper.load(tableItem); return Optional.ofNullable(item); }