gpt4 book ai didi

org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer类的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 05:49:31 25 4
gpt4 key购买 nike

本文整理了Java中org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer类的一些代码示例,展示了YamlDataSetProducer类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlDataSetProducer类的具体详情如下:
包路径:org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer
类名称:YamlDataSetProducer

YamlDataSetProducer介绍

[英]Produces YAML data set from the given file.
[中]从给定文件生成YAML数据集。

代码示例

代码示例来源:origin: org.jboss.arquillian.extension/arquillian-persistence-impl

public YamlDataSet(InputStream inputStream, boolean caseSensitiveTableNames) throws DataSetException
{
 this(new YamlDataSetProducer(inputStream), caseSensitiveTableNames);
}

代码示例来源:origin: arquillian/arquillian-extension-persistence

@Override
public void produce() throws DataSetException {
  consumer.startDataSet();
  @SuppressWarnings("unchecked") final List<Table> tables =
    createTables((Map<String, List<Map<String, String>>>) createYamlReader().load(input));
  for (Table table : tables) {
    ITableMetaData tableMetaData = createTableMetaData(table);
    consumer.startTable(tableMetaData);
    for (Row row : table.getRows()) {
      List<String> values = new ArrayList<String>();
      for (Column column : tableMetaData.getColumns()) {
        values.add(row.valueOf(column.getColumnName()));
      }
      consumer.row(values.toArray());
    }
    consumer.endTable();
  }
  consumer.endDataSet();
}

代码示例来源:origin: org.jboss.arquillian.extension/arquillian-persistence-dbunit

private List<Table> createTables(Map<String, List<Map<String, String>>> yamlStructure)
{
 List<Table> tables = new ArrayList<Table>();
 for (Map.Entry<String, List<Map<String, String>>> entry : yamlStructure.entrySet())
 {
   Table table = new Table(entry.getKey());
   table.addColumns(extractColumns(entry.getValue()));
   table.addRows(extractRows(entry.getValue()));
   tables.add(table);
 }
 return tables;
}

代码示例来源:origin: org.jboss.arquillian.extension/arquillian-persistence-dbunit

private ITableMetaData createTableMetaData(Table table)
{
 return new DefaultTableMetaData(table.getTableName(), createColumns(table.getColumns()));
}

代码示例来源:origin: org.jboss.arquillian.extension/arquillian-persistence-dbunit

@Override
public void produce() throws DataSetException
{
 consumer.startDataSet();
 @SuppressWarnings("unchecked")
 final List<Table> tables = createTables((Map<String, List<Map<String, String>>>) createYamlReader().load(input));
 for (Table table : tables)
 {
   ITableMetaData tableMetaData = createTableMetaData(table);
   consumer.startTable(tableMetaData);
   for (Row row : table.getRows())
   {
    List<String> values = new ArrayList<String>();
    for (Column column : tableMetaData.getColumns())
    {
      values.add(row.valueOf(column.getColumnName()));
    }
    consumer.row(values.toArray());
   }
   consumer.endTable();
 }
 consumer.endDataSet();
}

代码示例来源:origin: org.jboss.arquillian.extension/arquillian-persistence-impl

private List<Table> createTables(Map<String, List<Map<String, String>>> yamlStructure)
{
 List<Table> tables = new ArrayList<Table>();
 for (Map.Entry<String, List<Map<String, String>>> entry : yamlStructure.entrySet())
 {
   Table table = new Table(entry.getKey());
   table.addColumns(extractColumns(entry.getValue()));
   table.addRows(extractRows(entry.getValue()));
   tables.add(table);
 }
 return tables;
}

代码示例来源:origin: org.jboss.arquillian.extension/arquillian-persistence-impl

private ITableMetaData createTableMetaData(Table table)
{
 return new DefaultTableMetaData(table.getTableName(), createColumns(table.getColumns()));
}

代码示例来源:origin: org.jboss.arquillian.extension/arquillian-persistence-impl

@Override
public void produce() throws DataSetException
{
 consumer.startDataSet();
 @SuppressWarnings("unchecked")
 final List<Table> tables = createTables((Map<String, List<Map<String, String>>>) createYamlReader().load(input));
 for (Table table : tables)
 {
   ITableMetaData tableMetaData = createTableMetaData(table);
   consumer.startTable(tableMetaData);
   for (Row row : table.getRows())
   {
    List<String> values = new ArrayList<String>();
    for (Column column : tableMetaData.getColumns())
    {
      values.add(row.valueOf(column.getColumnName()));
    }
    consumer.row(values.toArray());
   }
   consumer.endTable();
 }
 consumer.endDataSet();
}

代码示例来源:origin: arquillian/arquillian-extension-persistence

private List<Table> createTables(Map<String, List<Map<String, String>>> yamlStructure) {
  final List<Table> tables = new ArrayList<Table>();
  for (Map.Entry<String, List<Map<String, String>>> entry : yamlStructure.entrySet()) {
    Table table = new Table(entry.getKey());
    table.addColumns(extractColumns(entry.getValue()));
    table.addRows(extractRows(entry.getValue()));
    tables.add(table);
  }
  return tables;
}

代码示例来源:origin: org.jboss.arquillian.extension/arquillian-persistence-dbunit

public YamlDataSet(InputStream inputStream, boolean caseSensitiveTableNames) throws DataSetException
{
 this(new YamlDataSetProducer(inputStream), caseSensitiveTableNames);
}

代码示例来源:origin: arquillian/arquillian-extension-persistence

private ITableMetaData createTableMetaData(Table table) {
  return new DefaultTableMetaData(table.getTableName(), createColumns(table.getColumns()));
}

代码示例来源:origin: arquillian/arquillian-extension-persistence

public YamlDataSet(InputStream inputStream, boolean caseSensitiveTableNames) throws DataSetException {
    this(new YamlDataSetProducer(inputStream), caseSensitiveTableNames);
  }
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com