Package ejava.examples.txagent.blimpl
Class AgentSessionImpl
- java.lang.Object
-
- ejava.examples.txagent.blimpl.AgentSessionImpl
-
- All Implemented Interfaces:
AgentReservationSession
public class AgentSessionImpl extends Object implements AgentReservationSession
-
-
Field Summary
Fields Modifier and Type Field Description private Bookingbookingprivate BookingDAObookingDAOprivate longcounterprivate static org.slf4j.Loggerlogprivate HotelReservationSessionreservationist
-
Constructor Summary
Constructors Constructor Description AgentSessionImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddReservation(Person person, Date startDate, Date endDate)voidcancelBooking()voidclose()Bookingcommit()voidcreateBooking()voidsetBookingDAO(BookingDAO bookingDAO)voidsetReservationist(HotelReservationSession reservationist)
-
-
-
Field Detail
-
log
private static final org.slf4j.Logger log
-
booking
private Booking booking
-
bookingDAO
private BookingDAO bookingDAO
-
reservationist
private HotelReservationSession reservationist
-
counter
private long counter
-
-
Method Detail
-
createBooking
public void createBooking() throws AgentReservationException- Specified by:
createBookingin interfaceAgentReservationSession- Throws:
AgentReservationException
-
addReservation
public void addReservation(Person person, Date startDate, Date endDate) throws AgentReservationException
- Specified by:
addReservationin interfaceAgentReservationSession- Throws:
AgentReservationException
-
cancelBooking
public void cancelBooking() throws AgentReservationException- Specified by:
cancelBookingin interfaceAgentReservationSession- Throws:
AgentReservationException
-
commit
public Booking commit() throws AgentReservationException
- Specified by:
commitin interfaceAgentReservationSession- Throws:
AgentReservationException
-
close
public void close()
- Specified by:
closein interfaceAgentReservationSession
-
setBookingDAO
public void setBookingDAO(BookingDAO bookingDAO)
-
setReservationist
public void setReservationist(HotelReservationSession reservationist)
-
-