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


Java Format.toString方法代码示例

本文整理汇总了Java中org.insightech.er.util.Format.toString方法的典型用法代码示例。如果您正苦于以下问题:Java Format.toString方法的具体用法?Java Format.toString怎么用?Java Format.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.insightech.er.util.Format的用法示例。


在下文中一共展示了Format.toString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setData

import org.insightech.er.util.Format; //导入方法依赖的package包/类
@Override
protected void setData() {
    if (sequence != null) {
        nameText.setText(Format.toString(sequence.getName()));
        schemaText.setText(Format.toString(sequence.getSchema()));
        incrementText.setText(Format.toString(sequence.getIncrement()));
        if (minValueText != null) {
            minValueText.setText(Format.toString(sequence.getMinValue()));
        }
        if (maxValueText != null) {
            maxValueText.setText(Format.toString(sequence.getMaxValue()));
        }
        if (startText != null) {
            startText.setText(Format.toString(sequence.getStart()));
        }
        if (cacheText != null) {
            cacheText.setText(Format.toString(sequence.getCache()));
        }
        if (nocacheCheckBox != null) {
            nocacheCheckBox.setSelection(sequence.isNocache());
        }
        if (cycleCheckBox != null) {
            cycleCheckBox.setSelection(sequence.isCycle());
        }
        if (orderCheckBox != null) {
            orderCheckBox.setSelection(sequence.isOrder());
        }

        descriptionText.setText(Format.toString(sequence.getDescription()));

        if (dataTypeCombo != null) {
            final String dataType = Format.toString(sequence.getDataType());
            dataTypeCombo.setText(dataType);
            if (dataType.equals("DECIMAL(p)") && decimalSizeText != null) {
                decimalSizeText.setEnabled(true);
                decimalSizeText.setText(Format.toString(sequence.getDecimalSize()));
            }
        }
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:41,代码来源:SequenceDialog.java

示例2: setSequenceData

import org.insightech.er.util.Format; //导入方法依赖的package包/类
/**
 * �V�[�P���X�V�[�g�Ƀf�[�^��ݒ肵�܂�.
 * 
 * @param workbook
 * @param sheet
 * @param sequence
 */
public void setSequenceData(final HSSFWorkbook workbook, final HSSFSheet sheet, final Sequence sequence, final ERDiagram diagram) {
    String cache = Format.toString(sequence.getCache());

    if (DBManagerFactory.getDBManager(diagram).isSupported(DBManager.SUPPORT_SEQUENCE_NOCACHE)) {
        if (sequence.isNocache()) {
            cache = "NO CACHE";
        }
    }

    String min = Format.toString(sequence.getMinValue());
    String max = Format.toString(sequence.getMaxValue());
    String start = Format.toString(sequence.getStart());
    String cycle = String.valueOf(sequence.isCycle()).toUpperCase();

    if (H2DBManager.ID.equals(diagram.getDatabase())) {
        min = "-";
        max = "-";
        start = "-";
        cycle = "-";
    }

    POIUtils.replace(sheet, KEYWORD_SEQUENCE_NAME, getValue(keywordsValueMap, KEYWORD_SEQUENCE_NAME, sequence.getName()));
    POIUtils.replace(sheet, KEYWORD_SEQUENCE_DESCRIPTION, getValue(keywordsValueMap, KEYWORD_SEQUENCE_DESCRIPTION, sequence.getDescription()));
    POIUtils.replace(sheet, KEYWORD_INCREMENT, getValue(keywordsValueMap, KEYWORD_INCREMENT, Format.toString(sequence.getIncrement())));
    POIUtils.replace(sheet, KEYWORD_MIN, getValue(keywordsValueMap, KEYWORD_MIN, min));
    POIUtils.replace(sheet, KEYWORD_MAX, getValue(keywordsValueMap, KEYWORD_MAX, max));
    POIUtils.replace(sheet, KEYWORD_START, getValue(keywordsValueMap, KEYWORD_START, start));
    POIUtils.replace(sheet, KEYWORD_CACHE, getValue(keywordsValueMap, KEYWORD_CACHE, cache));
    POIUtils.replace(sheet, KEYWORD_CYCLE, getValue(keywordsValueMap, KEYWORD_CYCLE, cycle));
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:38,代码来源:SequenceSheetGenerator.java

示例3: getContentArgs

import org.insightech.er.util.Format; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public String[] getContentArgs(final ERDiagram diagram, final Object object) {
    final Sequence sequence = (Sequence) object;

    String cache = Format.toString(sequence.getCache());

    if (DBManagerFactory.getDBManager(diagram).isSupported(DBManager.SUPPORT_SEQUENCE_NOCACHE)) {
        if (sequence.isNocache()) {
            cache = "NO CACHE";
        }
    }

    String min = Format.toString(sequence.getMinValue());
    String max = Format.toString(sequence.getMaxValue());
    String start = Format.toString(sequence.getStart());
    String cycle = String.valueOf(sequence.isCycle()).toUpperCase();

    if (H2DBManager.ID.equals(diagram.getDatabase())) {
        min = "-";
        max = "-";
        start = "-";
        cycle = "-";
    }

    return new String[] {Format.null2blank(sequence.getDescription()), Format.toString(sequence.getIncrement()), min, max, start, cache, cycle};
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:30,代码来源:SequenceHtmlReportPageGenerator.java

示例4: getContentArgs

import org.insightech.er.util.Format; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public String[] getContentArgs(ERDiagram diagram, Object object) {
	Sequence sequence = (Sequence) object;

	String cache = Format.toString(sequence.getCache());

	if (DBManagerFactory.getDBManager(diagram).isSupported(
			DBManager.SUPPORT_SEQUENCE_NOCACHE)) {
		if (sequence.isNocache()) {
			cache = "NO CACHE";
		}
	}

	String min = Format.toString(sequence.getMinValue());
	String max = Format.toString(sequence.getMaxValue());
	String start = Format.toString(sequence.getStart());
	String cycle = String.valueOf(sequence.isCycle()).toUpperCase();

	if (H2DBManager.ID.equals(diagram.getDatabase())) {
		min = "-";
		max = "-";
		start = "-";
		cycle = "-";
	}

	return new String[] { Format.null2blank(sequence.getDescription()),
			Format.toString(sequence.getIncrement()), min, max, start, cache,
			cycle };
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:33,代码来源:SequenceHtmlReportPageGenerator.java

示例5: createXML

import org.insightech.er.util.Format; //导入方法依赖的package包/类
private String createXML(final NormalColumn normalColumn, final PersistentContext context) {
    final StringBuilder xml = new StringBuilder();

    xml.append("<normal_column>\n");

    String wordId = null;

    if (context != null) {
        wordId = context.wordMap.get(normalColumn.getWord());
        if (wordId != null) {
            xml.append("\t<word_id>").append(wordId).append("</word_id>\n");
        }

        xml.append("\t<id>").append(context.columnMap.get(normalColumn)).append("</id>\n");
        String prevRef = "";
        for (final NormalColumn referencedColumn : normalColumn.getReferencedColumnList()) {
            String ref = Format.toString(context.columnMap.get(referencedColumn));
            if (!ref.equals(prevRef)) {
                xml.append("\t<referenced_column>").append(ref).append("</referenced_column>\n");
                prevRef = ref;
            }
        }
        String prevRel = null;
        for (final Relation relation : normalColumn.getRelationList()) {
            String rel = context.connectionMap.get(relation);
            if (!rel.equals(prevRel)) {
                xml.append("\t<relation>").append(rel).append("</relation>\n");
                prevRel = rel;
            }
        }
    }

    final String description = normalColumn.getForeignKeyDescription();
    final String logicalName = normalColumn.getForeignKeyLogicalName();
    final String physicalName = normalColumn.getForeignKeyPhysicalName();
    final SqlType sqlType = normalColumn.getType();

    xml.append("\t<description>").append(escape(description)).append("</description>\n");
    xml.append("\t<unique_key_name>").append(escape(normalColumn.getUniqueKeyName())).append("</unique_key_name>\n");
    xml.append("\t<logical_name>").append(escape(logicalName)).append("</logical_name>\n");
    xml.append("\t<physical_name>").append(escape(physicalName)).append("</physical_name>\n");

    String type = "";
    if (sqlType != null) {
        type = sqlType.getId();
    }
    xml.append("\t<type>").append(type).append("</type>\n");

    xml.append("\t<constraint>").append(escape(normalColumn.getConstraint())).append("</constraint>\n");
    xml.append("\t<default_value>").append(escape(normalColumn.getDefaultValue())).append("</default_value>\n");

    xml.append("\t<auto_increment>").append(normalColumn.isAutoIncrement()).append("</auto_increment>\n");
    xml.append("\t<foreign_key>").append(normalColumn.isForeignKey()).append("</foreign_key>\n");
    xml.append("\t<not_null>").append(normalColumn.isNotNull()).append("</not_null>\n");
    xml.append("\t<primary_key>").append(normalColumn.isPrimaryKey()).append("</primary_key>\n");
    xml.append("\t<unique_key>").append(normalColumn.isUniqueKey()).append("</unique_key>\n");

    xml.append("\t<character_set>").append(escape(normalColumn.getCharacterSet())).append("</character_set>\n");
    xml.append("\t<collation>").append(escape(normalColumn.getCollation())).append("</collation>\n");

    xml.append(tab(this.createXML(normalColumn.getAutoIncrementSetting())));
    xml.append("</normal_column>\n");

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

示例6: setData

import org.insightech.er.util.Format; //导入方法依赖的package包/类
@Override
protected void setData() {
	if (this.sequence != null) {
		this.nameText.setText(Format.toString(this.sequence.getName()));
		this.schemaText.setText(Format.toString(this.sequence.getSchema()));
		this.incrementText.setText(Format.toString(this.sequence
				.getIncrement()));
		if (this.minValueText != null) {
			this.minValueText.setText(Format.toString(this.sequence
					.getMinValue()));
		}
		if (this.maxValueText != null) {
			this.maxValueText.setText(Format.toString(this.sequence
					.getMaxValue()));
		}
		if (this.startText != null) {
			this.startText
					.setText(Format.toString(this.sequence.getStart()));
		}
		if (this.cacheText != null) {
			this.cacheText
					.setText(Format.toString(this.sequence.getCache()));
		}
		if (this.nocacheCheckBox != null) {
			this.nocacheCheckBox.setSelection(this.sequence.isNocache());
		}
		if (this.cycleCheckBox != null) {
			this.cycleCheckBox.setSelection(this.sequence.isCycle());
		}
		if (this.orderCheckBox != null) {
			this.orderCheckBox.setSelection(this.sequence.isOrder());
		}

		this.descriptionText.setText(Format.toString(this.sequence
				.getDescription()));

		if (this.dataTypeCombo != null) {
			String dataType = Format.toString(this.sequence.getDataType());
			this.dataTypeCombo.setText(dataType);
			if (dataType.equals("DECIMAL(p)")
					&& this.decimalSizeText != null) {
				this.decimalSizeText.setEnabled(true);
				this.decimalSizeText.setText(Format.toString(this.sequence
						.getDecimalSize()));
			}
		}
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:49,代码来源:SequenceDialog.java

示例7: setSequenceData

import org.insightech.er.util.Format; //导入方法依赖的package包/类
/**
 * �V�[�P���X�V�[�g�Ƀf�[�^��ݒ肵�܂�.
 * 
 * @param workbook
 * @param sheet
 * @param sequence
 */
public void setSequenceData(HSSFWorkbook workbook, HSSFSheet sheet,
		Sequence sequence, ERDiagram diagram) {
	String cache = Format.toString(sequence.getCache());

	if (DBManagerFactory.getDBManager(diagram).isSupported(
			DBManager.SUPPORT_SEQUENCE_NOCACHE)) {
		if (sequence.isNocache()) {
			cache = "NO CACHE";
		}
	}

	String min = Format.toString(sequence.getMinValue());
	String max = Format.toString(sequence.getMaxValue());
	String start = Format.toString(sequence.getStart());
	String cycle = String.valueOf(sequence.isCycle()).toUpperCase();

	if (H2DBManager.ID.equals(diagram.getDatabase())) {
		min = "-";
		max = "-";
		start = "-";
		cycle = "-";
	}

	POIUtils.replace(sheet, KEYWORD_SEQUENCE_NAME, this.getValue(
			this.keywordsValueMap, KEYWORD_SEQUENCE_NAME,
			sequence.getName()));
	POIUtils.replace(sheet, KEYWORD_SEQUENCE_DESCRIPTION, this.getValue(
			this.keywordsValueMap, KEYWORD_SEQUENCE_DESCRIPTION,
			sequence.getDescription()));
	POIUtils.replace(
			sheet,
			KEYWORD_INCREMENT,
			this.getValue(this.keywordsValueMap, KEYWORD_INCREMENT,
					Format.toString(sequence.getIncrement())));
	POIUtils.replace(sheet, KEYWORD_MIN,
			this.getValue(this.keywordsValueMap, KEYWORD_MIN, min));
	POIUtils.replace(sheet, KEYWORD_MAX,
			this.getValue(this.keywordsValueMap, KEYWORD_MAX, max));
	POIUtils.replace(sheet, KEYWORD_START,
			this.getValue(this.keywordsValueMap, KEYWORD_START, start));
	POIUtils.replace(sheet, KEYWORD_CACHE,
			this.getValue(this.keywordsValueMap, KEYWORD_CACHE, cache));
	POIUtils.replace(sheet, KEYWORD_CYCLE,
			this.getValue(this.keywordsValueMap, KEYWORD_CYCLE, cycle));
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:53,代码来源:SequenceSheetGenerator.java


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