@@ -0,0 +1,2629 @@
+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.inject.Inject;%0Aimport javax.persistence.EntityManager;%0Aimport javax.persistence.PersistenceContext;%0Aimport javax.persistence.PersistenceContextType;%0Aimport javax.persistence.Query;%0A%0Aimport org.jboss.as.quickstarts.hellosport.model.Player;%0Aimport org.jboss.as.quickstarts.hellosport.model.Team;%0Aimport org.jboss.as.quickstarts.hellosport.rest.SportService;%0A%0A%0A//Dummy comment%0A@Path(%22/NBA%22)%0Apublic class NbaService implements SportService%7B%0A%0A        @SportService(ServiceType.NBA)%0A        @PersistenceContext(unitName=%22NBA%22, type=PersistenceContextType.EXTENDED)%0A        private EntityManager emNba;%0A%0A        @GET()%0A        @Path(%22players%22)%0A        @Produces(%22application/json%22)%0A        @SportService(ServiceType.NBA)%0A        public List%3CPlayer%3E listPlayers()%0A        %7B%0A                Query query = emNba.createQuery(%22FROM org.jboss.as.quickstarts.hellosport.model.Player order by last_name, first_name%22);%0A                @SuppressWarnings(%22unchecked%22)%0A                List %3CPlayer%3E player = query.getResultList();%0A%0A                return player;%0A        %7D%0A%0A        @GET()%0A        @Path(%22teams%22)%0A        @Produces(%22application/json%22)%0A        @SportService(ServiceType.NBA)%0A        public List%3CTeam%3E listTeams()        %7B%0A                        Query query = emNba.createQuery(%22FROM org.jboss.as.quickstarts.hellosport.model.Team order by conference, 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.NBA)%0A        public List%3CPlayer%3E listTeam(@PathParam(%22teamId%22) int iTeamId)%0A        %7B%0A                Query query = emNba.createQuery(%22FROM org.jboss.as.quickstarts.hellosport.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        @Override%0A        public Class%3C? extends Annotation%3E annotationType() %7B%0A                // TODO Auto-generated method stub%0A                return null;%0A        %7D%0A        @Override%0A        public ServiceType value() %7B%0A                // TODO Auto-generated method stub%0A                return null;%0A        %7D%0A%7D%0A

Create NbaService.java