Was it a NamedQuery? If so can you show the actual named query?
Technically, you can use a QueryString parameter to provide query text, but that is a security hole and IMO should be avoided when other tools offer a reasonable alternative.
Take a look at this for more information: