Examples of GetItemRequest


Examples of com.amazonaws.services.dynamodbv2.model.GetItemRequest

        config = mergeConfig(config);

        String tableName = getTableName(clazz, config);

        GetItemRequest rq = new GetItemRequest();

        Map<String, AttributeValue> key = getKey(keyObject, clazz);

        rq.setKey(key);
        rq.setTableName(tableName);
        rq.setConsistentRead(config.getConsistentReads() == ConsistentReads.CONSISTENT);


        GetItemResult item = db.getItem(applyUserAgent(rq));
        Map<String, AttributeValue> itemAttributes = item.getItem();
        if ( itemAttributes == null ) {
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.GetItemRequest

        config = mergeConfig(config);

        String tableName = getTableName(clazz, config);

        GetItemRequest rq = new GetItemRequest()
            .withRequestMetricCollector(config.getRequestMetricCollector());

        Map<String, AttributeValue> key = getKey(keyObject, clazz);

        rq.setKey(key);
        rq.setTableName(tableName);
        rq.setConsistentRead(config.getConsistentReads() == ConsistentReads.CONSISTENT);


        GetItemResult item = db.getItem(applyUserAgent(rq));
        Map<String, AttributeValue> itemAttributes = item.getItem();
        if ( itemAttributes == null ) {
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.GetItemRequest

        config = mergeConfig(config);
        ItemConverter converter = getConverter(config);

        String tableName = getTableName(clazz, config);

        GetItemRequest rq = new GetItemRequest()
            .withRequestMetricCollector(config.getRequestMetricCollector());

        Map<String, AttributeValue> key = getKey(converter, keyObject, clazz);

        rq.setKey(key);
        rq.setTableName(tableName);
        rq.setConsistentRead(config.getConsistentReads() == ConsistentReads.CONSISTENT);


        GetItemResult item = db.getItem(applyUserAgent(rq));
        Map<String, AttributeValue> itemAttributes = item.getItem();
        if ( itemAttributes == null ) {
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.GetItemRequest

public class GetItemSpec extends AbstractSpecWithPrimaryKey<GetItemRequest> {
    private String projectionExpression;
    private Map<String, String> nameMap;

    public GetItemSpec() {
        super(new GetItemRequest());
    }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.GetItemRequest

        config = mergeConfig(config);

        String tableName = getTableName(clazz, config);

        GetItemRequest rq = new GetItemRequest();

        Map<String, AttributeValue> key = getKey(keyObject, clazz);

        rq.setKey(key);
        rq.setTableName(tableName);
        rq.setConsistentRead(config.getConsistentReads() == ConsistentReads.CONSISTENT);


        GetItemResult item = db.getItem(applyUserAgent(rq));
        Map<String, AttributeValue> itemAttributes = item.getItem();
        if ( itemAttributes == null ) {
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.GetItemRequest

       
        config = mergeConfig(config);

        String tableName = getTableName(clazz, config);
       
        GetItemRequest rq = new GetItemRequest();

        Map<String, AttributeValue> key = getKey(keyObject, clazz);
       
        rq.setKey(key);
        rq.setTableName(tableName);
        rq.setConsistentRead(config.getConsistentReads() == ConsistentReads.CONSISTENT);


        GetItemResult item = db.getItem(applyUserAgent(rq));
        Map<String, AttributeValue> itemAttributes = item.getItem();
        if ( itemAttributes == null ) {
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.GetItemRequest

        if (LOG.isDebugEnabled()) {
            LOG.debug("Getting lease with key " + leaseKey);
        }

        GetItemRequest request = new GetItemRequest();
        request.setTableName(table);
        request.setKey(serializer.getDynamoHashKey(leaseKey));
        request.setConsistentRead(consistentReads);

        try {
            GetItemResult result = dynamoDBClient.getItem(request);

            Map<String, AttributeValue> dynamoRecord = result.getItem();
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.GetItemRequest

    }

    private GetItemOutcome doLoadItem(GetItemSpec spec) {
        String tableName = getTable().getTableName();
        // Set up the key attributes
        GetItemRequest req = spec.getRequest()
                .withTableName(tableName)
                .withKey(InternalUtils.toAttributeValueMap(spec.getKeyComponents()))
                .withReturnConsumedCapacity(spec.getReturnConsumedCapacity())
                .withAttributesToGet(spec.getAttributesToGet())
                .withConsistentRead(spec.isConsistentRead())
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.GetItemRequest

    if (StringUtils.isBlank(key) || StringUtils.isBlank(appid)) {
      return null;
    }
    Map<String, AttributeValue> row = null;
    try {
      GetItemRequest getItemRequest = new GetItemRequest(appid,
          Collections.singletonMap(Config._KEY, new AttributeValue(key)));
      GetItemResult res = client().getItem(getItemRequest);
      if (res != null && res.getItem() != null && !res.getItem().isEmpty()) {
        row = res.getItem();
      }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.GetItemRequest

        config = mergeConfig(config);

        String tableName = getTableName(clazz, config);

        GetItemRequest rq = new GetItemRequest()
            .withRequestMetricCollector(config.getRequestMetricCollector());

        Map<String, AttributeValue> key = getKey(keyObject, clazz);

        rq.setKey(key);
        rq.setTableName(tableName);
        rq.setConsistentRead(config.getConsistentReads() == ConsistentReads.CONSISTENT);


        GetItemResult item = db.getItem(applyUserAgent(rq));
        Map<String, AttributeValue> itemAttributes = item.getItem();
        if ( itemAttributes == null ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.