本文整理汇总了Java中org.dbunit.database.DatabaseSequenceFilter类的典型用法代码示例。如果您正苦于以下问题:Java DatabaseSequenceFilter类的具体用法?Java DatabaseSequenceFilter怎么用?Java DatabaseSequenceFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DatabaseSequenceFilter类属于org.dbunit.database包,在下文中一共展示了DatabaseSequenceFilter类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: run
import org.dbunit.database.DatabaseSequenceFilter; //导入依赖的package包/类
@Scheduled(cron = "0 0 3 * * *")
public void run() throws SQLException, DatabaseUnitException, IOException {
if (enable) {
log.info("begin backup database");
String bak = root + "/" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
ITableFilter filter = new DatabaseSequenceFilter(conn);
IDataSet dataSet = new FilteredDataSet(filter, conn.createDataSet());
//IDataSet dataSet = conn.createDataSet();
FlatXmlDataSet.write(dataSet, new FileOutputStream(bak + ".xml"));
FlatDtdDataSet.write(dataSet, new FileOutputStream(bak + ".dtd"));
log.info("end backup database");
}
}
开发者ID:chonglou,项目名称:itpkg,代码行数:19,代码来源:BackupJob.java
示例2: performSequenceFiltering
import org.dbunit.database.DatabaseSequenceFilter; //导入依赖的package包/类
private IDataSet performSequenceFiltering(DataSetConfig dataSet, IDataSet target)
throws DatabaseUnitException, SQLException {
if (dataSet.isUseSequenceFiltering()) {
ITableFilter filteredTable = new DatabaseSequenceFilter(getRiderDataSource().getDBUnitConnection(),
target.getTableNames());
target = new FilteredDataSet(filteredTable, target);
}
return target;
}
开发者ID:database-rider,项目名称:database-rider,代码行数:10,代码来源:DataSetExecutorImpl.java
示例3: DependencyAwareDataset
import org.dbunit.database.DatabaseSequenceFilter; //导入依赖的package包/类
public DependencyAwareDataset(IDataSet dataSet,
IDatabaseConnection databaseConnection) throws DataSetException,
SQLException {
DatabaseSequenceFilter databaseSequenceFilter = new DatabaseSequenceFilter(
databaseConnection);
this.dataSet = new FilteredDataSet(databaseSequenceFilter, dataSet);
}
开发者ID:link-intersystems,项目名称:maven,代码行数:9,代码来源:DependencyAwareDataset.java
示例4: printTableNames
import org.dbunit.database.DatabaseSequenceFilter; //导入依赖的package包/类
/**
* Print the tables in the order of the dependencies.
*
* @param conn the database-connection.
* @throws DataSetException error in the dataset.
* @throws SQLException error communicate with db.
*/
// //CSOFF: RegexpSinglelineJava It's only helper to dump something to
// console.
public static void printTableNames(IDatabaseConnection conn)
throws DataSetException, SQLException {
final ITableFilter filter = new DatabaseSequenceFilter(conn);
final ITableIterator tables =
filter.iterator(conn.createDataSet(), false);
System.out.println("########### Database tables");
while (tables.next()) {
System.out.print("\"" + tables.getTableMetaData().getTableName()
+ "\", ");
}
System.out.println();
}
开发者ID:opensource21,项目名称:fuwesta,代码行数:22,代码来源:FuWeStaSampleDataSet.java
注:本文中的org.dbunit.database.DatabaseSequenceFilter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论