public class JPAReservationDAO extends Object implements ReservationDAO
Modifier and Type | Field and Description |
---|---|
private EntityManager |
em |
private org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
JPAReservationDAO() |
Modifier and Type | Method and Description |
---|---|
Reservation |
createReservation(Reservation reservation) |
Reservation |
getReservation(long id) |
Reservation |
getReservationByConfirmation(String confirmation) |
List<Reservation> |
getReservations(int index,
int count) |
List<Reservation> |
getReservations(String queryName,
Map<String,Object> params,
int index,
int count) |
Reservation |
removeReservation(Reservation reservation) |
void |
setEntityManager(EntityManager em) |
Reservation |
updateReservation(Reservation reservation) |
private org.apache.commons.logging.Log log
private EntityManager em
public void setEntityManager(EntityManager em)
public Reservation createReservation(Reservation reservation) throws DAOException
createReservation
in interface ReservationDAO
DAOException
public Reservation getReservation(long id) throws DAOException
getReservation
in interface ReservationDAO
DAOException
public List<Reservation> getReservations(int index, int count) throws DAOException
getReservations
in interface ReservationDAO
DAOException
public List<Reservation> getReservations(String queryName, Map<String,Object> params, int index, int count) throws DAOException
getReservations
in interface ReservationDAO
DAOException
public Reservation removeReservation(Reservation reservation) throws DAOException
removeReservation
in interface ReservationDAO
DAOException
public Reservation updateReservation(Reservation reservation) throws DAOException
updateReservation
in interface ReservationDAO
DAOException
public Reservation getReservationByConfirmation(String confirmation) throws DAOException
getReservationByConfirmation
in interface ReservationDAO
DAOException
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.