ReservationService reservationService = (ReservationService) ApplicationContextProvider.getApplicationContext().getBean("reservationService");
ReaderService readerService = (ReaderService) ApplicationContextProvider.getApplicationContext().getBean("readerService");
java.util.Date date = new java.util.Date();
reservation.setReservationDate(new Timestamp(date.getTime()));
reservation.setReaderTO(readerService.findReaderById(readerId.toLong()));
reservationService.insertReservation(reservation);
setResponsePage(ShowAllReservation.class);
}
};
add(form);
List<BookTO> books = bookService.findAllAvailableBooks();