GET Path id public Response readOne PathParam id Long id return crudHe

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@GET
@Path("/{id}")
public Response readOne(@PathParam("id") Long id) {
return crudHelper.readOne(roleFacade, id);
}
@PUT
@Path("/{id}")
public Response update(@PathParam("id") Long id, Role role) {
role.setId(id);
return crudHelper.update(roleFacade, role);
}
@POST
public Response create(Role role) {
return crudHelper.create(roleFacade, role);
}
@DELETE
@Path("/{id}")
public Response destroy(@PathParam("id") Long id) {
return crudHelper.destroy(roleFacade, id);
}
@GET
public Response read(@DefaultValue("10") @QueryParam("rpp") int rowsPerPage,
@DefaultValue("1") @QueryParam("page") int page) {
return crudHelper.read(roleFacade, rowsPerPage, page);
}