jsr338-experts@jpa-spec.java.net

[jsr338-experts] Re: JPQL <-> Criteria

From: Emmanuel Bernard <emmanuel.bernard_at_jboss.com>
Date: Thu, 28 Apr 2011 07:15:36 -0400

On 15 avr. 2011, at 09:37, Rainer Kwesi Schweigkoffer wrote:

> For dynamically amending a given named query one would wish an opposite
> method on TypedQuery as well. For appropriate typing we would probably
> need three of them
>
> CriteriaQuery<T> createCriteriaQuery();
> CriteriaDelete<T> createCriteriaDelete();
> CriteriaUpdate<T> createCriteriaUpdate();

Why on TypedQuery? CriteriaBase is not the symmetric of TypedQuery, it's counterpart is String.
Maybe we want to but these methods on some helper class.

Emmanuel