本文整理汇总了Java中org.unitils.orm.jpa.annotation.JpaEntityManagerFactory类的典型用法代码示例。如果您正苦于以下问题:Java JpaEntityManagerFactory类的具体用法?Java JpaEntityManagerFactory怎么用?Java JpaEntityManagerFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JpaEntityManagerFactory类属于org.unitils.orm.jpa.annotation包,在下文中一共展示了JpaEntityManagerFactory类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDatabaseName
import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
/**
* @see org.unitils.orm.common.OrmModule#getDatabaseName(java.lang.Object, java.lang.reflect.Method)
*/
@Override
protected void getDatabaseName(Object testObject, Method testMethod) {
JpaEntityManagerFactory dataSource = AnnotationUtils.getMethodOrClassLevelAnnotation(JpaEntityManagerFactory.class, testMethod, testObject.getClass());
if (dataSource != null) {
wrappers.add(getDatabaseModule().getWrapper(dataSource.databaseName()));
}
Set<JpaEntityManagerFactory> lstDataSources = AnnotationUtils.getFieldLevelAnnotations(testObject.getClass(), JpaEntityManagerFactory.class);
if (!lstDataSources.isEmpty()) {
for (JpaEntityManagerFactory testDataSource : lstDataSources) {
wrappers.add(getDatabaseModule().getWrapper(testDataSource.databaseName()));
}
}
}
示例2: getCustomConfigMethod
import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
/**
* @param testClass The test class, not null
* @return The test class's custom configuration method, if any
*/
protected Method getCustomConfigMethod(Class<?> testClass) {
Set<Method> annotatedMethods = AnnotationUtils.getMethodsAnnotatedWith(testClass, JpaEntityManagerFactory.class);
for (Method annotatedMethod : annotatedMethods) {
if (isCustomConfigMethod(annotatedMethod)) {
return annotatedMethod;
}
}
return null;
}
示例3: getPersistenceUnitConfigAnnotationClass
import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
@Override
protected Class<JpaEntityManagerFactory> getPersistenceUnitConfigAnnotationClass() {
return JpaEntityManagerFactory.class;
}
示例4: JpaAnnotationConfigLoader
import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
public JpaAnnotationConfigLoader() {
super(JpaEntityManagerFactory.class);
}
示例5: isConfiguringAnnotation
import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
protected boolean isConfiguringAnnotation(JpaEntityManagerFactory annotation) {
return !"".equals(annotation.persistenceUnit());
}
示例6: createResourceConfig
import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
protected JpaConfig createResourceConfig(JpaEntityManagerFactory configuringAnnotation, Method customConfigMethod) {
return new JpaConfig(configuringAnnotation.persistenceUnit(), configuringAnnotation.configFile(), customConfigMethod);
}
示例7: setSessionFactorySetter
import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
@JpaEntityManagerFactory
public void setSessionFactorySetter(EntityManagerFactory entityManagerSetter) {
this.entityManagerSetter = entityManagerSetter;
}
示例8: setEntityManagerSetter
import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
@JpaEntityManagerFactory
public void setEntityManagerSetter(EntityManagerFactory entityManagerSetter) {
this.entityManagerSetter = entityManagerSetter;
}
示例9: customInitializer
import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
@JpaEntityManagerFactory
public void customInitializer(LocalContainerEntityManagerFactoryBean factoryBean) {
customInitializerCalled = true;
}