Tabnine Logo
PersistenceAnnotationBeanPostProcessor.findNamedEntityManagerFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
findNamedEntityManagerFactory
method
in
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor

Best Java code snippets using org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findNamedEntityManagerFactory (Showing top 3 results out of 315)

origin: spring-projects/spring-framework

/**
 * Find an EntityManagerFactory with the given name in the current Spring
 * application context, falling back to a single default EntityManagerFactory
 * (if any) in case of no unit name specified.
 * @param unitName the name of the persistence unit (may be {@code null} or empty)
 * @param requestingBeanName the name of the requesting bean
 * @return the EntityManagerFactory
 * @throws NoSuchBeanDefinitionException if there is no such EntityManagerFactory in the context
 */
protected EntityManagerFactory findEntityManagerFactory(@Nullable String unitName, @Nullable String requestingBeanName)
    throws NoSuchBeanDefinitionException {
  String unitNameForLookup = (unitName != null ? unitName : "");
  if (unitNameForLookup.isEmpty()) {
    unitNameForLookup = this.defaultPersistenceUnitName;
  }
  if (!unitNameForLookup.isEmpty()) {
    return findNamedEntityManagerFactory(unitNameForLookup, requestingBeanName);
  }
  else {
    return findDefaultEntityManagerFactory(requestingBeanName);
  }
}
origin: org.springframework/spring-orm

/**
 * Find an EntityManagerFactory with the given name in the current Spring
 * application context, falling back to a single default EntityManagerFactory
 * (if any) in case of no unit name specified.
 * @param unitName the name of the persistence unit (may be {@code null} or empty)
 * @param requestingBeanName the name of the requesting bean
 * @return the EntityManagerFactory
 * @throws NoSuchBeanDefinitionException if there is no such EntityManagerFactory in the context
 */
protected EntityManagerFactory findEntityManagerFactory(@Nullable String unitName, @Nullable String requestingBeanName)
    throws NoSuchBeanDefinitionException {
  String unitNameForLookup = (unitName != null ? unitName : "");
  if (unitNameForLookup.isEmpty()) {
    unitNameForLookup = this.defaultPersistenceUnitName;
  }
  if (!unitNameForLookup.isEmpty()) {
    return findNamedEntityManagerFactory(unitNameForLookup, requestingBeanName);
  }
  else {
    return findDefaultEntityManagerFactory(requestingBeanName);
  }
}
origin: apache/servicemix-bundles

/**
 * Find an EntityManagerFactory with the given name in the current Spring
 * application context, falling back to a single default EntityManagerFactory
 * (if any) in case of no unit name specified.
 * @param unitName the name of the persistence unit (may be {@code null} or empty)
 * @param requestingBeanName the name of the requesting bean
 * @return the EntityManagerFactory
 * @throws NoSuchBeanDefinitionException if there is no such EntityManagerFactory in the context
 */
protected EntityManagerFactory findEntityManagerFactory(@Nullable String unitName, @Nullable String requestingBeanName)
    throws NoSuchBeanDefinitionException {
  String unitNameForLookup = (unitName != null ? unitName : "");
  if (unitNameForLookup.isEmpty()) {
    unitNameForLookup = this.defaultPersistenceUnitName;
  }
  if (!unitNameForLookup.isEmpty()) {
    return findNamedEntityManagerFactory(unitNameForLookup, requestingBeanName);
  }
  else {
    return findDefaultEntityManagerFactory(requestingBeanName);
  }
}
org.springframework.orm.jpa.supportPersistenceAnnotationBeanPostProcessorfindNamedEntityManagerFactory

Javadoc

Find an EntityManagerFactory with the given name in the current Spring application context.

Popular methods of PersistenceAnnotationBeanPostProcessor

  • <init>
  • buildPersistenceMetadata
  • findDefaultEntityManagerFactory
    Find a single default EntityManagerFactory in the Spring application context.
  • findEntityManagerFactory
    Find an EntityManagerFactory with the given name in the current Spring application context, falling
  • findPersistenceMetadata
  • getPersistenceContext
    Return a specified persistence context for the given unit name, as defined through the "persistenceC
  • getPersistenceUnit
    Return a specified persistence unit for the given unit name, as defined through the "persistenceUnit
  • lookup
    Perform a JNDI lookup for the given resource by name.Called for EntityManagerFactory and EntityManag
  • postProcessProperties
  • postProcessMergedBeanDefinition
  • setDefaultPersistenceUnitName
    Specify the default persistence unit name, to be used in case of no unit name specified in an @Persi
  • setExtendedPersistenceContexts
    Specify the extended persistence contexts for EntityManager lookups, as a Map from persistence unit
  • setDefaultPersistenceUnitName,
  • setExtendedPersistenceContexts,
  • setJndiTemplate,
  • setPersistenceContexts,
  • setPersistenceUnits

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • setScale (BigDecimal)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Table (org.hibernate.mapping)
    A relational table
  • From CI to AI: The AI layer in your organization
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