Examples of ReservationTO


Examples of cz.muni.fi.pa165.library.api.ReservationTO

    public static ReservationTO convertReservationEntityToTO(Reservation reservation) {
        if (reservation == null) {
            return null;
        }
        ReservationTO reservationTO = new ReservationTO(DTOConvertor.convertReaderEntityToTO(reservation.getReader()),
                DTOConvertor.convertBookEntityToTO(reservation.getBook()), reservation.getReservationDate());
        reservationTO.setReservationID(reservation.getReservationID());
        return reservationTO;
    }
View Full Code Here

Examples of cz.muni.fi.pa165.library.api.ReservationTO

                          AuthenticatedSession session = ((AuthenticatedSession)Session.get());
                          ReaderTO reader = session.getReader();
                          BookTO book2 = bookService.findBookById(book.getId());
                          java.util.Date date = new java.util.Date();
                          if (reader != null && book != null){
                              ReservationTO reservation = new ReservationTO(reader, book2,new Timestamp(date.getTime()));
                              reservationService.insertReservation(reservation);
                              setResponsePage(ShowAllBookReader.class);
                          }
                         
                    } 
View Full Code Here

Examples of cz.muni.fi.pa165.library.api.ReservationTO

    public EditReservation(final PageParameters parameters) {
        super(parameters);
        ReaderService readerService = (ReaderService) ApplicationContextProvider.getApplicationContext().getBean("readerService");
        BookService bookService = (BookService) ApplicationContextProvider.getApplicationContext().getBean("bookService");
        readerId = parameters.get("readerId");
        reservation = new ReservationTO();
        add(new Label("title", new Model("Create reservation for "
                + readerService.findReaderById(readerId.toLong()).getSurname() + " "
                + readerService.findReaderById(readerId.toLong()).getFirstName())));

        Form<?> form = new Form("form") {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.