/** * Creates a actual {@link RepositoryConfiguration} instance for the given {@link RepositoryConfigurationSource} and * interface name. Defaults to the {@link DefaultRepositoryConfiguration} but allows sub-classes to override this to * customize the behavior. * * @param definition will never be {@literal null} or empty. * @param configSource will never be {@literal null}. * @return */ protected <T extends RepositoryConfigurationSource> RepositoryConfiguration<T> getRepositoryConfiguration( BeanDefinition definition, T configSource) { return new DefaultRepositoryConfiguration<>(configSource, definition, this); }
public String getImplementationClassName() { return ClassUtils.getShortName(getRepositoryInterface()).concat( configurationSource.getRepositoryImplementationPostfix().orElse(DEFAULT_REPOSITORY_IMPLEMENTATION_POSTFIX)); }
@Override public ImplementationLookupConfiguration toLookupConfiguration(MetadataReaderFactory factory) { Assert.notNull(factory, "MetadataReaderFactory must not be null!"); return toImplementationDetectionConfiguration(factory).forRepositoryConfiguration(this); } }
public String getImplementationClassName() { return ClassUtils.getShortName(interfaceName) + getImplementationPostfix(); }
public String getImplementationBeanName() { return StringUtils.uncapitalize(getImplementationClassName()); }
public String getBeanId() { return StringUtils.uncapitalize(ClassUtils.getShortName(getRepositoryBaseClassName().orElseThrow( () -> new IllegalStateException("Can't create bean identifier without a repository base class defined!")))); }
@Override public Streamable<String> getImplementationBasePackages() { return Streamable.of(ClassUtils.getPackageName(getRepositoryInterface())); }
/** * Creates a actual {@link RepositoryConfiguration} instance for the given {@link RepositoryConfigurationSource} and * interface name. Defaults to the {@link DefaultRepositoryConfiguration} but allows sub-classes to override this to * customize the behaviour. * * @param interfaceName will never be {@literal null} or empty. * @param configSource will never be {@literal null}. * @return */ protected <T extends RepositoryConfigurationSource> RepositoryConfiguration<T> getRepositoryConfiguration( String interfaceName, T configSource) { return new DefaultRepositoryConfiguration<T>(configSource, interfaceName); } }