Package ch.agent.crnickl.api

Examples of ch.agent.crnickl.api.UpdatableChronicle.applyUpdates()


      Chronicle testData = db.getChronicle(SIMPLENAME, false);
      if (testData != null) {
        Util.deleteChronicleCollection(testData);
        UpdatableChronicle upd = testData.edit();
        upd.destroy();
        upd.applyUpdates();
      }
      UpdatableChronicle ex = db.getTopChronicle().edit().createChronicle(SIMPLENAME, false, "standalone test", null, null);
      ex.applyUpdates();
      clean = true;
    }
View Full Code Here


        UpdatableChronicle upd = testData.edit();
        upd.destroy();
        upd.applyUpdates();
      }
      UpdatableChronicle ex = db.getTopChronicle().edit().createChronicle(SIMPLENAME, false, "standalone test", null, null);
      ex.applyUpdates();
      clean = true;
    }
  }
 
  public void test1() {
View Full Code Here

  public void test1() {
    assertFalse(((DatabaseBackend) db).isStrictNameSpaceMode());
    try {
      UpdatableChronicle e = db.getChronicle(SIMPLENAME, true).edit();
      UpdatableChronicle ex = e.createChronicle("x", false, "it's x", null, null);
      ex.applyUpdates();
      Chronicle ent = db.getChronicle(SIMPLENAME + ".x", true);
      assertEquals(SIMPLENAME + ".x", ent.getName(true));
    } catch (Exception e) {
      fail(e.toString());
    }
View Full Code Here

  public void test001() {
    try {
      UpdatableChronicle e = db.getTopChronicle().edit().createChronicle(SIMPLENAME, false, "junit test 001", null, null);
      assertEquals(FULLNAME, e.getName(true));
      e.applyUpdates();
      db.commit();
      assertEquals(FULLNAME, ((Chronicle) tester.getEvent().getSourceOrNull()).getName(true));
    } catch (T2DBException e) {
      fail(e.toString());
    }
View Full Code Here

 
  public void test002() {
    try {
      UpdatableChronicle e = db.getChronicle(FULLNAME, true).edit();
      e.destroy();
      e.applyUpdates();
      db.commit();
      assertEquals(db.getNamingPolicy().joinValueAndDescription(FULLNAME, "junit test 001"), tester.getEvent().getComment());
    } catch (Exception e) {
      fail(e.toString());
    }
View Full Code Here

  public void test032_create_entity() {
    try {
      Schema schema = db.getSchemas("foo schema").iterator().next();
      UpdatableChronicle ent = db.getTopChronicle().edit().createChronicle("fooent", false, "foo entity", null, schema);
      ent.getAttribute("foo property", true);
      ent.applyUpdates();
      assertNotNull(ent.getAttribute("foo property", false));
      assertNull(ent.getAttribute("bar property", false));
    } catch (Exception e) {
      fail(e.getMessage());
    }
View Full Code Here

      vt.applyUpdates();
      UpdatableChronicle ent = db.getChronicle("bt.fooent", true).edit();
      Attribute<String> attr = ent.getAttribute("foo property", true).typeCheck(String.class);
      attr.set("baz");
      ent.setAttribute(attr);
      ent.applyUpdates();
      Attribute<String> a = ent.getAttribute("foo property", true).typeCheck(String.class);
      assertEquals("baz", a.get());
    } catch (Exception e) {
      fail(e.getMessage());
    }
View Full Code Here

      UpdatableChronicle ent = db.getChronicle("bt.fooent", true).edit();
      Attribute<String> attr = ent.getAttribute("foo property", true).typeCheck(String.class);
      assertEquals("baz", attr.get());
      attr.set("barf");
      ent.setAttribute(attr);
      ent.applyUpdates();
      attr.set("baz");
      ent.setAttribute(attr);
      ent.applyUpdates();
    } catch (Exception e) {
      fail(e.getMessage());
View Full Code Here

      attr.set("barf");
      ent.setAttribute(attr);
      ent.applyUpdates();
      attr.set("baz");
      ent.setAttribute(attr);
      ent.applyUpdates();
    } catch (Exception e) {
      fail(e.getMessage());
    }
  }
 
View Full Code Here

    s.setSeriesTimeDomain(1, Day.DOMAIN);
    s.applyUpdates();
    String split[] = db.getNamingPolicy().split(CHRONICLE);
    UpdatableChronicle c = db.getTopChronicle().edit()
        .createChronicle(split[1], false, "test entity", null, s.resolve());
    c.applyUpdates();
    db.commit();
  }

  @Override
  protected void lastTearDown() throws Exception {
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.