本文整理汇总了Java中org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder方法的典型用法代码示例。如果您正苦于以下问题:Java Bootstrap.getEntityManagerFactoryBuilder方法的具体用法?Java Bootstrap.getEntityManagerFactoryBuilder怎么用?Java Bootstrap.getEntityManagerFactoryBuilder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hibernate.jpa.boot.spi.Bootstrap
的用法示例。
在下文中一共展示了Bootstrap.getEntityManagerFactoryBuilder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: 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();
}
示例3: TwoPhaseBootstrapImpl
import org.hibernate.jpa.boot.spi.Bootstrap; //导入方法依赖的package包/类
public TwoPhaseBootstrapImpl(final PersistenceUnitInfo info, final Map map) {
entityManagerFactoryBuilder =
Bootstrap.getEntityManagerFactoryBuilder(info, map);
}