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 long
counter
protected ReservationDAO
dao
private static org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description HotelReservationImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
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:
cancelReservation
in interfaceHotelReservationist
- Throws:
HotelReservationException
-
commitReservation
public Reservation commitReservation(Reservation reservation) throws HotelReservationException
- Specified by:
commitReservation
in interfaceHotelReservationist
- Throws:
HotelReservationException
-
createReservation
public Reservation createReservation(Person person, Date startDate, Date endDate) throws HotelReservationException
- Specified by:
createReservation
in interfaceHotelReservationist
- Throws:
HotelReservationException
-
getReservations
public List<Reservation> getReservations(int index, int count) throws HotelReservationException
- Specified by:
getReservations
in interfaceHotelReservationist
- Throws:
HotelReservationException
-
getReservationsForPerson
public List<Reservation> getReservationsForPerson(Person person, int index, int count) throws HotelReservationException
- Specified by:
getReservationsForPerson
in interfaceHotelReservationist
- Throws:
HotelReservationException
-
cleanupReservation
public void cleanupReservation(String confirmation) throws HotelReservationException
- Specified by:
cleanupReservation
in interfaceHotelReservationist
- Throws:
HotelReservationException
-
setDao
public void setDao(ReservationDAO dao)
-
getReservationByConfirmation
public Reservation getReservationByConfirmation(String confirmation) throws HotelReservationException
- Specified by:
getReservationByConfirmation
in interfaceHotelReservationist
- Throws:
HotelReservationException
-
-