本文整理汇总了Java中org.dbunit.database.AmbiguousTableNameException类的典型用法代码示例。如果您正苦于以下问题:Java AmbiguousTableNameException类的具体用法?Java AmbiguousTableNameException怎么用?Java AmbiguousTableNameException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AmbiguousTableNameException类属于org.dbunit.database包,在下文中一共展示了AmbiguousTableNameException类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initialize
import org.dbunit.database.AmbiguousTableNameException; //导入依赖的package包/类
private void initialize(DataSource dataSource) throws AmbiguousTableNameException {
databaseTester = new DataSourceDatabaseTester(dataSource);
databaseTester.setSetUpOperation(DatabaseOperation.CLEAN_INSERT);
databaseTester.setTearDownOperation(DatabaseOperation.DELETE_ALL);
DefaultDataSet dataSet = new DefaultDataSet();
dataSet.addTable(new DefaultTable("agents"));
dataSet.addTable(new DefaultTable("pipelines"));
dataSet.addTable(new DefaultTable("pipelinestates"));
dataSet.addTable(new DefaultTable("materials"));
dataSet.addTable(new DefaultTable("modifications"));
dataSet.addTable(new DefaultTable("pipelineMaterialRevisions"));
dataSet.addTable(new DefaultTable("modifiedFiles"));
dataSet.addTable(new DefaultTable("notificationfilters"));
dataSet.addTable(new DefaultTable("users"));
dataSet.addTable(new DefaultTable("artifactPropertiesGenerator"));
dataSet.addTable(new DefaultTable("stages"));
dataSet.addTable(new DefaultTable("pipelineLabelCounts"));
dataSet.addTable(new DefaultTable("environmentVariables"));
dataSet.addTable(new DefaultTable("properties"));
dataSet.addTable(new DefaultTable("artifactPlans"));
dataSet.addTable(new DefaultTable("buildStateTransitions"));
dataSet.addTable(new DefaultTable("resources"));
dataSet.addTable(new DefaultTable("builds"));
dataSet.addTable(new DefaultTable("oauthclients"));
dataSet.addTable(new DefaultTable("oauthauthorizations"));
dataSet.addTable(new DefaultTable("oauthtokens"));
dataSet.addTable(new DefaultTable("stageArtifactCleanupProhibited"));
dataSet.addTable(new DefaultTable("serverBackups"));
dataSet.addTable(new DefaultTable("jobAgentMetadata"));
databaseTester.setDataSet(dataSet);
}
开发者ID:gocd,项目名称:gocd,代码行数:37,代码来源:DatabaseAccessHelper.java
示例2: addQueries
import org.dbunit.database.AmbiguousTableNameException; //导入依赖的package包/类
private void addQueries(final QueryDataSet dataSet) throws AmbiguousTableNameException {
if (queryList == null) {
return;
}
for (Object element : queryList) {
String query = (String) element;
Matcher m = TABLE_MATCH_PATTERN.matcher(query);
if (!m.matches()) {
logger.warn("Unable to parse query. Ignoring '" + query + "'.");
} else {
String table = m.group(1);
// only add if the table has not been added
if (tableList != null && tableList.contains(table)) {
logger.warn("Table '" + table + "' already added. Ignoring '" + query + "'.");
} else {
dataSet.addTable(table, query);
}
}
}
}
开发者ID:antoniomaria,项目名称:gazpachoquest,代码行数:21,代码来源:DBUnitDataExtractor.java
示例3: convert
import org.dbunit.database.AmbiguousTableNameException; //导入依赖的package包/类
/**
* データセットにコンバートする。
*
* @return データセット
*/
public IDataSet convert() {
if (list == null || list.isEmpty()) {
return new DefaultDataSet();
}
addTable();
try {
return new DefaultDataSet(tableMap.values().toArray(
new BeanListTable[tableMap.size()]));
} catch (AmbiguousTableNameException e) {
throw new DbUnitNGRuntimeException(e);
}
}
开发者ID:matsumana,项目名称:spring-doma-junit4-dbunit-sample,代码行数:20,代码来源:BeanListConverter.java
示例4: DatabaseAccessHelper
import org.dbunit.database.AmbiguousTableNameException; //导入依赖的package包/类
@Autowired
public DatabaseAccessHelper(DataSource dataSource,
SqlMapClient sqlMapClient,
StageDao stageDao,
JobInstanceDao jobInstanceDao,
PropertyDao propertyDao,
PipelineDao pipelineDao,
MaterialRepository materialRepository,
SessionFactory sessionFactory,
PipelineTimeline pipelineTimeline,
TransactionTemplate transactionTemplate,
TransactionSynchronizationManager transactionSynchronizationManager,
GoCache goCache,
PipelineService pipelineService, InstanceFactory instanceFactory,
JobAgentMetadataDao jobAgentMetadataDao) throws AmbiguousTableNameException {
this.dataSource = dataSource;
this.sqlMapClient = sqlMapClient;
this.stageDao = stageDao;
this.jobInstanceDao = jobInstanceDao;
this.propertyDao = propertyDao;
this.pipelineTimeline = pipelineTimeline;
this.transactionTemplate = transactionTemplate;
this.transactionSynchronizationManager = transactionSynchronizationManager;
this.goCache = goCache;
this.pipelineService = pipelineService;
this.instanceFactory = instanceFactory;
this.jobAgentMetadataDao = jobAgentMetadataDao;
this.pipelineDao = (PipelineSqlMapDao) pipelineDao;
this.materialRepository = materialRepository;
setSessionFactory(sessionFactory);
initialize(dataSource);
}
开发者ID:gocd,项目名称:gocd,代码行数:33,代码来源:DatabaseAccessHelper.java
示例5: getDatabaseDataSet
import org.dbunit.database.AmbiguousTableNameException; //导入依赖的package包/类
/**
* Produces a QueryDataSet for the database contents
*
* @param tester
* @param config
*
* @return
*
* @throws AmbiguousTableNameException
*/
@Provides
public IDataSet getDatabaseDataSet(HibernateDatabaseTester tester,
SessionFactory fac,
Configuration config) throws AmbiguousTableNameException
{
try
{
return tester.getConnection().createDataSet();
}
catch (SQLException e)
{
throw new RuntimeException("Failed to create dataset", e);
}
}
开发者ID:petergeneric,项目名称:stdlib,代码行数:25,代码来源:DbunitModule.java
示例6: addTables
import org.dbunit.database.AmbiguousTableNameException; //导入依赖的package包/类
private void addTables(final QueryDataSet dataSet) throws AmbiguousTableNameException {
if (tableList == null) {
return;
}
for (Object element : tableList) {
String table = (String) element;
dataSet.addTable(table);
}
}
开发者ID:antoniomaria,项目名称:gazpachoquest,代码行数:10,代码来源:DBUnitDataExtractor.java
示例7: performTableOrdering
import org.dbunit.database.AmbiguousTableNameException; //导入依赖的package包/类
private IDataSet performTableOrdering(DataSetConfig dataSet, IDataSet target) throws AmbiguousTableNameException {
if (dataSet.getTableOrdering().length > 0) {
target = new FilteredDataSet(new SequenceTableFilter(dataSet.getTableOrdering()), target);
}
return target;
}
开发者ID:database-rider,项目名称:database-rider,代码行数:7,代码来源:DataSetExecutorImpl.java
示例8: addTable
import org.dbunit.database.AmbiguousTableNameException; //导入依赖的package包/类
public void addTable(BeanTable table) throws AmbiguousTableNameException {
tables.add(table.getTableMetaData().getTableName(), table);
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:4,代码来源:BeanDataSet.java
示例9: FuWeStaSampleDataSet
import org.dbunit.database.AmbiguousTableNameException; //导入依赖的package包/类
/**
* Initiates an object of type FuWeStaSampleDataSet.
*
* @param dataSet the dataset.
* @throws AmbiguousTableNameException if multiple tables has the same name.
*/
public FuWeStaSampleDataSet(IDataSet dataSet)
throws AmbiguousTableNameException {
super(TABLE_NAMES, dataSet);
}
开发者ID:opensource21,项目名称:fuwesta,代码行数:11,代码来源:FuWeStaSampleDataSet.java
注:本文中的org.dbunit.database.AmbiguousTableNameException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论