public BookLending returnBook(Book book, Customer customer) {
   Query query = em.createNamedQuery("findLendingByCustomerAndBookId");
   query.setParameter("book", book);
   query.setParameter("customer", customer);
   List<BookLending> bookLendings = query.getResultList();
   if (bookLendings.isEmpty()) return null;
   BookLending bookLending = (BookLending) bookLendings.get(0);
   bookLending.setBookIsLended(false);
   bookLending.setReturnDate(new GregorianCalendar().getTime());
   em.persist(bookLending);
   return bookLending;
 }