}
public BookGenre deleteBookGenre(Long id) {
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
BookGenre bookGenre = (BookGenre) session.load(BookGenre.class, id);
if(null != bookGenre) {
session.delete(bookGenre);
}
session.getTransaction().commit();
return bookGenre;