Package ejava.examples.txagent.jpa
Class JPABookingDAO
- java.lang.Object
-
- ejava.examples.txagent.jpa.JPABookingDAO
-
- All Implemented Interfaces:
BookingDAO
public class JPABookingDAO extends Object implements BookingDAO
-
-
Field Summary
Fields Modifier and Type Field Description private EntityManager
em
(package private) org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description JPABookingDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Booking
createBooking(Booking booking)
Booking
getBooking(long id)
Booking
getBookingByConfirmation(String confirmation)
List<Booking>
getBookings(int index, int count)
List<Booking>
getBookings(String queryName, Map<String,Object> params, int index, int count)
Booking
removeBooking(Booking booking)
void
setEntityManager(EntityManager em)
Booking
updateBooking(Booking booking)
-
-
-
Field Detail
-
log
org.slf4j.Logger log
-
em
private EntityManager em
-
-
Method Detail
-
setEntityManager
public void setEntityManager(EntityManager em)
-
createBooking
public Booking createBooking(Booking booking) throws DAOException
- Specified by:
createBooking
in interfaceBookingDAO
- Throws:
DAOException
-
getBooking
public Booking getBooking(long id) throws DAOException
- Specified by:
getBooking
in interfaceBookingDAO
- Throws:
DAOException
-
getBookings
public List<Booking> getBookings(int index, int count) throws DAOException
- Specified by:
getBookings
in interfaceBookingDAO
- Throws:
DAOException
-
getBookings
public List<Booking> getBookings(String queryName, Map<String,Object> params, int index, int count) throws DAOException
- Specified by:
getBookings
in interfaceBookingDAO
- Throws:
DAOException
-
removeBooking
public Booking removeBooking(Booking booking) throws DAOException
- Specified by:
removeBooking
in interfaceBookingDAO
- Throws:
DAOException
-
updateBooking
public Booking updateBooking(Booking booking) throws DAOException
- Specified by:
updateBooking
in interfaceBookingDAO
- Throws:
DAOException
-
getBookingByConfirmation
public Booking getBookingByConfirmation(String confirmation) throws DAOException
- Specified by:
getBookingByConfirmation
in interfaceBookingDAO
- Throws:
DAOException
-
-