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

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

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

origin: com.blazebit/blaze-persistence-integration-spring-data

/**
 * Delegates {@link RepositoryFactorySupport} creation to {@link #doCreateRepositoryFactory()} and applies the
 * {@link TransactionalRepositoryProxyPostProcessor} to the created instance.
 *
 * @see BlazeRepositoryFactoryBeanSupport #createRepositoryFactory()
 */
@Override
protected final RepositoryFactorySupport createRepositoryFactory() {
  RepositoryFactorySupport factory = doCreateRepositoryFactory();
  factory.addRepositoryProxyPostProcessor(exceptionPostProcessor);
  factory.addRepositoryProxyPostProcessor(txPostProcessor);
  return factory;
}
origin: apache/servicemix-bundles

/**
 * Delegates {@link RepositoryFactorySupport} creation to {@link #doCreateRepositoryFactory()} and applies the
 * {@link TransactionalRepositoryProxyPostProcessor} to the created instance.
 *
 * @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport #createRepositoryFactory()
 */
@Override
protected final RepositoryFactorySupport createRepositoryFactory() {
  RepositoryFactorySupport factory = doCreateRepositoryFactory();
  RepositoryProxyPostProcessor exceptionPostProcessor = this.exceptionPostProcessor;
  if (exceptionPostProcessor != null) {
    factory.addRepositoryProxyPostProcessor(exceptionPostProcessor);
  }
  RepositoryProxyPostProcessor txPostProcessor = this.txPostProcessor;
  if (txPostProcessor != null) {
    factory.addRepositoryProxyPostProcessor(txPostProcessor);
  }
  return factory;
}
origin: org.springframework.data/spring-data-commons-core

/**
 * Delegates {@link RepositoryFactorySupport} creation to {@link #doCreateRepositoryFactory()} and applies the
 * {@link TransactionalRepositoryProxyPostProcessor} to the created instance.
 * 
 * @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport #createRepositoryFactory()
 */
@Override
protected final RepositoryFactorySupport createRepositoryFactory() {
  RepositoryFactorySupport factory = doCreateRepositoryFactory();
  factory.addRepositoryProxyPostProcessor(txPostProcessor);
  return factory;
}
origin: com.blazebit/blaze-persistence-integration-spring-data

public void afterPropertiesSet() {
  this.factory = createRepositoryFactory();
  this.factory.setQueryLookupStrategyKey(queryLookupStrategyKey);
  this.factory.setNamedQueries(namedQueries);
  this.factory.setEvaluationContextProvider(evaluationContextProvider);
  this.factory.setRepositoryBaseClass(repositoryBaseClass);
  this.factory.setBeanClassLoader(classLoader);
  this.factory.setBeanFactory(beanFactory);
  if (publisher != null) {
    RepositoryProxyPostProcessor repositoryProxyPostProcessor = null;
    try {
      repositoryProxyPostProcessor = (RepositoryProxyPostProcessor) Class.forName("org.springframework.data.repository.core.support.EventPublishingRepositoryProxyPostProcessor").getConstructor(ApplicationEventPublisher.class).newInstance(publisher);
    } catch (Exception e) {
      // ignore
    }
    if (repositoryProxyPostProcessor != null) {
      this.factory.addRepositoryProxyPostProcessor(repositoryProxyPostProcessor);
    }
  }
  this.repositoryMetadata = this.factory.getRepositoryMetadata(repositoryInterface);
  if (!lazyInit) {
    initAndReturn();
  }
}
origin: apache/servicemix-bundles

public void afterPropertiesSet() {
  this.factory = createRepositoryFactory();
  this.factory.setQueryLookupStrategyKey(queryLookupStrategyKey);
  this.factory.setNamedQueries(namedQueries);
  this.factory.setEvaluationContextProvider(
      evaluationContextProvider.orElseGet(() -> QueryMethodEvaluationContextProvider.DEFAULT));
  this.factory.setBeanClassLoader(classLoader);
  this.factory.setBeanFactory(beanFactory);
  if (publisher != null) {
    this.factory.addRepositoryProxyPostProcessor(new EventPublishingRepositoryProxyPostProcessor(publisher));
  }
  repositoryBaseClass.ifPresent(this.factory::setRepositoryBaseClass);
  RepositoryFragments customImplementationFragment = customImplementation //
      .map(RepositoryFragments::just) //
      .orElseGet(RepositoryFragments::empty);
  RepositoryFragments repositoryFragmentsToUse = this.repositoryFragments //
      .orElseGet(RepositoryFragments::empty) //
      .append(customImplementationFragment);
  this.repositoryMetadata = this.factory.getRepositoryMetadata(repositoryInterface);
  // Make sure the aggregate root type is present in the MappingContext (e.g. for auditing)
  this.mappingContext.ifPresent(it -> it.getPersistentEntity(repositoryMetadata.getDomainType()));
  this.repository = Lazy.of(() -> this.factory.getRepository(repositoryInterface, repositoryFragmentsToUse));
  if (!lazyInit) {
    this.repository.get();
  }
}
org.springframework.data.repository.core.supportRepositoryFactorySupportaddRepositoryProxyPostProcessor

Javadoc

Adds RepositoryProxyPostProcessors to the factory to allow manipulation of the ProxyFactory before the proxy gets created. Note that the QueryExecutorMethodInterceptor will be added to the proxy after the RepositoryProxyPostProcessors are considered.

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
  • 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.
  • getRepositoryBaseClass
    Returns the base class backing the actual repository instance. Make sure #getTargetRepository(Reposi
  • getTargetRepository
    Create a repository instance as backing for the query proxy.
  • getRepositoryBaseClass,
  • getTargetRepository,
  • setBeanFactory,
  • setEvaluationContextProvider,
  • setRepositoryBaseClass,
  • validate,
  • addQueryCreationListener,
  • getProjectionFactory,
  • getRepositoryComposition

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • JOptionPane (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • CodeWhisperer alternatives
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