@@ -0,0 +1,2733 @@
+package org.jboss.as.quickstarts.hellosport.rest;%0A%0Aimport javax.ws.rs.PathParam;%0Aimport javax.ws.rs.Produces;%0Aimport javax.ws.rs.GET;%0Aimport javax.ws.rs.Path;%0A%0Aimport java.lang.annotation.Annotation;%0Aimport java.util.List;%0A%0Aimport javax.enterprise.context.SessionScoped;%0Aimport javax.inject.Inject;%0Aimport javax.persistence.EntityManager;%0Aimport javax.persistence.PersistenceContext;%0Aimport javax.persistence.PersistenceContextType;%0Aimport javax.persistence.Query;%0A%0Aimport org.jboss.as.quickstarts.helloworld.model.Player;%0Aimport org.jboss.as.quickstarts.helloworld.model.Team;%0Aimport org.jboss.as.quickstarts.helloworld.rest.SportService.ServiceType;%0Aimport org.jboss.as.quickstarts.helloworld.rest.SportService;%0A%0A@Path(%22/NHL%22)%0Apublic class NhlService implements SportService%7B%0A%0A        @SportService(ServiceType.NHL)%0A        @PersistenceContext(unitName=%22NHL%22, type=PersistenceContextType.EXTENDED)%0A        private EntityManager emNhl;%0A%0A        @GET()%0A        @Path(%22players%22)%0A        @Produces(%22application/json%22)%0A        @SportService(ServiceType.NHL)%0A        public List%3CPlayer%3E listPlayers()%0A        %7B%0A                Query query = emNhl.createQuery(%22FROM org.jboss.as.quickstarts.helloworld.model.Player order by last_name, first_name%22);%0A                @SuppressWarnings(%22unchecked%22)%0A                List %3CPlayer%3E player = query.getResultList();  //Dummy comment%0A%0A                return player;%0A        %7D%0A%0A        @GET()%0A        @Path(%22teams%22)%0A        @Produces(%22application/json%22)%0A        @SportService(ServiceType.NHL)%0A        public List%3CTeam%3E listTeams()%0A        %7B%0A                Query query = emNhl.createQuery(%22FROM org.jboss.as.quickstarts.helloworld.model.Team order by division, city, name%22);%0A                @SuppressWarnings(%22unchecked%22)%0A                List %3CTeam%3E team = query.getResultList();%0A%0A                return team;%0A        %7D%0A%0A        @GET()%0A        @Path(%22team/%7BteamId%7D%22)%0A        @Produces(%22application/json%22)%0A        @SportService(ServiceType.NHL)%0A        public List%3CPlayer%3E listTeam(@PathParam(%22teamId%22) int iTeamId)%0A        %7B%0A                Query query = emNhl.createQuery(%22FROM org.jboss.as.quickstarts.helloworld.model.Player where team_id = ?1 order by last_name, first_name%22);%0A                query.setParameter(1,iTeamId);%0A                @SuppressWarnings(%22unchecked%22)%0A                List %3CPlayer%3E player = query.getResultList();%0A%0A                return player;%0A        %7D%0A%0A        @Override%0A        public Class%3C? extends Annotation%3E annotationType() %7B%0A                // TODO Auto-generated method stub%0A                return null;%0A        %7D%0A%0A        @Override%0A        public ServiceType value() %7B%0A                // TODO Auto-generated method stub%0A                return null;%0A        %7D%0A%7D%0A

Create NhlService.java