public class JPABookingDAO extends Object implements BookingDAO
Modifier and Type | Field and Description |
---|---|
private EntityManager |
em |
(package private) org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
JPABookingDAO() |
Modifier and Type | Method and 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) |
org.apache.commons.logging.Log log
private EntityManager em
public void setEntityManager(EntityManager em)
public Booking createBooking(Booking booking) throws DAOException
createBooking
in interface BookingDAO
DAOException
public Booking getBooking(long id) throws DAOException
getBooking
in interface BookingDAO
DAOException
public List<Booking> getBookings(int index, int count) throws DAOException
getBookings
in interface BookingDAO
DAOException
public List<Booking> getBookings(String queryName, Map<String,Object> params, int index, int count) throws DAOException
getBookings
in interface BookingDAO
DAOException
public Booking removeBooking(Booking booking) throws DAOException
removeBooking
in interface BookingDAO
DAOException
public Booking updateBooking(Booking booking) throws DAOException
updateBooking
in interface BookingDAO
DAOException
public Booking getBookingByConfirmation(String confirmation) throws DAOException
getBookingByConfirmation
in interface BookingDAO
DAOException
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.