private void createAuthors() throws SQLException
{
// create some authors
Author dickens = new Author();
dickens.setBirthYear(1812);
dickens.setFirstName("Charles");
dickens.setLastName("Dickens");
Author asimov = new Author();
asimov.setBirthYear(1920);
asimov.setFirstName("Isaac");
asimov.setLastName("Asimov");
Author verne = new Author();
verne.setBirthYear(1828);
verne.setFirstName("Jules");
verne.setLastName("Verne");
// create some books
Book twocities = new Book("A Tale of Two Cities");
twocities.setPublishedYear(1859);
twocities.addKeyWord("London");
twocities.addKeyWord("Paris");
twocities.addKeyWord("revolution");
dickens.addBook(twocities);
Book olivertwist = new Book("Oliver Twist");
olivertwist.setPublishedYear(1838);
olivertwist.addKeyWord("crime");
olivertwist.addKeyWord("London");
dickens.addBook(olivertwist);
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");
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");
verne.addBook(leagues);
// save everything
PersistenceManager persist = new PersistenceManager(driver, database, login, password);
persist.saveObject(dickens);
persist.saveObject(asimov);