use of org.hibernate.boot.jaxb.mapping.spi.JaxbNamedQuery in project hibernate-orm by hibernate.
the class JPAXMLOverriddenAnnotationReader method buildNamedQueries.
public static List<NamedQuery> buildNamedQueries(List<JaxbNamedQuery> elements, XMLContext.Default defaults, ClassLoaderAccess classLoaderAccess) {
List<NamedQuery> namedQueries = new ArrayList<>();
for (JaxbNamedQuery element : elements) {
AnnotationDescriptor ann = new AnnotationDescriptor(NamedQuery.class);
copyAttribute(ann, "name", element.getName(), false);
copyAttribute(ann, "query", element.getQuery(), true);
buildQueryHints(element.getHint(), ann);
copyAttribute(ann, "lock-mode", element.getLockMode(), false);
namedQueries.add(AnnotationFactory.create(ann));
}
return namedQueries;
}
Aggregations