HQL « Eclipse « JPA Q&A

1. HQL to JPQL question    stackoverflow.com

What is the translation of the following HQL query to EclipseLink compliant JPQL :

select p from NameList list, Person p
where p.name in elements(list.names)
(this is just a variation of a HQL example ...

2. Indexed element access in JPQL    stackoverflow.com

Is it possible to do indexed element access in JPQL like in HQL :

select o from Order o where o.items[0].id = 1234
I couldn't find something related in the JPA ...

3. Casts in JPQL with EclipseLink    stackoverflow.com

Is it possible to use casts in JPQL? In HQL it seems to be supported

cast(... as ...), where the second argument is the name of a Hibernate ...