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
HotelReservationException
public void cancelReservation(Reservation reservation) throws HotelReservationException
cancelReservation
in interface HotelReservationist
HotelReservationException
public Reservation commitReservation(Reservation reservation) throws HotelReservationException
commitReservation
in interface HotelReservationist
HotelReservationException
public Reservation createReservation(Person person, Date startDate, Date endDate) throws HotelReservationException
createReservation
in interface HotelReservationist
HotelReservationException
public List<Reservation> getReservations(int index, int count) throws HotelReservationException
getReservations
in interface HotelReservationist
HotelReservationException
public List<Reservation> getReservationsForPerson(Person person, int index, int count) throws HotelReservationException
getReservationsForPerson
in interface HotelReservationist
HotelReservationException
public void cleanupReservation(String confirmation) throws HotelReservationException
cleanupReservation
in interface HotelReservationist
HotelReservationException
public void setDao(ReservationDAO dao)
public Reservation getReservationByConfirmation(String confirmation) throws HotelReservationException
getReservationByConfirmation
in interface HotelReservationist
HotelReservationException
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.