Package com.vercer.engine.persist.annotation

Examples of com.vercer.engine.persist.annotation.AnnotationObjectDatastore.store()


    C c12 = new C();
    c12.field = "c12";
    b1.cs = Lists.newArrayList(c11, c12);
   
    ObjectDatastore datastore = new AnnotationObjectDatastore();
    Key key = datastore.store(a);
    datastore.disassociateAll();
    A reloaded = datastore.load(key);
   
    Assert.assertNull(reloaded.bs.get(0).cs.get(0).field);
  }
View Full Code Here


        @Test
        public void transientFieldWithStoreEqualsTrueShouldBePersisted(){
                ObjectDatastore ods1 = new AnnotationObjectDatastore();
                ExampleModel model = new ExampleModel();
                model.setTransientField("xxx");
                ods1.store(model);
                ObjectDatastore ods2 = new AnnotationObjectDatastore();
                ExampleModel reloadedModel = ods2.load(ods1.associatedKey(model));
                assertEquals("xxx", reloadedModel.getTransientField());
        }
}
View Full Code Here

    created.blank.put("c2", new Contained("im the second", 84));
    created.initialised.put(45l, new Contained("dated one", 32));
    created.initialised.put(67l, new Contained("dated today", 18));
   
    AnnotationObjectDatastore datastore = new AnnotationObjectDatastore();
    Key key = datastore.store(created);
   
    datastore.disassociateAll();
   
    Object loaded = datastore.load(key);
   
View Full Code Here

    TypeWithCollections item = new TypeWithCollections();
    item.classes.add(String.class);
    item.classes.add(Integer.class);
    item.classes.add(Collection.class);
   
    Key key = datastore.store(item);
   
    TypeWithEnum thing = new TypeWithEnum();
    thing.watsit = MyEnum.TWOK10;
    item.things.add(thing);
    item.things.add(null);
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.