title: Are there any classes that implement javax.persistence.Parameter<T>?
body: <p>I'm using named queries to fetch entities from a database using JPA and Hibernate and I came across something that was puzzling me: how come there a no default implementations of the <code>javax.persistence.Parameter</code> interface?</p>
  
  <p>I was rather impressed by how <code>@StaticMetamodel</code> is used by CriteriaBuilder in JPA2 meaning that I get Type safety and don't have to mess around with setting string for names. I wanted to apply something similar to some of the JPA1 EJB's that I'm currently working on:</p>
  
  <pre><code>Dealergroup_.class:
  public Dealergroup_ 
  {
    public Parameter&lt;Integer&gt; id  = new ParameterImpl&lt;Integer&gt;("id");
    /// etc...
  }
  
  DealergroupFacade.class:
  // ...
  public Dealergroup fetch(Integer id)
  {
    TypedQuery&lt;Dealergroup&gt; query = em.createNamedQuery("Dealergroup.fetchById", Dealergroup.class);
    query.setParameter(Dealergroup_.id, query);
    return query.getSingleResult();
  }
  // ...
  </code></pre>
  
  <p>I was surprised to find that there were no implementations of the Parameter interface - of course, I could easily implement it myself by their absence makes me suspicious that it may be a mistake to be using it in this way?</p>
  
  <p>Should I be implementing Parameter? Any ideas why there isn't a readily available implementation and why I can't find many (any, really) examples of its use?</p>