private static Map<String, JdoNamedQuery> catalogNamedQueries(Set<String> persistableClassNames) {
final Map<String, JdoNamedQuery> namedQueryByName = Maps.newHashMap();
for (final String persistableClassName: persistableClassNames) {
final ObjectSpecification spec = IsisContext.getSpecificationLoader().loadSpecification(persistableClassName);
final JdoQueryFacet facet = spec.getFacet(JdoQueryFacet.class);
if (facet == null) {
continue;
}
for (final JdoNamedQuery namedQuery : facet.getNamedQueries()) {
namedQueryByName.put(namedQuery.getName(), namedQuery);
}
}
return namedQueryByName;
}