title: Using REST how to bind a value as a parameter
body: <p>I want to implement REST calls in a web application. I took a look at the different available frameworks to achieve that. It seems JBoss Resteasy provides what I need:</p>
  
  <pre><code>@GET
      @Path("book/{id}/comments")
      public Collection&lt;Comment&gt; getComments(@PathParam("id") String bookId);
  </code></pre>
  
  <p>What I would like would be something like:</p>
  
  <pre><code>@GET
      @Path("book/{id}/comments")
      public Collection&lt;Comment&gt; getComments(@PathParam("id") **Book** bookId);
  </code></pre>
  
  <p>So instead of receiving a String I would be interested in binding directly the value. Meaning if my Book extends a AbstractEntity class, it would directly do the findById in the database. </p>
  
  <p>I used to achieve this with Spring MVC by using Custom Conversion Services that would do the findById directly. Is there such functionality in RestEasy, or any other REST framework?</p>
  
  <p>Thanks!</p>