public class HotelReservationImpl extends Object implements HotelReservationist
| Modifier and Type | Field and Description |
|---|---|
private static long |
counter |
protected ReservationDAO |
dao |
private static org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
HotelReservationImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelReservation(Reservation reservation) |
void |
cleanupReservation(String confirmation) |
Reservation |
commitReservation(Reservation reservation) |
Reservation |
createReservation(Person person,
Date startDate,
Date endDate) |
protected Reservation |
getReservation(String confirmation) |
Reservation |
getReservationByConfirmation(String confirmation) |
List<Reservation> |
getReservations(int index,
int count) |
List<Reservation> |
getReservationsForPerson(Person person,
int index,
int count) |
void |
setDao(ReservationDAO dao) |
private static final org.apache.commons.logging.Log log
protected ReservationDAO dao
private static long counter
protected Reservation getReservation(String confirmation) throws HotelReservationException
HotelReservationExceptionpublic void cancelReservation(Reservation reservation) throws HotelReservationException
cancelReservation in interface HotelReservationistHotelReservationExceptionpublic Reservation commitReservation(Reservation reservation) throws HotelReservationException
commitReservation in interface HotelReservationistHotelReservationExceptionpublic Reservation createReservation(Person person, Date startDate, Date endDate) throws HotelReservationException
createReservation in interface HotelReservationistHotelReservationExceptionpublic List<Reservation> getReservations(int index, int count) throws HotelReservationException
getReservations in interface HotelReservationistHotelReservationExceptionpublic List<Reservation> getReservationsForPerson(Person person, int index, int count) throws HotelReservationException
getReservationsForPerson in interface HotelReservationistHotelReservationExceptionpublic void cleanupReservation(String confirmation) throws HotelReservationException
cleanupReservation in interface HotelReservationistHotelReservationExceptionpublic void setDao(ReservationDAO dao)
public Reservation getReservationByConfirmation(String confirmation) throws HotelReservationException
getReservationByConfirmation in interface HotelReservationistHotelReservationExceptionCopyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.