828384858687888990919293
for(Book book :books) { for(BookGenre bookGenre : book.getBookGenre()) { Genre mappedGenre = bookGenre.getGenre(); mappedGenre.getId(); } } } catch (HibernateException e) { e.printStackTrace(); session.getTransaction().rollback();
164165166167168169170171172173174175
for(Book book: books) { for(BookGenre bookGenre :book.getBookGenre()) { Genre mappedGenre = bookGenre.getGenre(); mappedGenre.getId(); } } } catch (HibernateException e) { e.printStackTrace(); session.getTransaction().rollback();
464748495051525354555657
for(String data: genreData) { if(StringUtils.isNotBlank(StringUtils.trimToEmpty(data))) { Genre newGenre = new Genre(); newGenre.setGenre(data); if (!genres.contains(newGenre)) // is this a new genre? { controller.addGenre(newGenre); }
125126127128129130131132133134135136
454647484950515253545556
124125126127128129130131132133134135
525354555657585960616263
143144145146147148149150151152153154