Hmm i just found the
Criteria Queriesin the hibernate documentation.
Maybe this is already the answer to the question?
Despite that, i'm thankful to any hint!
Framework components like EntityQuery use generics all the time, so I do not understand where you want to modify anything. In your own beans you are free to use generics with your queries. It is EJBQL that takes responsibility for retrieving popper data types.