Package com.pardot.rhombus

Examples of com.pardot.rhombus.ObjectMapper.list()


    SortedMap<String, Object> indexValues = Maps.newTreeMap();
    indexValues.put("foreignid", Long.valueOf(33339999));
    Criteria criteria = new Criteria();
    criteria.setIndexKeys(indexValues);
    Thread.sleep(4000);
    int count = om.list("testtype",criteria).size();
    logger.info("======================");
    logger.info("Retrieved count of " + count);
    logger.info("======================");
    assertEquals(numberOfObjects,count);
View Full Code Here


    indexValues.put("account_id", UUID.fromString("00000003-0000-0030-0040-000000030000"));
    indexValues.put("user_id", UUID.fromString("00000003-0000-0030-0040-000000030000"));
    Criteria criteria = new Criteria();
    criteria.setIndexKeys(indexValues);
    criteria.setLimit(50L);
    List<Map<String, Object>> results = om.list("object1", criteria);
    assertEquals(3, results.size());

    cm.teardown();
  }
View Full Code Here

    indexValues.put("user_id", userId);
    Criteria criteria = new Criteria();
    criteria.setIndexKeys(indexValues);
    criteria.setEndTimestamp(DateTime.now().getMillis());
    criteria.setLimit(50L);
    List<Map<String, Object>> results = om.list("object1", criteria);

    assertEquals(1, results.size());

    cm.teardown();
  }
View Full Code Here

    SortedMap<String, Object> indexKeys = Maps.newTreeMap();
    indexKeys.put("account_id", accountId);
    indexKeys.put("user_id", userId);
    criteria.setIndexKeys(indexKeys);
    criteria.setLimit(limit);
    List<Map<String, Object>> results = om.list(objectType, criteria);

    assertEquals(insertNum, results.size());

    cm.teardown();
  }
View Full Code Here

    SortedMap<String, Object> indexKeys = Maps.newTreeMap();
    indexKeys.put("account_id", accountId);
    indexKeys.put("user_id", userId);
    criteria.setIndexKeys(indexKeys);
    criteria.setLimit(limit);
    List<Map<String, Object>> results = om.list(objectType, criteria);

    assertEquals(0, results.size());

    cm.teardown();
  }
View Full Code Here

    SortedMap<String, Object> indexKeys = Maps.newTreeMap();
    indexKeys.put("account_id", accountId);
    indexKeys.put("user_id", userId);
    criteria.setIndexKeys(indexKeys);
    criteria.setLimit(limit);
    List<Map<String, Object>> results = om.list(objectType, criteria);

    assertEquals(insertNum, results.size());

    for(UUID id : idList) {
      assertTrue(resultsContainId(results, id));
View Full Code Here

    SortedMap<String, Object> indexKeys = Maps.newTreeMap();
    indexKeys.put("account_id", accountId);
    indexKeys.put("user_id", userId);
    criteria.setIndexKeys(indexKeys);
    criteria.setLimit(limit);
    List<Map<String, Object>> results = om.list(objectType, criteria);

    assertEquals(insertNum, results.size());

    for(UUID id : idList) {
      assertTrue(resultsContainId(results, id));
View Full Code Here

    SortedMap<String, Object> indexKeys = Maps.newTreeMap();
    indexKeys.put("account_id", accountId);
    indexKeys.put("user_id", userId);
    criteria.setIndexKeys(indexKeys);
    criteria.setLimit(limit);
    List<Map<String, Object>> results = om.list(objectType, criteria);

    assertEquals(insertNum, results.size());

    for(UUID id : idList) {
      assertTrue(resultsContainId(results, id));
View Full Code Here

    Criteria criteria = new Criteria();
    SortedMap<String, Object> indexValues = Maps.newTreeMap();
    indexValues.put("data1", "This is data one");
    indexValues.put("data2", "This is data two");
    criteria.setIndexKeys(indexValues);
    List<Map<String, Object>> results = om.list("testtype", criteria);
    assertEquals(777L,results.get(0).get("foreignid"));
    assertEquals("This is data one",results.get(0).get("data1"));

    Map<String,Object> result = om.getByKey("simple", key);
    assertEquals("one",result.get("index_1"));
View Full Code Here

    foreignIdCriteria.setLimit(50l);
    foreignIdCriteria.setAllowFiltering(true);
    SortedMap<String, Object> indexKeys = Maps.newTreeMap();
    indexKeys.put("foreignid", 123l);
    foreignIdCriteria.setIndexKeys(indexKeys);
    List<Map<String, Object>> dbObjects = om.list("testtype", foreignIdCriteria);
    assertEquals(2, dbObjects.size());

    // Make sure we only get one back when searching for not filtered
    Criteria foreignIdAndNotFilteredCriteria = new Criteria();
    foreignIdAndNotFilteredCriteria.setOrdering(CObjectOrdering.DESCENDING);
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.