コード例 #1
0
 @Path("/count")
 @GET
 public Response count(@Auth AuthModelT authModel, @Context HttpServletRequest request)
     throws HttpCodeException {
   long count = man.count(getContext(authModel));
   if (count < 0) {
     throw new HttpInternalServerErrorException(
         "Could not retrieve count for " + modelClass.getSimpleName());
   }
   return res().success(res().rawData("count", count));
 }