code: @GET
      @Path("/{id}")
      @Produces(MediaType.APPLICATION_JSON)
      public C getAny(@PathParam("id") Long inId, @Context HttpServletRequest req) {
          E entity = this.dao.retrieve(inId);
          if (entity == null) {
              throw new HttpStatusException(Response.Status.NOT_FOUND);
          } else if (isAuthorizedEntity(entity, req) && (!isRestricted() || req.isUserInRole("admin"))) {
              return toComm(entity, req);
          } else {
              throw new HttpStatusException(Response.Status.NOT_FOUND);
          }
      }
docs: Gets the object with the given unique identifier.
  
  @param inId the unique identifier. Cannot be <code>null</code>.
  @param req the HTTP servlet request.
  @return  the object with the given unique identifier. Guaranteed not
  <code>null</code>.
  
  @throws HttpStatusException if there is no object with the given
  unique identifier, or if the user is not authorized to access the
  object.