appMetadata.addQueryToCollection(ann.name(), ann.query(), false, clazz);
}
if (clazz.isAnnotationPresent(NamedQueries.class))
{
NamedQueries ann = (NamedQueries) clazz.getAnnotation(NamedQueries.class);
NamedQuery[] anns = ann.value();
for (NamedQuery a : anns)
{
appMetadata.addQueryToCollection(a.name(), a.query(), false, clazz);
}
}
if (clazz.isAnnotationPresent(NamedNativeQuery.class))
{
NamedNativeQuery ann = (NamedNativeQuery) clazz.getAnnotation(NamedNativeQuery.class);
appMetadata.addQueryToCollection(ann.name(), ann.query(), true, clazz);
}
if (clazz.isAnnotationPresent(NamedNativeQueries.class))
{
NamedNativeQueries ann = (NamedNativeQueries) clazz.getAnnotation(NamedNativeQueries.class);
NamedNativeQuery[] anns = ann.value();
for (NamedNativeQuery a : anns)
{
appMetadata.addQueryToCollection(a.name(), a.query(), true, clazz);
}
}