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


Java TaskExecutionDao类代码示例

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


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

示例1: SimpleTaskRepository

import org.springframework.cloud.task.repository.dao.TaskExecutionDao; //导入依赖的package包/类
public SimpleTaskRepository(FactoryBean<TaskExecutionDao> taskExecutionDaoFactoryBean, Integer maxExitMessageSize,
		Integer maxTaskNameSize, Integer maxErrorMessageSize){
	Assert.notNull(taskExecutionDaoFactoryBean, "A FactoryBean that provides a TaskExecutionDao is required");
	if(maxTaskNameSize != null) {
		this.maxTaskNameSize = maxTaskNameSize;
	}
	if(maxExitMessageSize != null) {
		this.maxExitMessageSize = maxExitMessageSize;
	}
	if(maxErrorMessageSize != null) {
		this.maxErrorMessageSize = maxErrorMessageSize;
	}
	this.taskExecutionDaoFactoryBean = taskExecutionDaoFactoryBean;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:15,代码来源:SimpleTaskRepository.java

示例2: getObject

import org.springframework.cloud.task.repository.dao.TaskExecutionDao; //导入依赖的package包/类
@Override
public TaskExecutionDao getObject() throws Exception {
	if(this.dao == null) {
		if (this.dataSource != null) {
			buildTaskExecutionDao(this.dataSource);
		}
		else {
			this.dao = new MapTaskExecutionDao();
		}
	}

	return this.dao;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:14,代码来源:TaskExecutionDaoFactoryBean.java

示例3: testMapTaskExecutionDaoWithoutAppContext

import org.springframework.cloud.task.repository.dao.TaskExecutionDao; //导入依赖的package包/类
@Test
public void testMapTaskExecutionDaoWithoutAppContext() throws Exception {
	TaskExecutionDaoFactoryBean factoryBean = new TaskExecutionDaoFactoryBean();
	TaskExecutionDao taskExecutionDao = factoryBean.getObject();

	assertTrue(taskExecutionDao instanceof MapTaskExecutionDao);

	TaskExecutionDao taskExecutionDao2 = factoryBean.getObject();

	assertTrue(taskExecutionDao == taskExecutionDao2);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:12,代码来源:TaskExecutionDaoFactoryBeanTests.java

示例4: testSettingTablePrefix

import org.springframework.cloud.task.repository.dao.TaskExecutionDao; //导入依赖的package包/类
@Test
public void testSettingTablePrefix() throws Exception {
	this.context = new AnnotationConfigApplicationContext(DefaultDataSourceConfiguration.class);

	DataSource dataSource = this.context.getBean(DataSource.class);

	TaskExecutionDaoFactoryBean factoryBean = new TaskExecutionDaoFactoryBean(dataSource, "foo_");
	TaskExecutionDao taskExecutionDao = factoryBean.getObject();

	assertEquals("foo_", ReflectionTestUtils.getField(taskExecutionDao, "tablePrefix"));
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:12,代码来源:TaskExecutionDaoFactoryBeanTests.java

示例5: getTaskExecutionDao

import org.springframework.cloud.task.repository.dao.TaskExecutionDao; //导入依赖的package包/类
/**
 * Retrieves the taskExecutionDao associated with this repository.
 * @return the taskExecutionDao
 */
public TaskExecutionDao getTaskExecutionDao() {
	initialize();
	return taskExecutionDao;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:9,代码来源:SimpleTaskRepository.java

示例6: getObjectType

import org.springframework.cloud.task.repository.dao.TaskExecutionDao; //导入依赖的package包/类
@Override
public Class<?> getObjectType() {
	return TaskExecutionDao.class;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:5,代码来源:TaskExecutionDaoFactoryBean.java

示例7: testGetObjectType

import org.springframework.cloud.task.repository.dao.TaskExecutionDao; //导入依赖的package包/类
@Test
public void testGetObjectType() {
	assertEquals(new TaskExecutionDaoFactoryBean().getObjectType(), TaskExecutionDao.class);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:5,代码来源:TaskExecutionDaoFactoryBeanTests.java

示例8: testDefaultDataSourceConfiguration

import org.springframework.cloud.task.repository.dao.TaskExecutionDao; //导入依赖的package包/类
@Test
public void testDefaultDataSourceConfiguration() throws Exception {
	this.context = new AnnotationConfigApplicationContext(DefaultDataSourceConfiguration.class);

	DataSource dataSource = this.context.getBean(DataSource.class);

	TaskExecutionDaoFactoryBean factoryBean = new TaskExecutionDaoFactoryBean(dataSource);
	TaskExecutionDao taskExecutionDao = factoryBean.getObject();

	assertTrue(taskExecutionDao instanceof JdbcTaskExecutionDao);

	TaskExecutionDao taskExecutionDao2 = factoryBean.getObject();

	assertTrue(taskExecutionDao == taskExecutionDao2);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:16,代码来源:TaskExecutionDaoFactoryBeanTests.java


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