Package com.amazonaws.services.dynamodb.model

Examples of com.amazonaws.services.dynamodb.model.ScanResult


        rangeKeyCondition.setAttributeValueList(attributeValueList);
        rangeKeyCondition.setComparisonOperator(ComparisonOperator.EQ);
        Map<String, Condition> conditionMap = new HashMap<String, Condition>();
        conditionMap.put("range", rangeKeyCondition);
        request.setScanFilter(conditionMap);
        ScanResult result = getClient().scan(request);
        Assert.assertNotNull(result);
        Assert.assertNotNull(result.getItems());
        for (Map<String, AttributeValue> item : result.getItems()) {
//            Assert.assertEquals(item.get("range"), rangeKey);
            Assert.assertEquals(item.get("range"), new AttributeValue().withN("55"));
        }
    }
View Full Code Here


        rangeKeyCondition.setAttributeValueList(attributeValueList);
        rangeKeyCondition.setComparisonOperator(ComparisonOperator.EQ);
        Map<String, Condition> conditionMap = new HashMap<String, Condition>();
        conditionMap.put("range", rangeKeyCondition);
        request.setScanFilter(conditionMap);
        ScanResult result = getClient().scan(request);
        Assert.assertNotNull(result);
        Assert.assertNotNull(result.getItems());
        Assert.assertEquals(result.getItems().size(),0);
    }
View Full Code Here

        rangeKeyCondition.setAttributeValueList(attributeValueList);
        rangeKeyCondition.setComparisonOperator(ComparisonOperator.GT);
        Map<String, Condition> conditionMap = new HashMap<String, Condition>();
        conditionMap.put("range", rangeKeyCondition);
        request.setScanFilter(conditionMap);
        ScanResult result = getClient().scan(request);
        Assert.assertNotNull(result);
        Assert.assertNotNull(result.getItems());
        for (Map<String, AttributeValue> item : result.getItems()) {
            Assert.assertTrue(new Integer(item.get("range").getN()) > new Integer(new AttributeValue().withN("50").getN()));
        }
    }
View Full Code Here

        rangeKeyCondition.setAttributeValueList(attributeValueList);
        rangeKeyCondition.setComparisonOperator(ComparisonOperator.GT);
        Map<String, Condition> conditionMap = new HashMap<String, Condition>();
        conditionMap.put("range", rangeKeyCondition);
        request.setScanFilter(conditionMap);
        ScanResult result = getClient().scan(request);
        Assert.assertNotNull(result);
        Assert.assertNotNull(result.getItems());
        Assert.assertEquals(result.getItems().size(),0);
    }
View Full Code Here

        rangeKeyCondition.setComparisonOperator(ComparisonOperator.GT);
        Map<String, Condition> conditionMap = new HashMap<String, Condition>();
        conditionMap.put("range", rangeKeyCondition);
        request.setScanFilter(conditionMap);
        request.setLimit(limit);
        ScanResult result = getClient().scan(request);
        Assert.assertNotNull(result);
        Assert.assertNotNull(result.getItems());
        int itemCount = result.getItems().size();
        Assert.assertTrue(itemCount <= limit);
        for (Map<String, AttributeValue> item : result.getItems()) {
            Assert.assertTrue(new Integer(item.get("range").getN()) > new Integer(new AttributeValue().withN("50").getN()));
        }
    }
View Full Code Here

        rangeKeyCondition.setComparisonOperator(ComparisonOperator.GT);
        Map<String, Condition> conditionMap = new HashMap<String, Condition>();
        conditionMap.put("range", rangeKeyCondition);
        request.setScanFilter(conditionMap);
        request.setLimit(limit);
        ScanResult result = getClient().scan(request);
        Assert.assertNotNull(result);
        Assert.assertNotNull(result.getItems());
        int itemCount = result.getItems().size();
        Assert.assertTrue(itemCount <= limit);
        for (Map<String, AttributeValue> item : result.getItems()) {
            Assert.assertTrue(new Integer(item.get("range").getN()) > new Integer(new AttributeValue().withN("50").getN()));
        }
    }
View Full Code Here

        rangeKeyCondition.setAttributeValueList(attributeValueList);
        rangeKeyCondition.setComparisonOperator(ComparisonOperator.GE);
        Map<String, Condition> conditionMap = new HashMap<String, Condition>();
        conditionMap.put("range", rangeKeyCondition);
        request.setScanFilter(conditionMap);
        ScanResult result = getClient().scan(request);
        Assert.assertNotNull(result);
        Assert.assertNotNull(result.getItems());
        Assert.assertEquals(90, result.getItems().size());
        final Integer i = new Integer(comparisonValue);
        for (Map<String, AttributeValue> item : result.getItems()) {
            String testValue = item.get("range").getN();
            Assert.assertTrue(testValue, new Integer(testValue).compareTo(i) >= 0);
        }
    }
View Full Code Here

        rangeKeyCondition.setAttributeValueList(attributeValueList);
        rangeKeyCondition.setComparisonOperator(ComparisonOperator.LE);
        Map<String, Condition> conditionMap = new HashMap<String, Condition>();
        conditionMap.put("range", rangeKeyCondition);
        request.setScanFilter(conditionMap);
        ScanResult result = getClient().scan(request);
        Assert.assertNotNull(result);
        Assert.assertNotNull(result.getItems());
        for (Map<String, AttributeValue> item : result.getItems()) {
//            Assert.assertTrue(new Integer(item.get("range").getN()) <= new Integer(rangeKey.getN()));
            Assert.assertTrue(new Integer(item.get("range").getN()) <= new Integer(new AttributeValue().withN("120").getN()));
        }
    }
View Full Code Here

        rangeKeyCondition.setAttributeValueList(attributeValueList);
        rangeKeyCondition.setComparisonOperator(ComparisonOperator.LT);
        Map<String, Condition> conditionMap = new HashMap<String, Condition>();
        conditionMap.put("range", rangeKeyCondition);
        request.setScanFilter(conditionMap);
        ScanResult result = getClient().scan(request);
        Assert.assertNotNull(result);
        Assert.assertNotNull(result.getItems());
        for (Map<String, AttributeValue> item : result.getItems()) {
            Assert.assertTrue(new Integer(item.get("range").getN()) < new Integer(new AttributeValue().withN("0").getN()));
        }
    }
View Full Code Here

        rangeKeyCondition.setAttributeValueList(attributeValueList);
        rangeKeyCondition.setComparisonOperator(ComparisonOperator.IN);
        Map<String, Condition> conditionMap = new HashMap<String, Condition>();
        conditionMap.put("range", rangeKeyCondition);
        request.setScanFilter(conditionMap);
        ScanResult result = getClient().scan(request);
        Assert.assertNotNull(result);
        Assert.assertNotNull(result.getItems());
        for (Map<String, AttributeValue> item : result.getItems()) {
            Assert.assertTrue(new Integer(item.get("range").getN()) == 102 || new Integer(item.get("range").getN()) == 101 || new Integer(item.get("range").getN()) == 100);
        }
    }
View Full Code Here

TOP

Related Classes of com.amazonaws.services.dynamodb.model.ScanResult

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.