Package com.amazonaws.services.dynamodbv2.model

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


        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 ) {
            return null;
        }

        return marshallIntoObject(clazz, itemAttributes);
View Full Code Here


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

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

            Map<String, AttributeValue> dynamoRecord = result.getItem();
            if (dynamoRecord == null) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("No lease found with key " + leaseKey + ", returning null.");
                }
View Full Code Here

                .withAttributesToGet(spec.getAttributesToGet())
                .withConsistentRead(spec.isConsistentRead())
                .withProjectionExpression(spec.getProjectionExpression())
                .withExpressionAttributeNames(spec.getNameMap());

        GetItemResult result = getClient().getItem(req);
        return new GetItemOutcome(result);
    }
View Full Code Here

    }
    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();
      }
    } catch (Exception e) {
      logger.error(null, e);
    }
    return (row == null || row.isEmpty()) ? null : row;
View Full Code Here

        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 ) {
            return null;
        }

        T object = marshalIntoObject(toParameters(itemAttributes, clazz, config));
View Full Code Here

    AttributeValue hashKeyValue = new AttributeValue().withN(String.valueOf(hashKey));
    getItemRequest.getKey().put(config.getHashKeyAttributeName(), hashKeyValue);
    getItemRequest.getKey().put(config.getRangeKeyAttributeName(), getPointRequest.getRangeKeyValue());

    GetItemResult getItemResult = config.getDynamoDBClient().getItem(getItemRequest);
    GetPointResult getPointResult = new GetPointResult(getItemResult);

    return getPointResult;
  }
View Full Code Here

    }
    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();
      }
    } catch (Exception e) {
      logger.error(null, e);
    }
    return (row == null || row.isEmpty()) ? null : row;
View Full Code Here

        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 ) {
            return null;
        }

        T object = marshalIntoObject(toParameters(itemAttributes, clazz, tableName, config));
View Full Code Here

        map.put(SessionTableAttributes.SESSION_ID_KEY, new AttributeValue(sessionId));
        GetItemRequest request = new GetItemRequest(tableName, map);
        addClientMarker(request);

        try {
            GetItemResult result = dynamo.getItem(request);
            return result.getItem();
        } catch (Exception e) {
            DynamoDBSessionManager.warn("Unable to load session " + sessionId, e);
        }

        return null;
View Full Code Here

        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 ) {
            return null;
        }

        T object = marshallIntoObject(clazz, itemAttributes);
View Full Code Here

TOP

Related Classes of com.amazonaws.services.dynamodbv2.model.GetItemResult

Copyright © 2018 www.massapicom. 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.