INTERNAL:
// Set the location where we found this query.
setLocation(javaClass.getName());
// Process the name.
setName(namedQuery.name());
// Process the query string.
setEJBQLString(namedQuery.query());
// Process the query hints.
for (QueryHint hint : namedQuery.hints()) {
addHint(new MetadataQueryHint(hint.name(), hint.value()));
}