@@ -320,16 +320,7 @@ public String getId() {
320
320
* @param repositoryType will never be {@literal null}.
321
321
* @return
322
322
*/
323
- protected T create (CreationalContext <T > creationalContext , Class <T > repositoryType ) {
324
-
325
- CdiRepositoryConfiguration cdiRepositoryConfiguration = lookupConfiguration (beanManager , qualifiers );
326
-
327
- Optional <Bean <?>> customImplementationBean = getCustomImplementationBean (repositoryType ,
328
- cdiRepositoryConfiguration );
329
- Optional <Object > customImplementation = customImplementationBean .map (this ::getDependencyInstance );
330
-
331
- return create (creationalContext , repositoryType , customImplementation );
332
- }
323
+ protected abstract T create (CreationalContext <T > creationalContext , Class <T > repositoryType );
333
324
334
325
/**
335
326
* Creates the actual component instance given a {@link RepositoryFactorySupport repository factory supplier} and the
@@ -415,24 +406,6 @@ private static Class<?> lookupFragmentInterface(Class<?> repositoryType, String
415
406
Arrays .asList (repositoryType .getInterfaces ()))));
416
407
}
417
408
418
- /**
419
- * Creates the actual component instance.
420
- *
421
- * @param creationalContext will never be {@literal null}.
422
- * @param repositoryType will never be {@literal null}.
423
- * @param customImplementation can be {@literal null}.
424
- * @return
425
- * @deprecated since 2.1, override {@link #create(CreationalContext, Class)} in which you create a repository factory
426
- * and call {@link #create(RepositoryFactorySupport, Class, RepositoryFragments)}.
427
- */
428
- @ Deprecated
429
- protected T create (CreationalContext <T > creationalContext , Class <T > repositoryType ,
430
- Optional <Object > customImplementation ) {
431
- throw new UnsupportedOperationException (
432
- "You have to implement create(CreationalContext<T>, Class<T>, Optional<Object>) "
433
- + "in order to use custom repository implementations" );
434
- }
435
-
436
409
/**
437
410
* Looks up an instance of a {@link CdiRepositoryConfiguration}. In case the instance cannot be found within the CDI
438
411
* scope, a default configuration is used.
0 commit comments