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


Java Check类代码示例

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


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

示例1: getDDL

import org.insightech.er.util.Check; //导入依赖的package包/类
@Override
protected String getDDL(final Tablespace tablespace) {
    final PostgresTablespaceProperties tablespaceProperties = (PostgresTablespaceProperties) tablespace.getProperties(environment, getDiagram());

    final StringBuilder ddl = new StringBuilder();

    ddl.append("CREATE TABLESPACE ");
    ddl.append(filterName(tablespace.getName()));
    ddl.append(LF());

    if (!Check.isEmpty(tablespaceProperties.getOwner())) {
        ddl.append(" OWNER ");
        ddl.append(tablespaceProperties.getOwner());
        ddl.append(LF());
    }

    ddl.append(" LOCATION '");
    ddl.append(tablespaceProperties.getLocation());
    ddl.append("'" + LF());

    if (semicolon) {
        ddl.append(";");
    }

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

示例2: getDDL

import org.insightech.er.util.Check; //导入依赖的package包/类
protected String getDDL(Trigger trigger) {
	StringBuilder ddl = new StringBuilder();

	String description = trigger.getDescription();
	if (this.semicolon && !Check.isEmpty(description)
			&& this.ddlTarget.inlineTableComment) {
		ddl.append("-- ");
		ddl.append(replaceLF(description, LF() + "-- "));
		ddl.append(LF());
	}

	ddl.append(this.getCreateOrReplacePrefix() + " TRIGGER ");
	ddl.append(filterName(this.getNameWithSchema(trigger.getSchema(),
			trigger.getName())));
	ddl.append(" ");
	ddl.append(filterName(trigger.getSql()));

	if (this.semicolon) {
		ddl.append(";");
	}

	return ddl.toString();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:24,代码来源:DDLCreator.java

示例3: validate

import org.insightech.er.util.Check; //导入依赖的package包/类
@Override
public List<String> validate() {
    final List<String> errorMessage = new ArrayList<String>();

    if (Check.isEmptyTrim(getDataFile())) {
        errorMessage.add("error.tablespace.data.file.empty");
    }
    if (Check.isEmptyTrim(getLogFileGroup())) {
        errorMessage.add("error.tablespace.log.file.group.empty");
    }
    if (Check.isEmptyTrim(getEngine())) {
        errorMessage.add("error.tablespace.storage.engine.empty");
    }

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

示例4: setData

import org.insightech.er.util.Check; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @throws IOException
 */
@Override
protected void setData() {
	ExportImageSetting exportImageSetting = settings.getExportSetting()
			.getExportImageSetting();

	String outputFile = Format.null2blank(exportImageSetting
			.getOutputFilePath());

	if (Check.isEmpty(outputFile)) {
		outputFile = this.getDefaultOutputFilePath(DEFAULT_EXTENTION);
	}

	this.outputFileText.setText(FileUtils.getRelativeFilePath(
			this.getBaseDir(), outputFile));

	this.withCategoryImageButton.setSelection(exportImageSetting
			.isWithCategoryImage());
	this.openAfterSavedButton.setSelection(exportImageSetting
			.isOpenAfterSaved());

	this.setCategoryData(this.categoryLabel);
	if (this.diagram.getCurrentCategory() != null) {
		this.withCategoryImageButton.setEnabled(false);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:31,代码来源:ExportToImageDialog.java

示例5: getUniqueKeyDDL

import org.insightech.er.util.Check; //导入依赖的package包/类
@Override
protected String getUniqueKeyDDL(final ERTable table) {
    final StringBuilder ddl = new StringBuilder();

    for (final NormalColumn column : table.getExpandedColumns()) {
        if (column.isUniqueKey()) {
            ddl.append("," + LF());
            ddl.append("\t");
            if (!Check.isEmpty(column.getUniqueKeyName())) {
                ddl.append("CONSTRAINT ");
                ddl.append(column.getUniqueKeyName());
                ddl.append(" ");
            }

            ddl.append("UNIQUE (");
            ddl.append(filterName(column.getPhysicalName()));
            ddl.append(")");
        }
    }

    ddl.append(super.getUniqueKeyDDL(table));

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

示例6: filterComment

import org.insightech.er.util.Check; //导入依赖的package包/类
protected String filterComment(String logicalName, String description,
		boolean column) {
	String comment = null;

	if (this.ddlTarget.commentValueLogicalNameDescription) {
		comment = Format.null2blank(logicalName);

		if (!Check.isEmpty(description)) {
			comment = comment + " : " + Format.null2blank(description);
		}

	} else if (this.ddlTarget.commentValueLogicalName) {
		comment = Format.null2blank(logicalName);

	} else {
		comment = Format.null2blank(description);

	}

	if (ddlTarget.commentReplaceLineFeed) {
		comment = replaceLF(comment, ddlTarget.commentReplaceString);
	}

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

示例7: getRelativeFilePath

import org.insightech.er.util.Check; //导入依赖的package包/类
public static String getRelativeFilePath(final File baseDir, final String absoluteFilePath) {
    if (Check.isEmpty(absoluteFilePath)) {
        return "";
    }

    final File file = new File(absoluteFilePath);

    if (isInBaseDir(baseDir, file)) {
        if (file.getAbsolutePath().length() > baseDir.getAbsolutePath().length()) {
            return file.getAbsolutePath().substring(baseDir.getAbsolutePath().length() + 1);
        } else {
            return "";
        }
    }

    return absoluteFilePath;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:18,代码来源:FileUtils.java

示例8: perfomeOK

import org.insightech.er.util.Check; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void perfomeOK() {
    modelProperties.clear();

    for (int i = 0; i < table.getItemCount(); i++) {
        final TableItem item = table.getItem(i);

        if (Check.isEmpty(item.getText(0)) && Check.isEmpty(item.getText(1))) {
            continue;
        }

        final NameValue property = new NameValue(item.getText(0), item.getText(1));
        modelProperties.addProperty(property);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:19,代码来源:ModelPropertiesDialog.java

示例9: setData

import org.insightech.er.util.Check; //导入依赖的package包/类
private void setData() {
    changeTrackingTable.removeAll();

    setButtonEnabled(false);
    comparisonDisplayButton.setEnabled(false);

    for (final ChangeTracking changeTracking : diagram.getChangeTrackingList().getList()) {
        final TableItem tableItem = new TableItem(changeTrackingTable, SWT.NONE);

        final String date = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT).format(changeTracking.getUpdatedDate());
        tableItem.setText(0, date);

        if (!Check.isEmpty(changeTracking.getComment())) {
            tableItem.setText(1, changeTracking.getComment());
        } else {
            tableItem.setText(1, "*** empty log message ***");
        }
    }

    comparisonResetButton.setEnabled(diagram.getChangeTrackingList().isCalculated());
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:22,代码来源:ChangeTrackingDialog.java

示例10: enableUseDefaultDriver

import org.insightech.er.util.Check; //导入依赖的package包/类
private void enableUseDefaultDriver() {
    final String database = getDBSName();

    if (!Check.isEmpty(database)) {
        final DBManager dbManager = DBManagerFactory.getDBManager(database);

        if (StandardSQLDBManager.ID.equals(dbManager.getId())) {
            useDefaultDriverButton.setSelection(false);
            useDefaultDriverButton.setEnabled(false);

        } else {
            useDefaultDriverButton.setSelection(true);
            useDefaultDriverButton.setEnabled(true);

        }
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:18,代码来源:AbstractDBSettingDialog.java

示例11: getNameWithSchema

import org.insightech.er.util.Check; //导入依赖的package包/类
protected String getNameWithSchema(String schema, String name) {
	StringBuilder sb = new StringBuilder();

	if (Check.isEmpty(schema)) {
		schema = this.getDiagram().getDiagramContents().getSettings()
				.getTableViewProperties().getSchema();
	}

	if (!Check.isEmpty(schema)) {
		sb.append(schema);
		sb.append(".");
	}

	sb.append(name);

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

示例12: getTableNameWithSchema

import org.insightech.er.util.Check; //导入依赖的package包/类
public String getTableNameWithSchema(String tableName, String schema,
		boolean toUpperCase) {
	String name = null;
	
	if (Check.isEmpty(schema)) {
		name = Format.null2blank(tableName);

	} else {
		DBManager dbManager = DBManagerFactory.getDBManager(this.dbsystem);

		if (!dbManager.isSupported(DBManager.SUPPORT_SCHEMA)) {
			name = Format.null2blank(tableName);

		} else {
			name = schema + "." + Format.null2blank(tableName);
		}
	}
	
	if (toUpperCase) {
		name = name.toUpperCase();
	}

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

示例13: getErrorMessage

import org.insightech.er.util.Check; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected String getErrorMessage() {
    if (autoIncrementCheck != null && autoIncrementCheck.getSelection()) {
        final SqlType selectedType = SqlType.valueOf(diagram.getDatabase(), typeCombo.getText());
        if (selectedType == null || !selectedType.isNumber()) {
            return "error.no.auto.increment.column";
        }
    }

    final String text = uniqueKeyNameText.getText().trim();
    if (!Check.isAlphabet(text)) {
        return "error.unique.key.name.not.alphabet";
    }

    return super.getErrorMessage();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:20,代码来源:ColumnDialog.java

示例14: changeFont

import org.insightech.er.util.Check; //导入依赖的package包/类
protected Font changeFont(final IFigure figure) {
    final NodeElement nodeElement = (NodeElement) getModel();

    String fontName = nodeElement.getFontName();
    int fontSize = nodeElement.getFontSize();

    if (Check.isEmpty(fontName)) {
        final FontData fontData = Display.getCurrent().getSystemFont().getFontData()[0];
        fontName = fontData.getName();
        nodeElement.setFontName(fontName);
    }
    if (fontSize <= 0) {
        fontSize = ViewableModel.DEFAULT_FONT_SIZE;
        nodeElement.setFontSize(fontSize);
    }

    font = Resources.getFont(fontName, fontSize);

    figure.setFont(font);

    return font;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:23,代码来源:NodeElementEditPart.java

示例15: getSelectedTemplate

import org.insightech.er.util.Check; //导入依赖的package包/类
private InputStream getSelectedTemplate() throws FileNotFoundException {
	if (!Check.isEmpty(this.exportExcelSetting.getExcelTemplatePath())) {
		return new FileInputStream(FileUtils.getFile(this.projectDir,
				this.exportExcelSetting.getExcelTemplatePath()));
	}

	String lang = this.exportExcelSetting.getUsedDefaultTemplateLang();

	if ("en".equals(lang)) {
		return TemplatePreferencePage.getDefaultExcelTemplateEn();

	} else if ("ja".equals(lang)) {
		return TemplatePreferencePage.getDefaultExcelTemplateJa();

	}

	String templateName = this.exportExcelSetting.getExcelTemplate();

	File file = new File(
			PreferenceInitializer.getTemplatePath(templateName));

	return new FileInputStream(file);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:24,代码来源:ExportToExcelManager.java


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