User defined JPQL macros

If there a way for me to define my own jpql macros?

Unfortunately it’s impossible because it requires changes in JPQL grammar, which currently can be made only in the framework.