Package com.pardot.rhombus

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


    //now update with a value for foreignid and make another index value (instance) be null
    testObject = Maps.newTreeMap();
    testObject.put("foreignid", 77L);
    testObject.put("instance", null);
    om.update("testtype",key,testObject);

    //now reverse it
    testObject = Maps.newTreeMap();
    testObject.put("foreignid", null);
    testObject.put("instance", 77L);
View Full Code Here


    //now reverse it
    testObject = Maps.newTreeMap();
    testObject.put("foreignid", null);
    testObject.put("instance", 77L);
    om.update("testtype",key,testObject);

    //now back again (the update processor needs to see multiple updates to hit a process case.
    testObject = Maps.newTreeMap();
    testObject.put("foreignid", 77L);
    testObject.put("instance", null);
View Full Code Here

    //now back again (the update processor needs to see multiple updates to hit a process case.
    testObject = Maps.newTreeMap();
    testObject.put("foreignid", 77L);
    testObject.put("instance", null);
    om.update("testtype",key,testObject);

    //now back again (the update processor needs to see multiple updates to hit a process case.
    testObject = Maps.newTreeMap();
    testObject.put("foreignid", 77L);
    testObject.put("instance", null);
View Full Code Here

    //now back again (the update processor needs to see multiple updates to hit a process case.
    testObject = Maps.newTreeMap();
    testObject.put("foreignid", 77L);
    testObject.put("instance", null);
    om.update("testtype",key,testObject);

    Thread.sleep(3500);

    //now run the processor
    UpdateProcessor up = new UpdateProcessor(om);
View Full Code Here

    //Update the values of one of the objects
    Map<String, Object> testObject2 = JsonUtil.rhombusMapFromJsonMap(
        TestHelpers.getTestObject(2),
        definition.getDefinitions().get("testtype"));
    UUID key3 = om.update("testtype", key2, testObject2);

    //Get the updated object back and make sure it matches
    Map<String, Object> dbObject2 = om.getByKey("testtype", key3);
    testObject2.put("id", key2);
    for (String dbKey : dbObject2.keySet()) {
View Full Code Here

    assertEquals(null, om.getNextUpdateIndexRow(null));

    //Do another update
    Map<String, Object> testObject3 = Maps.newHashMap();
    testObject3.put("type", Integer.valueOf(7));
    UUID key4 = om.update("testtype", key2, testObject3);

    //now wait for consistency
    Thread.sleep(3000);

    //Test that we can retrieve the proper update rows
View Full Code Here

    assertEquals("0", result.get("value"));

    //Update the object
    Map<String, Object> updates = Maps.newHashMap();
    updates.put("index_2", null);
    om.update(objectType, id, updates);

    //Get it back by id
    result = om.getByKey(objectType, id);
    assertEquals("0", result.get("value"));
    assertNull(result.get("index_2"));
View Full Code Here

    Map<String, Object> result = om.getByKey("object_audit", id);

    //Update the object
    Map<String, Object> updates = Maps.newHashMap();
    updates.put("object_id", UUID.fromString("00000003-0000-0030-0040-000000040000"));
    om.update("object_audit", id, updates);


    //Query back the data
    Criteria criteria = new Criteria();
    SortedMap<String, Object> indexKeys = new TreeMap<String, Object>();
View Full Code Here

    logger.debug("Inserting audit with created_at: {}", createdAt);
    UUID id = (UUID)om.insert("object_audit", JsonUtil.rhombusMapFromJsonMap(object,definition.getDefinitions().get("object_audit")), createdAt);

    //Update the object
    object.put("object_id", "00000003-0000-0030-0040-000000040000");
    om.update("object_audit", id, JsonUtil.rhombusMapFromJsonMap(object,definition.getDefinitions().get("object_audit")));

    //Get back the data and make sure things match
    Map<String, Object> result = om.getByKey("object_audit", id);
    assertNotNull(result);
    assertEquals(null, result.get("user_id"));
View Full Code Here

    logger.debug("Inserting audit with created_at: {}", createdAt);
    UUID id = (UUID)om.insert("object_audit", JsonUtil.rhombusMapFromJsonMap(object,definition.getDefinitions().get("object_audit")), createdAt);

    //Update the object
    object.put("changes", null);
    om.update("object_audit", id, JsonUtil.rhombusMapFromJsonMap(object,definition.getDefinitions().get("object_audit")));

    //Get back the data and make sure things match
    Map<String, Object> result = om.getByKey("object_audit", id);
    assertNotNull(result);
    assertEquals(null, result.get("changes"));
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.