Package com.pardot.rhombus

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


    criteria.setAllowFiltering(false);
    criteria.setOrdering("ASC");
    criteria.setStartUuid(UUID.fromString(startUuid));
    criteria.setLimit(pageSize + 1);

    dbObjects = om.list("object2", criteria);
    assertEquals(pageSize, dbObjects.size());

    cm.teardown();
  }
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);
    // Index by field1 so we can compare
    Map<String, Map<String, Object>> indexedResults = Maps.uniqueIndex(results, new Function<Map<String, Object>, String>() {
      public String apply(Map<String, Object> object) {
        return object.get("id").toString();
      }
View Full Code Here

      assertTrue(indexedResults.containsKey(id.toString()));
      Map<String, Object> result = indexedResults.get(id.toString());
      assertEquals(key, result.get("field1"));
    }

    results = om.list("object2", criteria);
    assertEquals(4, results.size());
    // Index by field1 so we can compare
    indexedResults = Maps.uniqueIndex(results, new Function<Map<String, Object>, String>() {
      public String apply(Map<String, Object> object) {
        return object.get("id").toString();
View Full Code Here

    SortedMap<String, Object> indexKeys = new TreeMap<String, Object>();
    indexKeys.put("index_1", "value1");
    criteria.setIndexKeys(indexKeys);
    criteria.setOrdering("DESC");
    criteria.setLimit(50l);
    List<Map<String, Object>> dbObjects = om.list(objectType, criteria);
    assertEquals(1, dbObjects.size());
    assertEquals(null, dbObjects.get(0).get("index_2"));

    //Query back the data by second index
    criteria = new Criteria();
View Full Code Here

    indexKeys = new TreeMap<String, Object>();
    indexKeys.put("index_2", "value2");
    criteria.setIndexKeys(indexKeys);
    criteria.setOrdering("DESC");
    criteria.setLimit(50l);
    dbObjects = om.list(objectType, criteria);
    assertEquals(0, dbObjects.size());

    cm.teardown();
  }
View Full Code Here

    indexKeys.put("object_type", "Account");
    criteria.setIndexKeys(indexKeys);
    criteria.setOrdering("DESC");
    criteria.setLimit(50l);

    List<Map<String, Object>> dbObjects = om.list("object_audit", criteria);
    assertEquals(1, dbObjects.size());

    cm.teardown();
  }
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.