Examples of applyUpdates()


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

 
  public void test_410_delete_chronicle_attribute_via_base_with_actual_values() {
    try {
      Schema schema3 = db.getSchemas("schema3").iterator().next();
      UpdatableChronicle chro = db.getTopChronicle().edit().createChronicle("schema3chro", false, "test chronicle", null, schema3);
      chro.applyUpdates();
      // use the attribute
      Attribute<?> a = chro.getAttribute("prop1", true);
      a.scan("t1v3");
      assertEquals("t1v3", a.get().toString());
      chro.setAttribute(a);
View Full Code Here

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

      // use the attribute
      Attribute<?> a = chro.getAttribute("prop1", true);
      a.scan("t1v3");
      assertEquals("t1v3", a.get().toString());
      chro.setAttribute(a);
      chro.applyUpdates();
      assertEquals("t1v3", chro.getAttribute("prop1", true).get().toString());
      // remove the attribute from the base schema of schema3 (should fail)
      UpdatableSchema schema1 = db.getUpdatableSchemas("schema1a").iterator().next();
      schema1.deleteAttribute(1);
      schema1.applyUpdates();
View Full Code Here

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

      assertEquals("t1v3", chro.getAttribute("prop1", true).get().toString());
      // use the attribute
      Attribute<?> a = chro.getAttribute("prop1", true);
      a.reset();
      chro.setAttribute(a);
      chro.applyUpdates();
      assertEquals("t1v2", chro.getAttribute("prop1", true).get().toString());
     
      UpdatableSchema schema3 = db.getUpdatableSchemas("schema3").iterator().next();
      schema3.addAttribute(1);
      schema3.eraseAttribute(1);
View Full Code Here

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

  public void test_450_set_chronicle_attribute_with_value_same_as_default() {
    try {
      Schema schema1 = db.getSchemas("schema1a").iterator().next();
      UpdatableChronicle chro = db.getTopChronicle().edit().createChronicle("schema1achro2", false, "test chronicle", null, schema1);
      chro.applyUpdates();
      // use the attribute
      Attribute<?> a = chro.getAttribute("prop1", true);
      assertEquals("t1v1", schema1.getAttributeDefinition("prop1", false).getValue().toString());
      a.scan("t1v1");
      chro.setAttribute(a);
View Full Code Here

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

      // use the attribute
      Attribute<?> a = chro.getAttribute("prop1", true);
      assertEquals("t1v1", schema1.getAttributeDefinition("prop1", false).getValue().toString());
      a.scan("t1v1");
      chro.setAttribute(a);
      chro.applyUpdates();
      assertEquals("t1v1", chro.getAttribute("prop1", true).get().toString());
      // now change the default
      UpdatableSchema uschema1 = schema1.edit();
      uschema1.setAttributeDefault(1, "t1v2");
      uschema1.applyUpdates();
View Full Code Here

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

      schema.setAttributeDefault(2, "bar");
      schema.addSeries(1);
      schema.setSeriesName(1, "fooser");
      schema.setSeriesType(1, "numeric");
      schema.setSeriesTimeDomain(1, Day.DOMAIN);
      schema.applyUpdates();
      assertEquals("foo property", db.getSchemas("foo schema").iterator().next().
          getAttributeDefinition(2, true).getName());
    } catch (Exception e) {
      fail(e.getMessage());
    }
View Full Code Here

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

    UpdatableSchema s = db.createSchema(SCHEMA, null);
    s.addSeries(1);
    s.setSeriesName(1, "test");
    s.setSeriesType(1, "numeric");
    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();
View Full Code Here

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

      usch.addSeries(4);
      usch.setSeriesName(4, "test4");
      usch.setSeriesType(4, "numeric");
      usch.setSeriesTimeDomain(4, Day.DOMAIN);
      assertEquals(2, usch.getSeriesDefinitions().size());
      usch.applyUpdates();
      assertEquals(2, usch.getSeriesDefinitions().size());
      db.commit();
      assertEquals(1, chronicle.getSchema(true).getSeriesDefinitions().size());
      chronicle = db.getChronicle(CHRONICLE, true);
      assertEquals(2, chronicle.getSchema(true).getSeriesDefinitions().size());
View Full Code Here

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

      schema.addAttribute(1);
      schema.setAttributeProperty(1, db.getProperty("prop1", true));
      schema.setAttributeDefault(1, "t1v1");
      // next one makes default value illegal
      schema.setAttributeProperty(1, db.getProperty("prop2", true));
      schema.applyUpdates();
      expectException();
    } catch (Exception e) {
      assertException(e, D.D30133);
    }
  }
View Full Code Here

Examples of com.sun.jdo.spi.persistence.support.sqlstore.StateManager.applyUpdates()

                       {
                           if (removed.remove(o) == false)
                           {
                               added.add(o);
                           }
                           stateManager.applyUpdates(fieldName, this);
                       }
                       return modified;
                    }
                    finally
                    {
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.