@Test public void testFetchProfiles() { Index index = JandexHelper.indexForClass( service, FooBar.class ); FetchProfileBinder.bind( new AnnotationBindingContextImpl( meta, index ) ); Iterator<org.hibernate.metamodel.binding.FetchProfile> mappedFetchProfiles = meta.getFetchProfiles().iterator(); assertTrue( mappedFetchProfiles.hasNext() ); org.hibernate.metamodel.binding.FetchProfile profile = mappedFetchProfiles.next(); assertProfiles( profile ); assertTrue( mappedFetchProfiles.hasNext() ); profile = mappedFetchProfiles.next(); assertProfiles( profile ); }
public static void bind(AnnotationBindingContext bindingContext) { List<AnnotationInstance> annotations = bindingContext.getIndex() .getAnnotations( HibernateDotNames.FETCH_PROFILE ); for ( AnnotationInstance fetchProfile : annotations ) { bind( bindingContext.getMetadataImplementor(), fetchProfile ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.FETCH_PROFILES ); for ( AnnotationInstance fetchProfiles : annotations ) { AnnotationInstance[] fetchProfileAnnotations = JandexHelper.getValue( fetchProfiles, "value", AnnotationInstance[].class ); for ( AnnotationInstance fetchProfile : fetchProfileAnnotations ) { bind( bindingContext.getMetadataImplementor(), fetchProfile ); } } }
FetchProfileBinder { public static void bind(AnnotationBindingContext bindingContext) { List<AnnotationInstance> annotations = bindingContext.getIndex() .getAnnotations( HibernateDotNames.FETCH_PROFILE ); for ( AnnotationInstance fetchProfile : annotations ) { bind( bindingContext.getMetadataImplementor(), fetchProfile ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.FETCH_PROFILES ); for ( AnnotationInstance fetchProfiles : annotations ) { AnnotationInstance[] fetchProfileAnnotations = JandexHelper.getValue( fetchProfiles, "value", AnnotationInstance[].class ); for ( AnnotationInstance fetchProfile : fetchProfileAnnotations ) { bind( bindingContext.getMetadataImplementor(), fetchProfile ); } } } }
FetchProfileBinder { public static void bind(AnnotationBindingContext bindingContext) { List<AnnotationInstance> annotations = bindingContext.getIndex() .getAnnotations( HibernateDotNames.FETCH_PROFILE ); for ( AnnotationInstance fetchProfile : annotations ) { bind( bindingContext.getMetadataImplementor(), fetchProfile ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.FETCH_PROFILES ); for ( AnnotationInstance fetchProfiles : annotations ) { AnnotationInstance[] fetchProfileAnnotations = JandexHelper.getValue( fetchProfiles, "value", AnnotationInstance[].class ); for ( AnnotationInstance fetchProfile : fetchProfileAnnotations ) { bind( bindingContext.getMetadataImplementor(), fetchProfile ); } } } private  FetchProfileBinder(); }
FetchProfileBinder { public static void bind(AnnotationBindingContext bindingContext) { List<AnnotationInstance> annotations = bindingContext.getIndex() .getAnnotations( HibernateDotNames.FETCH_PROFILE ); for ( AnnotationInstance fetchProfile : annotations ) { bind( bindingContext.getMetadataImplementor(), fetchProfile ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.FETCH_PROFILES ); for ( AnnotationInstance fetchProfiles : annotations ) { AnnotationInstance[] fetchProfileAnnotations = JandexHelper.getValue( fetchProfiles, "value", AnnotationInstance[].class ); for ( AnnotationInstance fetchProfile : fetchProfileAnnotations ) { bind( bindingContext.getMetadataImplementor(), fetchProfile ); } } } private  FetchProfileBinder(); static void bind(AnnotationBindingContext bindingContext); }
FetchProfileBinder { public static void bind(AnnotationBindingContext bindingContext) { List<AnnotationInstance> annotations = bindingContext.getIndex() .getAnnotations( HibernateDotNames.FETCH_PROFILE ); for ( AnnotationInstance fetchProfile : annotations ) { bind( bindingContext.getMetadataImplementor(), fetchProfile ); } annotations = bindingContext.getIndex().getAnnotations( HibernateDotNames.FETCH_PROFILES ); for ( AnnotationInstance fetchProfiles : annotations ) { AnnotationInstance[] fetchProfileAnnotations = JandexHelper.getValue( fetchProfiles, "value", AnnotationInstance[].class ); for ( AnnotationInstance fetchProfile : fetchProfileAnnotations ) { bind( bindingContext.getMetadataImplementor(), fetchProfile ); } } } private  FetchProfileBinder(); static void bind(AnnotationBindingContext bindingContext);  }