Package org.hibernate.jpa.boot.internal

Examples of org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl


*/
public final class Bootstrap {
  public static EntityManagerFactoryBuilder getEntityManagerFactoryBuilder(
      PersistenceUnitDescriptor persistenceUnitDescriptor,
      Map integration) {
    return new EntityManagerFactoryBuilderImpl( persistenceUnitDescriptor, integration );
  }
View Full Code Here


  }
  public static EntityManagerFactoryBuilder getEntityManagerFactoryBuilder(
      PersistenceUnitDescriptor persistenceUnitDescriptor,
      Map integration,
      ClassLoader providedClassLoader) {
    return new EntityManagerFactoryBuilderImpl( persistenceUnitDescriptor, integration, providedClassLoader );
  }
View Full Code Here

  }

  public static EntityManagerFactoryBuilder getEntityManagerFactoryBuilder(
      PersistenceUnitDescriptor persistenceUnitDescriptor,
      Map integration) {
    return new EntityManagerFactoryBuilderImpl( persistenceUnitDescriptor, integration );
  }
View Full Code Here

  }
  public static EntityManagerFactoryBuilder getEntityManagerFactoryBuilder(
      PersistenceUnitDescriptor persistenceUnitDescriptor,
      Map integration,
      ClassLoader providedClassLoader) {
    return new EntityManagerFactoryBuilderImpl( persistenceUnitDescriptor, integration, providedClassLoader );
  }
View Full Code Here

class SpringHibernateJpaPersistenceProvider extends HibernatePersistenceProvider {

  @Override
  @SuppressWarnings("rawtypes")
  public EntityManagerFactory createContainerEntityManagerFactory(final PersistenceUnitInfo info, Map properties) {
    return new EntityManagerFactoryBuilderImpl(new PersistenceUnitInfoDescriptor(info), properties) {
      @Override
      public Configuration buildHibernateConfiguration(ServiceRegistry serviceRegistry) {
        Configuration configuration = super.buildHibernateConfiguration(serviceRegistry);
        if (info instanceof SmartPersistenceUnitInfo) {
          for (String managedPackage : ((SmartPersistenceUnitInfo) info).getManagedPackages()) {
View Full Code Here

        if (persistenceUnitInfo instanceof SmartPersistenceUnitInfo) {
            ((SmartPersistenceUnitInfo) persistenceUnitInfo).setPersistenceProviderPackageName(jpaVendorAdapter.getPersistenceProviderRootPackage());
        }

        EntityManagerFactoryBuilderImpl builder = (EntityManagerFactoryBuilderImpl) Bootstrap.getEntityManagerFactoryBuilder(persistenceUnitInfo,
                jpaPropertyMap, null);
        ServiceRegistry serviceRegistry = builder.buildServiceRegistry();
        Configuration configuration = builder.buildHibernateConfiguration(serviceRegistry);
        configuration.buildMappings();
        AuditConfiguration.getFor(configuration);
        return configuration;
    }
View Full Code Here

     * Build a Configuration object assuming the connection path is a hibernate XML configuration file.
     */
    protected Configuration buildConfigurationfromFile(HibernateConnection connection) {

        MyHibernatePersistenceProvider persistenceProvider = new MyHibernatePersistenceProvider();
        EntityManagerFactoryBuilderImpl builder = (EntityManagerFactoryBuilderImpl) persistenceProvider.getEntityManagerFactoryBuilderOrNull(connection.getPath(), null, null);
        ServiceRegistry serviceRegistry = builder.buildServiceRegistry();

        Configuration configuration = builder.buildHibernateConfiguration(serviceRegistry);
        configureNamingStrategy(configuration, connection);
        return configuration;
    }
View Full Code Here

        if (persistenceUnitInfo instanceof SmartPersistenceUnitInfo) {
            ((SmartPersistenceUnitInfo) persistenceUnitInfo).setPersistenceProviderPackageName(jpaVendorAdapter.getPersistenceProviderRootPackage());
        }

        EntityManagerFactoryBuilderImpl builder = (EntityManagerFactoryBuilderImpl) Bootstrap.getEntityManagerFactoryBuilder(persistenceUnitInfo,
                jpaPropertyMap);
        ServiceRegistry serviceRegistry = builder.buildServiceRegistry();
        return builder.buildHibernateConfiguration(serviceRegistry);

    }
View Full Code Here

TOP

Related Classes of org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.