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