@Test(expected = NotYetImplementedException.class) public void testNoResultClass() { @NamedNativeQuery(name = "fubar", query = "SELECT * FROM FOO") class Foo { } Index index = JandexHelper.indexForClass( service, Foo.class ); QueryBinder.bind( new AnnotationBindingContextImpl( meta, index ) ); }
public static void bind(AnnotationBindingContext bindingContext) { List<AnnotationInstance> annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_NATIVE_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_NATIVE_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_NATIVE_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_NATIVE_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } } }
QueryBinder { public static void bind(AnnotationBindingContext bindingContext) { List<AnnotationInstance> annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_NATIVE_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_NATIVE_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_NATIVE_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_NATIVE_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } } } }
QueryBinder { public static void bind(AnnotationBindingContext bindingContext) { List<AnnotationInstance> annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_NATIVE_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_NATIVE_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_NATIVE_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_NATIVE_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } } } private  QueryBinder(); }
QueryBinder { public static void bind(AnnotationBindingContext bindingContext) { List<AnnotationInstance> annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_NATIVE_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_NATIVE_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_NATIVE_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_NATIVE_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } } } private  QueryBinder(); static void bind(AnnotationBindingContext bindingContext); }
QueryBinder { public static void bind(AnnotationBindingContext bindingContext) { List<AnnotationInstance> annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_NATIVE_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( JPADotNames.NAMED_NATIVE_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedQuery( bindingContext.getMetadataImplementor(), query ); } } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_NATIVE_QUERY ); for ( AnnotationInstance query : annotations ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.NAMED_NATIVE_QUERIES ); for ( AnnotationInstance queries : annotations ) { for ( AnnotationInstance query : JandexHelper.getValue( queries, "value", AnnotationInstance[].class ) ) { bindNamedNativeQuery( bindingContext.getMetadataImplementor(), query ); } } } private  QueryBinder(); static void bind(AnnotationBindingContext bindingContext);  }