Package com.amazonaws.services.dynamodbv2.model

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


            classesByTableName.put(tableName, clazz);

            if ( !requestItems.containsKey(tableName) ) {
                requestItems.put(
                        tableName,
                        new KeysAndAttributes().withConsistentRead(consistentReads).withKeys(
                                new LinkedList<Map<String, AttributeValue>>()));
            }

            requestItems.get(tableName).getKeys().add(getKey(keyObject));
View Full Code Here


            classesByTableName.put(tableName, clazz);

            if ( !requestItems.containsKey(tableName) ) {
                requestItems.put(
                        tableName,
                        new KeysAndAttributes().withConsistentRead(consistentReads).withKeys(
                                new LinkedList<Map<String, AttributeValue>>()));
            }

            requestItems.get(tableName).getKeys().add(getKey(keyObject));
View Full Code Here

            classesByTableName.put(tableName, clazz);

            if ( !requestItems.containsKey(tableName) ) {
                requestItems.put(
                        tableName,
                        new KeysAndAttributes().withConsistentRead(consistentReads).withKeys(
                                new LinkedList<Map<String, AttributeValue>>()));
            }

            requestItems.get(tableName).getKeys().add(getKey(keyObject));
View Full Code Here

  public void vanillaBatchGetItemTest() throws Exception {
        this.vanillaBatchWriteItemTest();
        BatchGetItemRequest batchGetItemRequest = new BatchGetItemRequest();
        Map<String, KeysAndAttributes> requestItems = new HashMap<String, KeysAndAttributes>();

        KeysAndAttributes keysAndAttributes1 = new KeysAndAttributes();
        List<Map<String, AttributeValue>> itemKeys1 = new ArrayList<Map<String, AttributeValue>>();
        itemKeys1.add(createItemKey(hashKeyName1, new AttributeValue().withN("6")));
        keysAndAttributes1.setKeys(itemKeys1);
        List<String> attributesToGet1 = new ArrayList<String>();
        attributesToGet1.add(hashKeyName1);
        keysAndAttributes1.setAttributesToGet(attributesToGet1);

        KeysAndAttributes keysAndAttributes2 = new KeysAndAttributes();
        List<Map<String, AttributeValue>> itemKeys2 = new ArrayList<Map<String, AttributeValue>>();
        itemKeys2.add(createItemKey(hashKeyName2, new AttributeValue().withN("1")));
        keysAndAttributes2.setKeys(itemKeys2);
        List<String> attributesToGet2 = new ArrayList<String>();
        attributesToGet2.add(hashKeyName2);
        keysAndAttributes2.setAttributesToGet(attributesToGet2);
        //Test case 1: Every request has matches.
//        keys.add(new Key(new AttributeValue("4")));
//        keys.add(new Key(new AttributeValue("5")));
//        keys.add(new Key(new AttributeValue("3")));
View Full Code Here

            classesByTableName.put(tableName, clazz);

            if ( !requestItems.containsKey(tableName) ) {
                requestItems.put(
                        tableName,
                        new KeysAndAttributes().withConsistentRead(consistentReads).withKeys(
                                new LinkedList<Map<String, AttributeValue>>()));
            }

            requestItems.get(tableName).getKeys().add(getKey(keyObject));
View Full Code Here

            classesByTableName.put(tableName, clazz);

            if ( !requestItems.containsKey(tableName) ) {
                requestItems.put(
                        tableName,
                        new KeysAndAttributes().withConsistentRead(consistentReads).withKeys(
                                new LinkedList<Map<String, AttributeValue>>()));
            }

            requestItems.get(tableName).getKeys().add(getKey(keyObject));
View Full Code Here

    for (String key : keys) {
      results.put(key, null);
      keyz.add(Collections.singletonMap(Config._KEY, new AttributeValue(key)));
    }

    KeysAndAttributes kna = new KeysAndAttributes().withKeys(keyz);
    if (!getAllColumns) {
      kna.setAttributesToGet(Arrays.asList(Config._KEY, Config._TYPE));
    }

    batchGet(Collections.singletonMap(appid, kna), results);

    logger.debug("DAO.readAll() {}", results.size());
View Full Code Here

            classesByTableName.put(tableName, clazz);

            if ( !requestItems.containsKey(tableName) ) {
                requestItems.put(
                        tableName,
                        new KeysAndAttributes().withConsistentRead(consistentReads).withKeys(
                                new LinkedList<Map<String, AttributeValue>>()));
            }
           
            requestItems.get(tableName).getKeys().add(getKey(keyObject));
View Full Code Here

            classesByTableName.put(tableName, clazz);

            if ( !requestItems.containsKey(tableName) ) {
                requestItems.put(
                        tableName,
                        new KeysAndAttributes().withConsistentRead(consistentReads).withKeys(
                                new LinkedList<Map<String, AttributeValue>>()));
            }

            requestItems.get(tableName).getKeys().add(getKey(keyObject));
View Full Code Here

            classesByTableName.put(tableName, clazz);

            if ( !requestItems.containsKey(tableName) ) {
                requestItems.put(
                        tableName,
                        new KeysAndAttributes().withConsistentRead(consistentReads).withKeys(
                                new LinkedList<Map<String, AttributeValue>>()));
            }
           
            requestItems.get(tableName).getKeys().add(getKey(keyObject));
View Full Code Here

TOP

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

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.