public void createBookData() {
EntityManager entityManager = entityManagerFactory.createEntityManager();
entityManager.getTransaction().begin();
// ID 1
entityManager.persist(new Book("Cesta", "Brandon Boys", Genre.DRAMA, "2007", "Great Britan",
"Eminent", "8072813001", State.NEW, Available.AVAILABLE));
// ID 2
entityManager.persist(new Book("Cesta", "Brandon Boys", Genre.DRAMA, "2007", "Great Britan",
"Eminent", "8072813001", State.NEW, Available.AVAILABLE));
// ID 3
entityManager.persist(new Book("Cesta", "Brandon Boys", Genre.DRAMA, "2007", "Great Britan",
"Eminent", "8072813001", State.USED, Available.AVAILABLE));
// ID 4
entityManager.persist(new Book("Snehuliak", "Jo Nesbo", Genre.ADVENTURE, "2012", "Slovakia",
"Ikar", "9788055131191", State.NEW, Available.AVAILABLE));
// ID 5
entityManager.persist(new Book("Snehuliak", "Jo Nesbo", Genre.ADVENTURE, "2012", "Slovakia",
"Ikar", "9788055131191", State.NEW, Available.AVAILABLE));
// ID 6
entityManager.persist(new Book("Snehuliak", "Jo Nesbo", Genre.ADVENTURE, "2012", "Slovakia",
"Ikar", "9788055131191", State.USED, Available.AVAILABLE));
// ID 7
entityManager.persist(new Book("Snehuliak", "Jo Nesbo", Genre.ADVENTURE, "2012", "Slovakia",
"Ikar", "9788055131191", State.USED, Available.AVAILABLE));
// ID 8
entityManager.persist(new Book("Snehuliak", "Jo Nesbo", Genre.ADVENTURE, "2012", "Slovakia",
"Ikar", "9788055131191", State.USED, Available.RESERVED));
// ID 9
entityManager.persist(new Book("Snehuliak", "Jo Nesbo", Genre.ADVENTURE, "2012", "Slovakia",
"Ikar", "9788055131191", State.USED, Available.RESERVED));
// ID 10
entityManager.persist(new Book("Snehuliak", "Jo Nesbo", Genre.ADVENTURE, "2012", "Slovakia",
"Ikar", "9788055131191", State.USED, Available.BORROWED));
// ID 11
entityManager.persist(new Book("Snehuliak", "Jo Nesbo", Genre.ADVENTURE, "2012", "Slovakia",
"Ikar", "9788055131191", State.DAMAGED, Available.BORROWED));
entityManager.getTransaction().commit();
entityManager.close();
}