当前位置: 首页>>代码示例>>Java>>正文


Java Bootstrap类代码示例

本文整理汇总了Java中org.hibernate.jpa.boot.spi.Bootstrap的典型用法代码示例。如果您正苦于以下问题:Java Bootstrap类的具体用法?Java Bootstrap怎么用?Java Bootstrap使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Bootstrap类属于org.hibernate.jpa.boot.spi包,在下文中一共展示了Bootstrap类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getEntityManagerFactoryBuilderOrNull

import org.hibernate.jpa.boot.spi.Bootstrap; //导入依赖的package包/类
@Override
   @SuppressWarnings("rawtypes")
   protected EntityManagerFactoryBuilder getEntityManagerFactoryBuilderOrNull(String persistenceUnitName,
    Map properties, ClassLoader providedClassLoader) {

EntityManagerFactoryBuilder builder;

LOG.tracef("Attempting to obtain correct EntityManagerFactoryBuilder for persistenceUnitName : %s",
	persistenceUnitName);

final Map integration = wrap(properties);
PersistenceUnitDescriptor persistenceUnit = getPersistenceXmlDescriptor(persistenceUnitName, properties,
	providedClassLoader);
if (persistenceUnit == null) {
    LOG.debug("Found no matching persistence units");
    builder = null;
} else {
    builder = Bootstrap.getEntityManagerFactoryBuilder(persistenceUnit, integration, providedClassLoader);
}

return builder;
   }
 
开发者ID:levants,项目名称:lightmare,代码行数:23,代码来源:HibernatePersistenceProviderExt.java

示例2: createContainerEntityManagerFactory

import org.hibernate.jpa.boot.spi.Bootstrap; //导入依赖的package包/类
/**
    * {@inheritDoc}
    * <p/>
    * Improved with transaction and data source swapping properties
    */
   @SuppressWarnings("rawtypes")
   @Override
   public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map properties) {

EntityManagerFactory emf;

LOG.tracef("Starting createContainerEntityManagerFactory : %s", info.getPersistenceUnitName());

PersistenceUnitDescriptor descriptor = getPersistenceUnitDescriptor(info);
emf = Bootstrap.getEntityManagerFactoryBuilder(descriptor, properties).build();

return emf;
   }
 
开发者ID:levants,项目名称:lightmare,代码行数:19,代码来源:HibernatePersistenceProviderExt.java

示例3: generateSchema

import org.hibernate.jpa.boot.spi.Bootstrap; //导入依赖的package包/类
/**
    * Generates schema from {@link PersistenceUnitInfo} instance
    */
   @SuppressWarnings("rawtypes")
   @Override
   public void generateSchema(PersistenceUnitInfo info, Map map) {
LOG.tracef("Starting generateSchema : PUI.name=%s", info.getPersistenceUnitName());

PersistenceUnitDescriptor descriptor = getPersistenceUnitDescriptor(info);
final EntityManagerFactoryBuilder builder = Bootstrap.getEntityManagerFactoryBuilder(descriptor, map);
builder.generateSchema();
   }
 
开发者ID:levants,项目名称:lightmare,代码行数:13,代码来源:HibernatePersistenceProviderExt.java

示例4: build

import org.hibernate.jpa.boot.spi.Bootstrap; //导入依赖的package包/类
private void build(List<Class> entities) {
    // Add new entities if not exists
    if (entities != null) {
        MutablePersistenceUnitInfo mutablePersistenceUnitInfo = (MutablePersistenceUnitInfo) info;
        for (Class entity : entities) {
            mutablePersistenceUnitInfo.addManagedClassName(entity.getName());
        }
    }
    entityManagerFactory = Bootstrap.getEntityManagerFactoryBuilder(info, properties).build();
}
 
开发者ID:exteso,项目名称:parkingfriends,代码行数:11,代码来源:JHipsterEntityManagerFactoryWrapper.java

示例5: TwoPhaseBootstrapImpl

import org.hibernate.jpa.boot.spi.Bootstrap; //导入依赖的package包/类
public TwoPhaseBootstrapImpl(final PersistenceUnitInfo info, final Map map) {
    entityManagerFactoryBuilder =
                Bootstrap.getEntityManagerFactoryBuilder(info, map);
}
 
开发者ID:jipijapa,项目名称:jipijapa,代码行数:5,代码来源:TwoPhaseBootstrapImpl.java


注:本文中的org.hibernate.jpa.boot.spi.Bootstrap类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。