Package org.conserve.objects

Examples of org.conserve.objects.Author.addBook()


    // create some books
    Book foundation = new Book("Foundation");
    foundation.setPublishedYear(1951);
    foundation.addKeyWord("science fiction");
    foundation.addKeyWord("psychohistory");
    asimov.addBook(foundation);
    Book cavesofsteel = new Book("The Caves of Steel");
    cavesofsteel.setPublishedYear(1954);
    cavesofsteel.addKeyWord("science fiction");
    cavesofsteel.addKeyWord("robot");
    cavesofsteel.addKeyWord("crime");
View Full Code Here


    Book cavesofsteel = new Book("The Caves of Steel");
    cavesofsteel.setPublishedYear(1954);
    cavesofsteel.addKeyWord("science fiction");
    cavesofsteel.addKeyWord("robot");
    cavesofsteel.addKeyWord("crime");
    asimov.addBook(cavesofsteel);

    // save everything
    PersistenceManager persist = new PersistenceManager(driver, database, login, password);
    persist.saveObject(asimov);
    persist.close();
View Full Code Here

    asimov.addBook(cavesofsteel);
    Book centerofearth = new Book("A Journey to the Center of the Earth");
    centerofearth.setPublishedYear(1864);
    centerofearth.addKeyWord("science fiction");
    centerofearth.addKeyWord("cave");
    verne.addBook(centerofearth);
    Book leagues = new Book("Twenty Thousand Leagues under the Sea");
    leagues.setPublishedYear(1869);
    leagues.addKeyWord("science fiction");
    leagues.addKeyWord("submarine");
    leagues.addKeyWord("ocean");
View Full Code Here

    Book leagues = new Book("Twenty Thousand Leagues under the Sea");
    leagues.setPublishedYear(1869);
    leagues.addKeyWord("science fiction");
    leagues.addKeyWord("submarine");
    leagues.addKeyWord("ocean");
    verne.addBook(leagues);

    // save everything
    PersistenceManager persist = new PersistenceManager(driver, database, login, password);
    persist.saveObject(dickens);
    persist.saveObject(asimov);
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.