Package org.conserve

Examples of org.conserve.PersistenceManager.saveObject()


  {
    PersistenceManager pm = new PersistenceManager(driver, database, login, password);
    // drop all tables
    pm.dropTable(Object.class);
    // create two OriginalObject, store them.
    pm.saveObject(new OriginalObject());
    pm.saveObject(new OriginalObject());
    // rename OriginalObject to ChangedInheritance
    pm.changeName(OriginalObject.class, ChangedInheritance.class);

    // change the database schema, adding interface Serialized.
View Full Code Here


    PersistenceManager pm = new PersistenceManager(driver, database, login, password);
    // drop all tables
    pm.dropTable(Object.class);
    // create two OriginalObject, store them.
    pm.saveObject(new OriginalObject());
    pm.saveObject(new OriginalObject());
    // rename OriginalObject to ChangedInheritance
    pm.changeName(OriginalObject.class, ChangedInheritance.class);

    // change the database schema, adding interface Serialized.
    pm.updateSchema(ChangedInheritance.class);
View Full Code Here

    // add two Bottom objects.
    OriginalBottom b1 = new OriginalBottom();
    b1.setFoo(1);
    OriginalBottom b2 = new OriginalBottom();
    b2.setFoo(2);
    pm.saveObject(b1);
    pm.saveObject(b2);

    pm.changeName(OriginalTop.class, ModifiedTop.class);
    pm.changeName(OriginalMiddle.class, ModifiedMiddle.class);
    pm.changeName(OriginalBottom.class, ModifiedBottom.class);
View Full Code Here

    OriginalBottom b1 = new OriginalBottom();
    b1.setFoo(1);
    OriginalBottom b2 = new OriginalBottom();
    b2.setFoo(2);
    pm.saveObject(b1);
    pm.saveObject(b2);

    pm.changeName(OriginalTop.class, ModifiedTop.class);
    pm.changeName(OriginalMiddle.class, ModifiedMiddle.class);
    pm.changeName(OriginalBottom.class, ModifiedBottom.class);
View Full Code Here

    // add two Bottom objects.
    ModifiedBottom b1 = new ModifiedBottom();
    b1.setFoo(1);
    ModifiedBottom b2 = new ModifiedBottom();
    b2.setFoo(2);
    pm.saveObject(b1);
    pm.saveObject(b2);

    pm.changeName(ModifiedTop.class, OriginalTop.class);
    pm.changeName(ModifiedMiddle.class, OriginalMiddle.class);
    pm.changeName(ModifiedBottom.class, OriginalBottom.class);
View Full Code Here

    ModifiedBottom b1 = new ModifiedBottom();
    b1.setFoo(1);
    ModifiedBottom b2 = new ModifiedBottom();
    b2.setFoo(2);
    pm.saveObject(b1);
    pm.saveObject(b2);

    pm.changeName(ModifiedTop.class, OriginalTop.class);
    pm.changeName(ModifiedMiddle.class, OriginalMiddle.class);
    pm.changeName(ModifiedBottom.class, OriginalBottom.class);
View Full Code Here

    ListContainingObject a = new ListContainingObject();
    a.addStr("1");
    a.addStr("2");
    a.addStr("3");
    a.addStr("4");
    pm.saveObject(a);
    ListContainingObject b = new ListContainingObject();
    b.addStr("5");
    b.addStr("6");
    b.addStr("7");
    b.addStr("8");
View Full Code Here

    ListContainingObject b = new ListContainingObject();
    b.addStr("5");
    b.addStr("6");
    b.addStr("7");
    b.addStr("8");
    pm.saveObject(b);
    pm.close();

    pm = new PersistenceManager(driver, database, login, password);

    // search
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.