Class JPAClubDAO

  • All Implemented Interfaces:
    ClubDAO

    public class JPAClubDAO
    extends Object
    implements ClubDAO
    This class provides a sparse example of a JPA DAO for the class project. It is put in place here to demonstrate some of the end-to-end use cases,
    • Constructor Detail

      • JPAClubDAO

        public JPAClubDAO()
    • 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 interface ClubDAO
      • 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 interface ClubDAO
        Throws:
        ClubDAOException