Package ch.agent.crnickl.api

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


    try {
      UpdatableSchema schema4 = db.createSchema("schema4", "schema1a");
      Schema s = schema4.resolve();
      assertEquals("prop1", s.getAttributeDefinition(1, true).getName());
      schema4.addAttribute(1);
      schema4.eraseAttribute(1);
      assertEquals(true, schema4.getAttributeDefinition(1, true).isErasing());
      assertEquals("fou", s.getSeriesDefinition(1, true).getName());
      schema4.setAttributeProperty(1, db.getProperty("prop1", true));
      schema4.setAttributeDefault(1, "t1v1");
      schema4.applyUpdates();
View Full Code Here


      // erase attribute
      Chronicle chro = db.getChronicle("bt.schema3chro", true);
      assertEquals("t1v3", chro.getAttribute("prop1", true).get().toString());
      UpdatableSchema schema3 = db.getUpdatableSchemas("schema3").iterator().next();
      schema3.addAttribute(1);
      schema3.eraseAttribute(1);
      schema3.applyUpdates();
      assertEquals(null, schema3.getAttributeDefinition("prop1", false));
      expectException();
    } catch (Exception e) {
      assertException(e, D.D30105, D.D30146);
View Full Code Here

      chro.applyUpdates();
      assertEquals("t1v2", chro.getAttribute("prop1", true).get().toString());
     
      UpdatableSchema schema3 = db.getUpdatableSchemas("schema3").iterator().next();
      schema3.addAttribute(1);
      schema3.eraseAttribute(1);
      schema3.applyUpdates();
      assertEquals(null, schema3.getAttributeDefinition("prop1", false));
      // value still here because it's the default value, which is not in the chronicle
      assertEquals("t1v2", chro.getAttribute("prop1", true).get().toString());
    } catch (Exception e) {
View Full Code Here

    try {
      UpdatableSchema schema4 = db.createSchema("schema4", "schema1a");
      Schema s = schema4.resolve();
      assertEquals("prop1", s.getAttributeDefinition(1, true).getName());
      schema4.addAttribute(1);
      schema4.eraseAttribute(1);
      assertEquals(true, schema4.getAttributeDefinition(1, true).isErasing());
      assertEquals("fou", s.getSeriesDefinition(1, true).getName());
      schema4.setAttributeProperty(1, db.getProperty("prop1", true));
      schema4.setAttributeDefault(1, "t1v1");
      schema4.applyUpdates();
View Full Code Here

      // erase attribute
      Chronicle chro = db.getChronicle("bt.schema3chro", true);
      assertEquals("t1v3", chro.getAttribute("prop1", true).get().toString());
      UpdatableSchema schema3 = db.getUpdatableSchemas("schema3").iterator().next();
      schema3.addAttribute(1);
      schema3.eraseAttribute(1);
      schema3.applyUpdates();
      assertEquals(null, schema3.getAttributeDefinition("prop1", false));
      expectException();
    } catch (Exception e) {
      assertException(e, D.D30105, D.D30146);
View Full Code Here

      chro.applyUpdates();
      assertEquals("t1v2", chro.getAttribute("prop1", true).get().toString());
     
      UpdatableSchema schema3 = db.getUpdatableSchemas("schema3").iterator().next();
      schema3.addAttribute(1);
      schema3.eraseAttribute(1);
      schema3.applyUpdates();
      assertEquals(null, schema3.getAttributeDefinition("prop1", false));
      // value still here because it's the default value, which is not in the chronicle
      assertEquals("t1v2", chro.getAttribute("prop1", true).get().toString());
    } 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.