Class JpaUtil

java.lang.Object
africa.absa.inception.jpa.JpaUtil

public class JpaUtil extends Object
The JpaUtil class provides JPA-related utility methods.
Author:
Marcus Portmann
  • Constructor Details

    • JpaUtil

      public JpaUtil()
  • Method Details

    • createEntityManager

      public static org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean createEntityManager(String persistenceUnitName, DataSource dataSource, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, String... packagesToScan)
      Create a new entity manager.
      Parameters:
      persistenceUnitName - the name of the persistence unit
      dataSource - the data source
      platformTransactionManager - the Spring platform transaction manager
      packagesToScan - the packages to scan for entities
      Returns:
      the entity manager