|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.repository.config.RepositoryConfigurationExtensionSupport
public abstract class RepositoryConfigurationExtensionSupport
Base implementation of RepositoryConfigurationExtension to ease the implementation of the interface. Will
default the default named query location based on a module prefix provided by implementors (see
getModulePrefix()). Stubs out the post-processing methods as they might not be needed by default.
| Field Summary | |
|---|---|
protected static String |
REPOSITORY_INTERFACE_POST_PROCESSOR
|
| Constructor Summary | |
|---|---|
RepositoryConfigurationExtensionSupport()
|
|
| Method Summary | ||
|---|---|---|
String |
getDefaultNamedQueryLocation()
Returns the default location of the Spring Data named queries. |
|
protected abstract String |
getModulePrefix()
Returns the prefix of the module to be used to create the default location for Spring Data named queries. |
|
protected
|
getRepositoryConfiguration(String interfaceName,
T configSource)
Creates a actual RepositoryConfiguration instance for the given RepositoryConfigurationSource and
interface name. |
|
|
getRepositoryConfigurations(T configSource,
org.springframework.core.io.ResourceLoader loader)
Returns all RepositoryConfigurations obtained through the given RepositoryConfigurationSource. |
|
static boolean |
hasBean(Class<?> type,
org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
Returns whether the given BeanDefinitionRegistry already contains a bean of the given type assuming the
bean name has been autogenerated. |
|
void |
postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
AnnotationRepositoryConfigurationSource config)
Callback to post process the BeanDefinition built from annotations and tweak the configuration if
necessary. |
|
void |
postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
XmlRepositoryConfigurationSource config)
Callback to post process the BeanDefinition built from XML and tweak the configuration if necessary. |
|
void |
registerBeansForRoot(org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
RepositoryConfigurationSource configurationSource)
Callback to register additional bean definitions for a repositories root node. |
|
static String |
registerWithSourceAndGeneratedBeanName(org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
org.springframework.beans.factory.support.AbstractBeanDefinition bean,
Object source)
Sets the given source on the given AbstractBeanDefinition and registers it inside the given
BeanDefinitionRegistry. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.data.repository.config.RepositoryConfigurationExtension |
|---|
getRepositoryFactoryClassName |
| Field Detail |
|---|
protected static final String REPOSITORY_INTERFACE_POST_PROCESSOR
| Constructor Detail |
|---|
public RepositoryConfigurationExtensionSupport()
| Method Detail |
|---|
public <T extends RepositoryConfigurationSource> Collection<RepositoryConfiguration<T>> getRepositoryConfigurations(T configSource,
org.springframework.core.io.ResourceLoader loader)
RepositoryConfigurationExtensionRepositoryConfigurations obtained through the given RepositoryConfigurationSource.
getRepositoryConfigurations in interface RepositoryConfigurationExtensionconfigSource - must not be null.loader - must not be null.
public String getDefaultNamedQueryLocation()
RepositoryConfigurationExtension
getDefaultNamedQueryLocation in interface RepositoryConfigurationExtension
public void registerBeansForRoot(org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
RepositoryConfigurationSource configurationSource)
RepositoryConfigurationExtension
registerBeansForRoot in interface RepositoryConfigurationExtensionprotected abstract String getModulePrefix()
public void postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
AnnotationRepositoryConfigurationSource config)
RepositoryConfigurationExtensionBeanDefinition built from annotations and tweak the configuration if
necessary.
postProcess in interface RepositoryConfigurationExtensionbuilder - will never be null.config - will never be null.
public void postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
XmlRepositoryConfigurationSource config)
RepositoryConfigurationExtensionBeanDefinition built from XML and tweak the configuration if necessary.
postProcess in interface RepositoryConfigurationExtensionbuilder - will never be null.config - will never be null.
public static String registerWithSourceAndGeneratedBeanName(org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
org.springframework.beans.factory.support.AbstractBeanDefinition bean,
Object source)
AbstractBeanDefinition and registers it inside the given
BeanDefinitionRegistry.
registry - bean - source -
public static boolean hasBean(Class<?> type,
org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
BeanDefinitionRegistry already contains a bean of the given type assuming the
bean name has been autogenerated.
type - registry -
protected <T extends RepositoryConfigurationSource> RepositoryConfiguration<T> getRepositoryConfiguration(String interfaceName,
T configSource)
RepositoryConfiguration instance for the given RepositoryConfigurationSource and
interface name. Defaults to the DefaultRepositoryConfiguration but allows sub-classes to override this to
customize the behaviour.
interfaceName - will never be null or empty.configSource - will never be null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||