Last active
September 21, 2018 15:32
-
-
Save eldermoraes/819bba169688a5c949b7f51123462209 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Stateless | |
@Path("playerRankHistory") | |
public class PlayerRankHistoryService { | |
@EJB | |
private PlayerRankHistoryBean rankBean; | |
@GET | |
@Path("findById/{id}") | |
public Response findById(@PathParam("id") Long id){ | |
return Response.ok(rankBean.findById(id)).build(); | |
} | |
@GET | |
@Path("findAll") | |
public Response findAll(){ | |
return Response.ok(rankBean.findAll()).build(); | |
} | |
@POST | |
public Response save(PlayerRankHistory rank){ | |
rankBean.save(rank); | |
return Response.accepted().build(); | |
} | |
@DELETE | |
public Response remove(PlayerRankHistory rank){ | |
rankBean.remove(rank); | |
return Response.accepted().build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment