Spring Data Commons

org.springframework.data.repository.config
Class DefaultRepositoryConfiguration<T extends RepositoryConfigurationSource>

java.lang.Object
  extended by org.springframework.data.repository.config.DefaultRepositoryConfiguration<T>
All Implemented Interfaces:
RepositoryConfiguration<T>

public class DefaultRepositoryConfiguration<T extends RepositoryConfigurationSource>
extends Object
implements RepositoryConfiguration<T>

Default implementation of RepositoryConfiguration.

Author:
Oliver Gierke

Constructor Summary
DefaultRepositoryConfiguration(T configurationSource, String interfaceName)
          Creates a new DefaultRepositoryConfiguration from the given RepositoryConfigurationSource and interface name.
 
Method Summary
 Iterable<String> getBasePackages()
          Returns the base packages that the repository was scanned under.
 String getBeanId()
          Returns the id of the BeanDefinition the repository shall be registered under.
 RepositoryConfigurationSource getConfigSource()
           
 T getConfigurationSource()
          Returns the RepositoryConfigurationSource that backs the RepositoryConfiguration.
 String getImplementationBeanName()
          Returns the bean name of the custom implementation.
 String getImplementationClassName()
          Returns the class name of the custom implementation.
 String getImplementationPostfix()
           
 String getNamedQueriesLocation()
          Returns the location of the file containing Spring Data named queries.
 Object getQueryLookupStrategyKey()
          Returns the key to resolve a QueryLookupStrategy from eventually.
 String getRepositoryFactoryBeanName()
          Returns the name of the FactoryBean class to be used to create repository instances.
 String getRepositoryInterface()
          Returns the interface name of the repository.
 Object getSource()
          Returns the source of the RepositoryConfiguration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRepositoryConfiguration

public DefaultRepositoryConfiguration(T configurationSource,
                                      String interfaceName)
Creates a new DefaultRepositoryConfiguration from the given RepositoryConfigurationSource and interface name.

Parameters:
configurationSource - must not be null.
interfaceName - must not be null or empty.
Method Detail

getBeanId

public String getBeanId()
Description copied from interface: RepositoryConfiguration
Returns the id of the BeanDefinition the repository shall be registered under.

Specified by:
getBeanId in interface RepositoryConfiguration<T extends RepositoryConfigurationSource>
Returns:

getQueryLookupStrategyKey

public Object getQueryLookupStrategyKey()
Description copied from interface: RepositoryConfiguration
Returns the key to resolve a QueryLookupStrategy from eventually.

Specified by:
getQueryLookupStrategyKey in interface RepositoryConfiguration<T extends RepositoryConfigurationSource>
Returns:
See Also:
QueryLookupStrategy.Key

getBasePackages

public Iterable<String> getBasePackages()
Description copied from interface: RepositoryConfiguration
Returns the base packages that the repository was scanned under.

Specified by:
getBasePackages in interface RepositoryConfiguration<T extends RepositoryConfigurationSource>
Returns:

getRepositoryInterface

public String getRepositoryInterface()
Description copied from interface: RepositoryConfiguration
Returns the interface name of the repository.

Specified by:
getRepositoryInterface in interface RepositoryConfiguration<T extends RepositoryConfigurationSource>
Returns:

getConfigSource

public RepositoryConfigurationSource getConfigSource()

getNamedQueriesLocation

public String getNamedQueriesLocation()
Description copied from interface: RepositoryConfiguration
Returns the location of the file containing Spring Data named queries.

Specified by:
getNamedQueriesLocation in interface RepositoryConfiguration<T extends RepositoryConfigurationSource>
Returns:

getImplementationClassName

public String getImplementationClassName()
Description copied from interface: RepositoryConfiguration
Returns the class name of the custom implementation.

Specified by:
getImplementationClassName in interface RepositoryConfiguration<T extends RepositoryConfigurationSource>
Returns:

getImplementationBeanName

public String getImplementationBeanName()
Description copied from interface: RepositoryConfiguration
Returns the bean name of the custom implementation.

Specified by:
getImplementationBeanName in interface RepositoryConfiguration<T extends RepositoryConfigurationSource>
Returns:

getImplementationPostfix

public String getImplementationPostfix()

getSource

public Object getSource()
Description copied from interface: RepositoryConfiguration
Returns the source of the RepositoryConfiguration.

Specified by:
getSource in interface RepositoryConfiguration<T extends RepositoryConfigurationSource>
Returns:

getConfigurationSource

public T getConfigurationSource()
Description copied from interface: RepositoryConfiguration
Returns the RepositoryConfigurationSource that backs the RepositoryConfiguration.

Specified by:
getConfigurationSource in interface RepositoryConfiguration<T extends RepositoryConfigurationSource>
Returns:

getRepositoryFactoryBeanName

public String getRepositoryFactoryBeanName()
Description copied from interface: RepositoryConfiguration
Returns the name of the FactoryBean class to be used to create repository instances.

Specified by:
getRepositoryFactoryBeanName in interface RepositoryConfiguration<T extends RepositoryConfigurationSource>
Returns:

Spring Data Commons

Copyright © 2012. All Rights Reserved.