Tabnine Logo
RepositoryFactorySupport.validate
Code IndexAdd Tabnine to your IDE (free)

How to use
validate
method
in
org.springframework.data.repository.core.support.RepositoryFactorySupport

Best Java code snippets using org.springframework.data.repository.core.support.RepositoryFactorySupport.validate (Showing top 4 results out of 315)

origin: org.springframework.data/spring-data-commons-core

/**
 * Validates the given repository interface as well as the given custom implementation.
 * 
 * @param repositoryInformation
 * @param customImplementation
 */
private void validate(RepositoryInformation repositoryInformation, Object customImplementation) {
  if (null == customImplementation && repositoryInformation.hasCustomMethod()) {
    throw new IllegalArgumentException(String.format(
        "You have custom methods in %s but not provided a custom implementation!",
        repositoryInformation.getRepositoryInterface()));
  }
  validate(repositoryInformation);
}
origin: apache/servicemix-bundles

/**
 * Validates the given repository interface as well as the given custom implementation.
 *
 * @param repositoryInformation
 * @param composition
 */
private void validate(RepositoryInformation repositoryInformation, RepositoryComposition composition) {
  if (repositoryInformation.hasCustomMethod()) {
    if (composition.isEmpty()) {
      throw new IllegalArgumentException(
          String.format("You have custom methods in %s but not provided a custom implementation!",
              repositoryInformation.getRepositoryInterface()));
    }
    composition.validateImplementation();
  }
  validate(repositoryInformation);
}
origin: org.springframework.data/spring-data-commons-core

/**
 * Returns a repository instance for the given interface backed by an instance providing implementation logic for
 * custom logic.
 * 
 * @param <T>
 * @param repositoryInterface
 * @param customImplementation
 * @return
 */
@SuppressWarnings({ "unchecked" })
public <T> T getRepository(Class<T> repositoryInterface, Object customImplementation) {
  RepositoryMetadata metadata = getRepositoryMetadata(repositoryInterface);
  Class<?> customImplementationClass = null == customImplementation ? null : customImplementation.getClass();
  RepositoryInformation information = getRepositoryInformation(metadata, customImplementationClass);
  validate(information, customImplementation);
  Object target = getTargetRepository(information);
  // Create proxy
  ProxyFactory result = new ProxyFactory();
  result.setTarget(target);
  result.setInterfaces(new Class[] { repositoryInterface, Repository.class });
  for (RepositoryProxyPostProcessor processor : postProcessors) {
    processor.postProcess(result);
  }
  result.addAdvice(new QueryExecutorMethodInterceptor(information, customImplementation, target));
  return (T) result.getProxy();
}
origin: apache/servicemix-bundles

RepositoryInformation information = getRepositoryInformation(metadata, composition);
validate(information, composition);
org.springframework.data.repository.core.supportRepositoryFactorySupportvalidate

Javadoc

Validates the given repository interface as well as the given custom implementation.

Popular methods of RepositoryFactorySupport

  • getRepositoryMetadata
    Returns the RepositoryMetadata for the given repository interface.
  • setBeanClassLoader
  • getRepository
    Returns a repository instance for the given interface backed by an instance providing implementation
  • getTargetRepositoryViaReflection
  • addRepositoryProxyPostProcessor
    Adds RepositoryProxyPostProcessors to the factory to allow manipulation of the ProxyFactory before t
  • getEntityInformation
    Returns the EntityInformation for the given domain class.
  • getQueryMethods
  • getRepositoryInformation
    Returns the RepositoryInformation for the given repository interface.
  • setNamedQueries
    Configures a NamedQueries instance to be handed to the QueryLookupStrategy for query creation.
  • setQueryLookupStrategyKey
    Sets the strategy of how to lookup a query to execute finders.
  • getQueryLookupStrategy
    Returns the QueryLookupStrategy for the given Key and QueryMethodEvaluationContextProvider.
  • getRepositoryBaseClass
    Returns the base class backing the actual repository instance. Make sure #getTargetRepository(Reposi
  • getQueryLookupStrategy,
  • getRepositoryBaseClass,
  • getTargetRepository,
  • setBeanFactory,
  • setEvaluationContextProvider,
  • setRepositoryBaseClass,
  • addQueryCreationListener,
  • getProjectionFactory,
  • getRepositoryComposition

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JLabel (javax.swing)
  • JOptionPane (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now