Package ejava.examples.txhotel.blimpl
Class HotelReservationImpl
- java.lang.Object
-
- ejava.examples.txhotel.blimpl.HotelReservationImpl
-
- All Implemented Interfaces:
HotelReservationist
public class HotelReservationImpl extends Object implements HotelReservationist
-
-
Field Summary
Fields Modifier and Type Field Description private static longcounterprotected ReservationDAOdaoprivate static org.slf4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description HotelReservationImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelReservation(Reservation reservation)voidcleanupReservation(String confirmation)ReservationcommitReservation(Reservation reservation)ReservationcreateReservation(Person person, Date startDate, Date endDate)protected ReservationgetReservation(String confirmation)ReservationgetReservationByConfirmation(String confirmation)List<Reservation>getReservations(int index, int count)List<Reservation>getReservationsForPerson(Person person, int index, int count)voidsetDao(ReservationDAO dao)
-
-
-
Field Detail
-
log
private static final org.slf4j.Logger log
-
dao
protected ReservationDAO dao
-
counter
private static long counter
-
-
Method Detail
-
getReservation
protected Reservation getReservation(String confirmation) throws HotelReservationException
- Throws:
HotelReservationException
-
cancelReservation
public void cancelReservation(Reservation reservation) throws HotelReservationException
- Specified by:
cancelReservationin interfaceHotelReservationist- Throws:
HotelReservationException
-
commitReservation
public Reservation commitReservation(Reservation reservation) throws HotelReservationException
- Specified by:
commitReservationin interfaceHotelReservationist- Throws:
HotelReservationException
-
createReservation
public Reservation createReservation(Person person, Date startDate, Date endDate) throws HotelReservationException
- Specified by:
createReservationin interfaceHotelReservationist- Throws:
HotelReservationException
-
getReservations
public List<Reservation> getReservations(int index, int count) throws HotelReservationException
- Specified by:
getReservationsin interfaceHotelReservationist- Throws:
HotelReservationException
-
getReservationsForPerson
public List<Reservation> getReservationsForPerson(Person person, int index, int count) throws HotelReservationException
- Specified by:
getReservationsForPersonin interfaceHotelReservationist- Throws:
HotelReservationException
-
cleanupReservation
public void cleanupReservation(String confirmation) throws HotelReservationException
- Specified by:
cleanupReservationin interfaceHotelReservationist- Throws:
HotelReservationException
-
setDao
public void setDao(ReservationDAO dao)
-
getReservationByConfirmation
public Reservation getReservationByConfirmation(String confirmation) throws HotelReservationException
- Specified by:
getReservationByConfirmationin interfaceHotelReservationist- Throws:
HotelReservationException
-
-