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


Java JpaEntityManagerFactory类代码示例

本文整理汇总了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()));
        }
    } 
}
 
开发者ID:linux-china,项目名称:unitils,代码行数:19,代码来源:JpaModule.java

示例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;
}
 
开发者ID:linux-china,项目名称:unitils,代码行数:14,代码来源:AnnotationConfigLoader.java

示例3: getPersistenceUnitConfigAnnotationClass

import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
@Override
protected Class<JpaEntityManagerFactory> getPersistenceUnitConfigAnnotationClass() {
	return JpaEntityManagerFactory.class;
}
 
开发者ID:linux-china,项目名称:unitils,代码行数:5,代码来源:JpaModule.java

示例4: JpaAnnotationConfigLoader

import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
public JpaAnnotationConfigLoader() {
	super(JpaEntityManagerFactory.class);
}
 
开发者ID:linux-china,项目名称:unitils,代码行数:4,代码来源:JpaAnnotationConfigLoader.java

示例5: isConfiguringAnnotation

import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
protected boolean isConfiguringAnnotation(JpaEntityManagerFactory annotation) {
	return !"".equals(annotation.persistenceUnit());
}
 
开发者ID:linux-china,项目名称:unitils,代码行数:4,代码来源:JpaAnnotationConfigLoader.java

示例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);
}
 
开发者ID:linux-china,项目名称:unitils,代码行数:4,代码来源:JpaAnnotationConfigLoader.java

示例7: setSessionFactorySetter

import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
@JpaEntityManagerFactory
public void setSessionFactorySetter(EntityManagerFactory entityManagerSetter) {
    this.entityManagerSetter = entityManagerSetter;
}
 
开发者ID:linux-china,项目名称:unitils,代码行数:5,代码来源:JpaModuleInjectionTest.java

示例8: setEntityManagerSetter

import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
@JpaEntityManagerFactory
public void setEntityManagerSetter(EntityManagerFactory entityManagerSetter) {
    this.entityManagerSetter = entityManagerSetter;
}
 
开发者ID:linux-china,项目名称:unitils,代码行数:5,代码来源:JpaModuleInjectionTest.java

示例9: customInitializer

import org.unitils.orm.jpa.annotation.JpaEntityManagerFactory; //导入依赖的package包/类
@JpaEntityManagerFactory
public void customInitializer(LocalContainerEntityManagerFactoryBean factoryBean) {
    customInitializerCalled = true;
}
 
开发者ID:linux-china,项目名称:unitils,代码行数:5,代码来源:JpaModuleInjectionTest.java


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