public void createBookData() {
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
// ID 1
em.persist(new Book("Da Vinciho kod", "Dan Brown", Genre.DRAMA, "2005", "USA",
"Foursick", "95860948503", State.NEW, Available.AVAILABLE));
// ID 2
em.persist(new Book("Cesta", "Brandon Boys", Genre.DRAMA, "2007", "Great Britain",
"Eminent", "8072813001", State.NEW, Available.AVAILABLE));
// ID 3
em.persist(new Book("Peniaze", "Arnold Doughty", Genre.NOVEL, "2000", "USA",
"Mackpublishing", "43543459834", State.USED, Available.BORROWED));
// ID 4
em.persist(new Book("Smely zajko v Afrike", "Ludmila Podjavorinska", Genre.ADVENTURE, "1993", "Slovakia",
"Ikar", "49684586044", State.USED, Available.AVAILABLE));
// ID 5
em.persist(new Book("Kazisvet Jurko", "Lubomir Feldek", Genre.ADVENTURE, "1992", "Slovakia",
"Mlade leta", "548684030023", State.USED, Available.RESERVED));
// ID 6
em.persist(new Book("Mierny vanok", "Juraj Lauko", Genre.CHILDREN, "2001", "Slovakia",
"Ikar", "9788055151191", State.USED, Available.BORROWED));
// ID 7
em.persist(new Book("Neposlusny Janko", "Peter Konecny", Genre.CHILDREN, "2012", "Slovakia",
"Mlade leta", "9788055161191", State.DAMAGED, Available.BORROWED));
// ID 8
em.persist(new Book("Cap zahradnik", "Anton Maly", Genre.ADVENTURE, "2011", "Slovakia",
"Ikar", "9788055171191", State.USED, Available.RESERVED));
// ID 9
em.persist(new Book("Snehuliak", "Jo Nesbo", Genre.ADVENTURE, "2010", "Slovakia",
"Mlade leta", "9788055181191", State.USED, Available.RESERVED));
em.getTransaction().commit();
em.close();
}