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


Java RepeatTestDataDef类代码示例

本文整理汇总了Java中org.insightech.er.editor.model.testdata.RepeatTestDataDef的典型用法代码示例。如果您正苦于以下问题:Java RepeatTestDataDef类的具体用法?Java RepeatTestDataDef怎么用?Java RepeatTestDataDef使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getRepeatTestDataDef

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
private RepeatTestDataDef getRepeatTestDataDef() {
    final RepeatTestDataDef dataDef = new RepeatTestDataDef();

    dataDef.setType(typeCombo.getText());
    dataDef.setRepeatNum(getIntValue(repeatNum));
    dataDef.setTemplate(template.getText());
    dataDef.setFrom(from.getText());
    dataDef.setTo(to.getText());
    dataDef.setIncrement(increment.getText());

    final String str = selects.getText();
    final BufferedReader reader = new BufferedReader(new StringReader(str));
    String line = null;
    final List<String> lines = new ArrayList<String>();

    try {
        while ((line = reader.readLine()) != null) {
            lines.add(line);
        }
    } catch (final IOException e) {}

    dataDef.setSelects(lines.toArray(new String[lines.size()]));

    return dataDef;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:26,代码来源:RepeatTestDataSettingDialog.java

示例2: setCardPanel

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
private void setCardPanel(final String selectedType) {
    if (RepeatTestDataDef.TYPE_FORMAT.equals(selectedType)) {
        stackLayout.topControl = templatePanel;
        repeatNumLabel.setVisible(true);
        repeatNum.setVisible(true);
        cardPanel.layout();

    } else if (RepeatTestDataDef.TYPE_FOREIGNKEY.equals(selectedType)) {
        stackLayout.topControl = foreignKeyPanel;
        repeatNumLabel.setVisible(true);
        repeatNum.setVisible(true);
        cardPanel.layout();

    } else if (RepeatTestDataDef.TYPE_ENUM.equals(selectedType)) {
        stackLayout.topControl = enumPanel;
        repeatNumLabel.setVisible(true);
        repeatNum.setVisible(true);
        cardPanel.layout();

    } else {
        stackLayout.topControl = nonePanel;
        repeatNumLabel.setVisible(false);
        repeatNum.setVisible(false);
        cardPanel.layout();
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:27,代码来源:RepeatTestDataSettingDialog.java

示例3: getMergedRepeatTestDataValue

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
public String getMergedRepeatTestDataValue(final int count, final RepeatTestDataDef repeatTestDataDef, final NormalColumn column) {
    final String modifiedValue = repeatTestDataDef.getModifiedValues().get(count);

    if (modifiedValue != null) {
        return modifiedValue;

    } else {
        final String value = getRepeatTestDataValue(count, repeatTestDataDef, column);

        if (value == null) {
            return "null";
        }

        return value;
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:17,代码来源:TestDataCreator.java

示例4: initTypeCombo

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
private void initTypeCombo() {
	this.typeCombo.add(RepeatTestDataDef
			.getTypeLabel(RepeatTestDataDef.TYPE_NULL));
	this.typeCombo.add(RepeatTestDataDef
			.getTypeLabel(RepeatTestDataDef.TYPE_FORMAT));

	normalColumn = table.getExpandedColumns().get(columnIndex);

	if (normalColumn.isForeignKey()) {
		this.typeCombo.add(RepeatTestDataDef
				.getTypeLabel(RepeatTestDataDef.TYPE_FOREIGNKEY));
	}

	this.typeCombo.add(RepeatTestDataDef
			.getTypeLabel(RepeatTestDataDef.TYPE_ENUM));
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:17,代码来源:RepeatTestDataSettingDialog.java

示例5: getRepeatTestDataDef

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
private RepeatTestDataDef getRepeatTestDataDef() {
	RepeatTestDataDef dataDef = new RepeatTestDataDef();

	dataDef.setType(this.typeCombo.getText());
	dataDef.setRepeatNum(this.getIntValue(this.repeatNum));
	dataDef.setTemplate(this.template.getText());
	dataDef.setFrom(this.from.getText());
	dataDef.setTo(this.to.getText());
	dataDef.setIncrement(this.increment.getText());

	String str = this.selects.getText();
	BufferedReader reader = new BufferedReader(new StringReader(str));
	String line = null;
	List<String> lines = new ArrayList<String>();

	try {
		while ((line = reader.readLine()) != null) {
			lines.add(line);
		}
	} catch (IOException e) {
	}

	dataDef.setSelects(lines.toArray(new String[lines.size()]));

	return dataDef;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:27,代码来源:RepeatTestDataSettingDialog.java

示例6: setCardPanel

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
private void setCardPanel(String selectedType) {
	if (RepeatTestDataDef.TYPE_FORMAT.equals(selectedType)) {
		stackLayout.topControl = templatePanel;
		this.repeatNumLabel.setVisible(true);
		this.repeatNum.setVisible(true);
		cardPanel.layout();

	} else if (RepeatTestDataDef.TYPE_FOREIGNKEY.equals(selectedType)) {
		stackLayout.topControl = foreignKeyPanel;
		this.repeatNumLabel.setVisible(true);
		this.repeatNum.setVisible(true);
		cardPanel.layout();

	} else if (RepeatTestDataDef.TYPE_ENUM.equals(selectedType)) {
		stackLayout.topControl = enumPanel;
		this.repeatNumLabel.setVisible(true);
		this.repeatNum.setVisible(true);
		cardPanel.layout();

	} else {
		stackLayout.topControl = nonePanel;
		this.repeatNumLabel.setVisible(false);
		this.repeatNum.setVisible(false);
		cardPanel.layout();
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:27,代码来源:RepeatTestDataSettingDialog.java

示例7: getMergedRepeatTestDataValue

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
public String getMergedRepeatTestDataValue(int count,
		RepeatTestDataDef repeatTestDataDef, NormalColumn column) {
	String modifiedValue = repeatTestDataDef.getModifiedValues().get(count);

	if (modifiedValue != null) {
		return modifiedValue;

	} else {
		String value = this.getRepeatTestDataValue(count,
				repeatTestDataDef, column);

		if (value == null) {
			return "null";
		}

		return value;
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:19,代码来源:TestDataCreator.java

示例8: initTypeCombo

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
private void initTypeCombo() {
    typeCombo.add(RepeatTestDataDef.getTypeLabel(RepeatTestDataDef.TYPE_NULL));
    typeCombo.add(RepeatTestDataDef.getTypeLabel(RepeatTestDataDef.TYPE_FORMAT));

    normalColumn = table.getExpandedColumns().get(columnIndex);

    if (normalColumn.isForeignKey()) {
        typeCombo.add(RepeatTestDataDef.getTypeLabel(RepeatTestDataDef.TYPE_FOREIGNKEY));
    }

    typeCombo.add(RepeatTestDataDef.getTypeLabel(RepeatTestDataDef.TYPE_ENUM));
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:13,代码来源:RepeatTestDataSettingDialog.java

示例9: writeRepeatTestData

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
@Override
protected void writeRepeatTestData(final ERTable table, final RepeatTestData repeatTestData, final String database) {
    final StringBuilder sb = new StringBuilder();

    for (int i = 0; i < repeatTestData.getTestDataNum(); i++) {
        sb.append("\t<");
        sb.append(table.getNameWithSchema(database));

        for (final NormalColumn column : table.getExpandedColumns()) {
            final RepeatTestDataDef repeatTestDataDef = repeatTestData.getDataDef(column);

            final String value = getMergedRepeatTestDataValue(i, repeatTestDataDef, column);

            if (value != null && !"null".equals(value.toLowerCase())) {
                sb.append(" ");
                sb.append(column.getPhysicalName());
                sb.append("=\"");

                sb.append(PersistentXmlImpl.escape(value));
                sb.append("\"");
            }
        }

        sb.append("/>\r\n");
    }

    out.print(sb.toString());
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:29,代码来源:DBUnitFlatXmlTestDataCreator.java

示例10: writeRepeatTestData

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
@Override
protected void writeRepeatTestData(final ERTable table, final RepeatTestData repeatTestData, final String database) {
    final StringBuilder sb = new StringBuilder();

    for (int i = 0; i < repeatTestData.getTestDataNum(); i++) {
        sb.append("\t\t<row>\r\n");

        for (final NormalColumn column : table.getExpandedColumns()) {

            final RepeatTestDataDef repeatTestDataDef = repeatTestData.getDataDef(column);

            final String value = getMergedRepeatTestDataValue(i, repeatTestDataDef, column);

            if (value == null || "null".equals(value.toLowerCase())) {
                sb.append("\t\t\t<null/>\r\n");

            } else {
                sb.append("\t\t\t<value>");
                sb.append(PersistentXmlImpl.escape(value));
                sb.append("</value>\r\n");

            }
        }

        sb.append("\t\t</row>\r\n");
    }

    out.print(sb.toString());
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:30,代码来源:DBUnitTestDataCreator.java

示例11: createXML

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
private String createXML(final RepeatTestDataDef repeatTestDataDef, final NormalColumn column, final PersistentContext context) {
    final StringBuilder xml = new StringBuilder();

    final String columnId = context.columnMap.get(column);

    if (columnId != null) {
        xml.append("<data_def>\n");
        xml.append("\t<column_id>").append(columnId).append("</column_id>\n");
        xml.append("\t<type>").append(escape(repeatTestDataDef.getType())).append("</type>\n");
        xml.append("\t<repeat_num>").append(Format.toString((repeatTestDataDef.getRepeatNum()))).append("</repeat_num>\n");
        xml.append("\t<template>").append(escape(repeatTestDataDef.getTemplate())).append("</template>\n");
        xml.append("\t<from>").append(Format.toString((repeatTestDataDef.getFrom()))).append("</from>\n");
        xml.append("\t<to>").append(Format.toString((repeatTestDataDef.getTo()))).append("</to>\n");
        xml.append("\t<increment>").append(Format.toString((repeatTestDataDef.getIncrement()))).append("</increment>\n");
        for (final String select : repeatTestDataDef.getSelects()) {
            xml.append("\t<select>").append(escape(select)).append("</select>\n");
        }
        xml.append("\t<modified_values>\n");
        for (final Integer modifiedRow : repeatTestDataDef.getModifiedValues().keySet()) {
            xml.append("\t\t<modified_value>\n");
            xml.append("\t\t\t<row>").append(modifiedRow).append("</row>\n");
            xml.append("\t\t\t<value>").append(escape(repeatTestDataDef.getModifiedValues().get(modifiedRow))).append("</value>\n");
            xml.append("\t\t</modified_value>\n");
        }
        xml.append("\t</modified_values>\n");

        xml.append("</data_def>\n");
    }

    return xml.toString();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:32,代码来源:PersistentXmlImpl.java

示例12: writeRepeatTestData

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
@Override
protected void writeRepeatTestData(ERTable table,
		RepeatTestData repeatTestData, String database) {

	for (int i = 0; i < repeatTestData.getTestDataNum(); i++) {
		HSSFRow row = this.sheet.createRow(this.rowNum++);

		int col = 0;

		for (NormalColumn column : table.getExpandedColumns()) {
			HSSFCell cell = row.createCell(col++);

			RepeatTestDataDef repeatTestDataDef = repeatTestData
					.getDataDef(column);

			String value = this.getMergedRepeatTestDataValue(i,
					repeatTestDataDef, column);

			if (value == null || "null".equals(value.toLowerCase())) {

			} else {
				cell.setCellValue(new HSSFRichTextString(value));
			}
		}
	}

}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:28,代码来源:DBUnitXLSTestDataCreator.java

示例13: writeRepeatTestData

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
@Override
protected void writeRepeatTestData(ERTable table,
		RepeatTestData repeatTestData, String database) {
	StringBuilder sb = new StringBuilder();

	for (int i = 0; i < repeatTestData.getTestDataNum(); i++) {
		sb.append("\t<");
		sb.append(table.getNameWithSchema(database));

		for (NormalColumn column : table.getExpandedColumns()) {
			RepeatTestDataDef repeatTestDataDef = repeatTestData
					.getDataDef(column);

			String value = this.getMergedRepeatTestDataValue(i,
					repeatTestDataDef, column);

			if (value != null && !"null".equals(value.toLowerCase())) {
				sb.append(" ");
				sb.append(column.getPhysicalName());
				sb.append("=\"");

				sb.append(PersistentXmlImpl.escape(value));
				sb.append("\"");
			}
		}

		sb.append("/>\r\n");
	}

	out.print(sb.toString());
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:32,代码来源:DBUnitFlatXmlTestDataCreator.java

示例14: writeRepeatTestData

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
@Override
protected void writeRepeatTestData(ERTable table,
		RepeatTestData repeatTestData, String database) {
	StringBuilder sb = new StringBuilder();

	for (int i = 0; i < repeatTestData.getTestDataNum(); i++) {
		sb.append("\t\t<row>\r\n");

		for (NormalColumn column : table.getExpandedColumns()) {

			RepeatTestDataDef repeatTestDataDef = repeatTestData
					.getDataDef(column);

			String value = this.getMergedRepeatTestDataValue(i,
					repeatTestDataDef, column);

			if (value == null || "null".equals(value.toLowerCase())) {
				sb.append("\t\t\t<null/>\r\n");

			} else {
				sb.append("\t\t\t<value>");
				sb.append(PersistentXmlImpl.escape(value));
				sb.append("</value>\r\n");

			}
		}

		sb.append("\t\t</row>\r\n");
	}

	out.print(sb.toString());
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:33,代码来源:DBUnitTestDataCreator.java

示例15: setRepeatTestDataDef

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //导入依赖的package包/类
public void setRepeatTestDataDef(final NormalColumn column, final RepeatTestDataDef repeatTestDataDef) {
    repeatTestData.setDataDef(column, repeatTestDataDef);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:4,代码来源:RepeatTestDataTabWrapper.java


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