openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pawel Veselov <pawel.vese...@gmail.com>
Subject Re: What is the type parameter, 'X' for?
Date Thu, 11 Apr 2013 20:38:07 GMT
On Thu, Apr 11, 2013 at 1:24 PM, Chris Wolf <cwolf.algo@gmail.com> wrote:

> ... in this interface?
>
> public interface OpenJPAQuery<X> extends TypedQuery<X>
>
> (an example would be good also)
>

X is the class of the objects that the query is supposed to return.

    TypedQuery<EAgent> agents =
            em.createNamedQuery(EAgent.GET_ALL, EAgent.class);
    for (EAgent agent : agents.getResultList()) {
      // have fun
    }

(sorry, I don't use OpenJPA classes directly)


>
> Thanks,
>
> Chris
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message