private NamedStoredProcedureQueries getNamedStoredProcedureQueries(Element tree, XMLContext.Default defaults) {
List<NamedStoredProcedureQuery> queries = buildNamedStoreProcedureQueries( tree, defaults );
if ( defaults.canUseJavaAnnotations() ) {
NamedStoredProcedureQuery annotation = getJavaAnnotation( NamedStoredProcedureQuery.class );
addNamedStoredProcedureQueryIfNeeded( annotation, queries );
NamedStoredProcedureQueries annotations = getJavaAnnotation( NamedStoredProcedureQueries.class );
if ( annotations != null ) {
for ( NamedStoredProcedureQuery current : annotations.value() ) {
addNamedStoredProcedureQueryIfNeeded( current, queries );
}
}
}
if ( queries.size() > 0 ) {