DATACMNS-1591 - Polishing.
Add since tags. Reorder methods. Use method references where possible. Original pull request: #410.
This commit is contained in:
@@ -161,7 +161,7 @@ public class DefaultRepositoryConfiguration<T extends RepositoryConfigurationSou
|
||||
public String getRepositoryFactoryBeanClassName() {
|
||||
|
||||
return configurationSource.getRepositoryFactoryBeanClassName()
|
||||
.orElseGet(() -> extension.getRepositoryFactoryBeanClassName());
|
||||
.orElseGet(extension::getRepositoryFactoryBeanClassName);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -173,6 +173,15 @@ public class DefaultRepositoryConfiguration<T extends RepositoryConfigurationSou
|
||||
return definition.isLazyInit() || !configurationSource.getBootstrapMode().equals(BootstrapMode.DEFAULT);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfiguration#isPrimary()
|
||||
*/
|
||||
@Override
|
||||
public boolean isPrimary() {
|
||||
return definition.isPrimary();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfiguration#getExcludeFilters()
|
||||
@@ -205,13 +214,4 @@ public class DefaultRepositoryConfiguration<T extends RepositoryConfigurationSou
|
||||
|
||||
return toImplementationDetectionConfiguration(factory).forRepositoryConfiguration(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfiguration#isPrimary()
|
||||
*/
|
||||
@Override
|
||||
public boolean isPrimary() {
|
||||
return definition.isPrimary();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +106,14 @@ public interface RepositoryConfiguration<T extends RepositoryConfigurationSource
|
||||
*/
|
||||
boolean isLazyInit();
|
||||
|
||||
/**
|
||||
* Returns whether the repository is the primary one for its type.
|
||||
*
|
||||
* @return {@literal true} whether the repository is the primary one for its type.
|
||||
* @since 2.3
|
||||
*/
|
||||
boolean isPrimary();
|
||||
|
||||
/**
|
||||
* Returns the {@link TypeFilter}s to be used to exclude packages from repository scanning.
|
||||
*
|
||||
@@ -131,10 +139,4 @@ public interface RepositoryConfiguration<T extends RepositoryConfigurationSource
|
||||
*/
|
||||
ImplementationLookupConfiguration toLookupConfiguration(MetadataReaderFactory factory);
|
||||
|
||||
/**
|
||||
* Returns whether the repository is the primary one for its type.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isPrimary();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user