Package ejava.projects.eleague.jpa
Class JPAClubDAO
- java.lang.Object
-
- ejava.projects.eleague.jpa.JPAClubDAO
-
-
Field Summary
Fields Modifier and Type Field Description private EntityManager
em
-
Constructor Summary
Constructors Constructor Description JPAClubDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createVenue(Venue venue)
This method will create a new venue in the DB and update the provided object with the PK of that entity.List<Venue>
getVenues(int index, int count)
This method will return all venues in the DB between the start and count values.void
setEntityManager(EntityManager em)
This method injects an entity manager to be used by all DAO methods.
-
-
-
Field Detail
-
em
private EntityManager em
-
-
Method Detail
-
setEntityManager
public void setEntityManager(EntityManager em)
This method injects an entity manager to be used by all DAO methods.- Parameters:
em
-
-
createVenue
public void createVenue(Venue venue)
Description copied from interface:ClubDAO
This method will create a new venue in the DB and update the provided object with the PK of that entity.- Specified by:
createVenue
in interfaceClubDAO
-
getVenues
public List<Venue> getVenues(int index, int count) throws ClubDAOException
Description copied from interface:ClubDAO
This method will return all venues in the DB between the start and count values. Provide 0s to turn off paging.- Specified by:
getVenues
in interfaceClubDAO
- Throws:
ClubDAOException
-
-