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

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

Best Java code snippets using org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory (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.supportPersistenceAnnotationBeanPostProcessorfindDefaultEntityManagerFactory

Javadoc

Find a single default EntityManagerFactory in the Spring application context.

Popular methods of PersistenceAnnotationBeanPostProcessor

  • <init>
  • buildPersistenceMetadata
  • findEntityManagerFactory
    Find an EntityManagerFactory with the given name in the current Spring application context, falling
  • findNamedEntityManagerFactory
    Find an EntityManagerFactory with the given name in the current Spring application context.
  • 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 post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Menu (java.awt)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Best plugins for Eclipse
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