Examples of applyUpdates()


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

  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

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

      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

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

      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

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

      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

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

    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

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

  public void test_180_create_chronicle_with_updatable_schema_fails() {
    try {
      // creating a chronicle with an updatable schema should be impossible
      UpdatableSchema schema = db.getUpdatableSchemas("schema5").iterator().next();
      UpdatableChronicle chro = db.getTopChronicle().edit().createChronicle("schema5chro", false, "test chronicle", null, schema);
      chro.applyUpdates();
      expectException();
    } catch (Exception e) {
      assertException(e, D.D40104);
    }
  }
View Full Code Here

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

  public void test_190_create_chronicle_with_empty_schema_okay() {
    try {
      // creating a chronicle with an empty schema should be possible
      Schema schema = db.getSchemas("schema5").iterator().next();
      UpdatableChronicle chro = db.getTopChronicle().edit().createChronicle("schema5chro", false, "test chronicle", null, schema);
      chro.applyUpdates();
    } catch (Exception e) {
      fail(e.getMessage());
    }
  }
 
View Full Code Here

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

 
  public void test_330_delete_series_in_actual_use_fails() {
    try {
      Schema schema = db.getSchemas("schema1a").iterator().next();
      UpdatableChronicle chro = db.getTopChronicle().edit().createChronicle("schema1achro", false, "test chronicle", null, schema);
      chro.applyUpdates();
      UpdatableSeries<Double> ser = db.getUpdatableSeries("bt.schema1achro.fou", true);
      ser.setValue(Workday.DOMAIN.time("2011-06-30"), 42.);
      ser.applyUpdates();
      // erase the series from the schema (should fail, of course)
      UpdatableSchema sch1 = schema.edit();
View Full Code Here

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

  public void test_380_delete_series_in_use_via_base_schema() {
    try {
      Schema schema = db.getSchemas("schema4").iterator().next();
      UpdatableChronicle chro = db.getTopChronicle().edit().createChronicle("schema4chro", false, "test chronicle", null, schema);
      chro.applyUpdates();
      UpdatableSeries<Double> ser = db.getUpdatableSeries("bt.schema4chro.fooo", true);
      ser.applyUpdates();
      // note that the series is deleted in the base schema
      UpdatableSchema sch1 = db.getUpdatableSchemas("schema1a").iterator().next();
      sch1.deleteSeries(1);
View Full Code Here

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

      assertEquals("t1v1", chro.getAttribute("prop1", true).get().toString());
      Attribute<?> a = chro.getAttribute("prop1", true);
      a.scan("t1v2");
      assertEquals("t1v2", a.get().toString());
      chro.setAttribute(a);
      chro.applyUpdates();
      assertEquals("t1v2", chro.getAttribute("prop1", true).get().toString());
      schema.deleteAttribute(1);
      schema.applyUpdates();
      expectException();
    } catch (Exception e) {
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.