當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。