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


Java MySQLDBManager类代码示例

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


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

示例1: initializeDetailTab

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
@Override
protected void initializeDetailTab(final Composite composite) {
    uniqueKeyNameText = CompositeFactory.createText(this, composite, "label.unique.key.name", false, true);

    super.initializeDetailTab(composite);

    final DBManager manager = DBManagerFactory.getDBManager(diagram);

    if (MySQLDBManager.ID.equals(diagram.getDatabase())) {
        characterSetCombo = CompositeFactory.createCombo(this, composite, "label.character.set");
        collationCombo = CompositeFactory.createCombo(this, composite, "label.collation");
    }

    if (manager.isSupported(DBManager.SUPPORT_AUTO_INCREMENT_SETTING)) {
        CompositeFactory.fillLine(composite);

        autoIncrementSettingButton = CompositeFactory.createLargeButton(composite, "label.auto.increment.setting", 2);
        autoIncrementSettingButton.setEnabled(false);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:21,代码来源:ColumnDialog.java

示例2: initialize

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
private void initialize(final Composite parent) {
    final ERDiagram diagram = new ERDiagram(MySQLDBManager.ID);
    final ERTable table = new ERTable();
    table.setPhysicalName("table1");
    table.setLogicalName("table1");
    final TypeData typeData = new TypeData(null, null, false, null, false, false, false, null, false);

    final Word word1 = new Word("a", "a", SqlType.valueOfId("bigint"), typeData, null, MySQLDBManager.ID);

    final NormalColumn column1 = new NormalColumn(word1, true, true, true, true, null, null, null, null, null);

    final Word word2 = new Word("a", "a", SqlType.valueOfId("bigint"), typeData, null, MySQLDBManager.ID);
    final NormalColumn column2 = new NormalColumn(word2, true, true, true, true, null, null, null, null, null);
    table.addColumn(column1);
    table.addColumn(column2);

    diagram.addContent(table);

    final TestDataDialog dialog = new TestDataDialog(shell, diagram, new TestData());

    dialog.open();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:23,代码来源:TestDataEditTest.java

示例3: initializeDetailTab

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
@Override
protected void initializeDetailTab(Composite composite) {
	this.uniqueKeyNameText = CompositeFactory.createText(this, composite,
			"label.unique.key.name", false, true);

	super.initializeDetailTab(composite);

	DBManager manager = DBManagerFactory.getDBManager(this.diagram);

	if (MySQLDBManager.ID.equals(this.diagram.getDatabase())) {
		this.characterSetCombo = CompositeFactory.createCombo(this,
				composite, "label.character.set");
		this.collationCombo = CompositeFactory.createCombo(this, composite,
				"label.collation");
	}

	if (manager.isSupported(DBManager.SUPPORT_AUTO_INCREMENT_SETTING)) {
		CompositeFactory.fillLine(composite);

		this.autoIncrementSettingButton = CompositeFactory
				.createLargeButton(composite,
						"label.auto.increment.setting", 2);
		this.autoIncrementSettingButton.setEnabled(false);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:26,代码来源:ColumnDialog.java

示例4: initData

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
@Override
protected void initData() {
    super.initData();

    if (characterSetCombo != null) {
        characterSetCombo.add("");

        for (final String characterSet : MySQLDBManager.getCharacterSetList()) {
            characterSetCombo.add(characterSet);
        }

        collationCombo.add("");
    }

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

示例5: main2

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
public static void main2(String[] args) {
	for (Entry<TypeKey, SqlType> entry : dbSqlTypeMap
			.get(MySQLDBManager.ID).entrySet()) {
		logger.info(entry.getKey().toString() + ":"
				+ entry.getValue().getAlias(MySQLDBManager.ID));
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:8,代码来源:SqlType.java

示例6: initData

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
@Override
protected void initData() {
	super.initData();

	if (this.characterSetCombo != null) {
		this.characterSetCombo.add("");

		for (String characterSet : MySQLDBManager.getCharacterSetList()) {
			this.characterSetCombo.add(characterSet);
		}

		this.collationCombo.add("");
	}

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

示例7: initialize

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
private void initialize(Composite parent) {
	List<TestData> testDataList = new ArrayList<TestData>();
	TestDataManageDialog dialog = new TestDataManageDialog(shell,
			new ERDiagram(MySQLDBManager.ID), testDataList);

	dialog.open();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:8,代码来源:TableTest.java

示例8: initialize

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
private void initialize(Composite parent) {
	ERDiagram diagram = new ERDiagram(MySQLDBManager.ID);
	ERTable table = new ERTable();
	table.setPhysicalName("table1");
	table.setLogicalName("table1");
	TypeData typeData = new TypeData(null, null, false, null, false, false,
			false, null, false);

	Word word1 = new Word("a", "a", SqlType.valueOfId("bigint"), typeData,
			null, MySQLDBManager.ID);

	NormalColumn column1 = new NormalColumn(word1, true, true, true, true,
			null, null, null, null, null);

	Word word2 = new Word("a", "a", SqlType.valueOfId("bigint"), typeData,
			null, MySQLDBManager.ID);
	NormalColumn column2 = new NormalColumn(word2, true, true, true, true,
			null, null, null, null, null);
	table.addColumn(column1);
	table.addColumn(column2);

	diagram.addContent(table);

	TestDataDialog dialog = new TestDataDialog(shell, diagram,
			new TestData());

	dialog.open();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:29,代码来源:TestDataEditTest.java

示例9: main2

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
public static void main2(final String[] args) {
    for (final Entry<TypeKey, SqlType> entry : dbSqlTypeMap.get(MySQLDBManager.ID).entrySet()) {
        logger.info(entry.getKey().toString() + ":" + entry.getValue().getAlias(MySQLDBManager.ID));
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:6,代码来源:SqlType.java

示例10: formatType

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
public static String formatType(final SqlType sqlType, final TypeData typeData, final String database, final boolean embedded) {
    String type = null;

    if (sqlType != null) {
        type = sqlType.getAlias(database);
        if (type != null) {
            if (embedded) {
                if (typeData.getLength() != null && typeData.getDecimal() != null) {
                    type = type.replaceAll("\\(.,.\\)", "(" + typeData.getLength() + "," + typeData.getDecimal() + ")");

                    type = type.replaceFirst("\\([a-z]\\)", "(" + typeData.getLength() + ")").replaceFirst("\\([a-z]\\)", "(" + typeData.getDecimal() + ")");

                } else if (typeData.getLength() != null) {
                    String len = null;

                    if ("BLOB".equalsIgnoreCase(type)) {
                        len = getFileSizeStr(typeData.getLength().longValue());
                    } else {
                        len = String.valueOf(typeData.getLength());
                    }

                    type = type.replaceAll("\\(.\\)", "(" + len + ")");

                }
            }

            if (sqlType.isNeedCharSemantics(database) && typeData.isCharSemantics()) {
                type = type.replaceAll("\\)", " char)");
            }

            if (typeData.isArray() && PostgresDBManager.ID.equals(database)) {
                for (int i = 0; i < typeData.getArrayDimension(); i++) {
                    type += "[]";
                }
            }

            if (sqlType.isNumber() && typeData.isUnsigned() && MySQLDBManager.ID.equals(database)) {
                type += " unsigned";
            }

            if (sqlType.isNumber() && typeData.isZerofill() && MySQLDBManager.ID.equals(database)) {
                type += " zerofill";
            }

            if (sqlType.doesNeedArgs()) {
                type += "(" + typeData.getArgs() + ")";
            }

        } else {
            type = "";
        }

    } else {
        type = "";
    }

    return type;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:59,代码来源:Format.java

示例11: setWordData

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void setWordData() {
    super.setWordData();

    primaryKeyCheck.setSelection(targetColumn.isPrimaryKey());

    if (autoIncrementCheck != null) {
        autoIncrementCheck.setSelection(targetColumn.isAutoIncrement());
    }

    if (primaryKeyCheck.getSelection()) {
        notNullCheck.setSelection(true);
        notNullCheck.setEnabled(false);
    } else {
        notNullCheck.setEnabled(true);
    }

    final NormalColumn autoIncrementColumn = erTable.getAutoIncrementColumn();

    if (primaryKeyCheck.getSelection()) {
        if (autoIncrementColumn == null || autoIncrementColumn == targetColumn) {
            enableAutoIncrement(true);

        } else {
            enableAutoIncrement(false);
        }

    } else {
        enableAutoIncrement(false);
    }

    defaultText.setText(Format.null2blank(targetColumn.getDefaultValue()));

    uniqueKeyNameText.setText(Format.null2blank(targetColumn.getUniqueKeyName()));

    if (characterSetCombo != null) {
        characterSetCombo.setText(Format.null2blank(targetColumn.getCharacterSet()));

        for (final String collation : MySQLDBManager.getCollationList(targetColumn.getCharacterSet())) {
            collationCombo.add(collation);
        }

        collationCombo.setText(Format.null2blank(targetColumn.getCollation()));
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:49,代码来源:ColumnDialog.java

示例12: initialize

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
private void initialize(final Composite parent) {
    final List<TestData> testDataList = new ArrayList<TestData>();
    final TestDataManageDialog dialog = new TestDataManageDialog(shell, new ERDiagram(MySQLDBManager.ID), testDataList);

    dialog.open();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:7,代码来源:TableTest.java

示例13: formatType

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
public static String formatType(SqlType sqlType, TypeData typeData,
		String database, boolean embedded) {
	String type = null;

	if (sqlType != null) {
		type = sqlType.getAlias(database);
		if (type != null) {
			if (embedded) {
				if (typeData.getLength() != null
						&& typeData.getDecimal() != null) {
					type = type.replaceAll(
							"\\(.,.\\)",
							"(" + typeData.getLength() + ","
									+ typeData.getDecimal() + ")");

					type = type.replaceFirst("\\([a-z]\\)",
							"(" + typeData.getLength() + ")").replaceFirst(
							"\\([a-z]\\)",
							"(" + typeData.getDecimal() + ")");

				} else if (typeData.getLength() != null) {
					String len = null;

					if ("BLOB".equalsIgnoreCase(type)) {
						len = getFileSizeStr(typeData.getLength()
								.longValue());
					} else {
						len = String.valueOf(typeData.getLength());							
					}

					type = type.replaceAll("\\(.\\)", "(" + len + ")");

				}
			}
			
			if (sqlType.isNeedCharSemantics(database) && typeData.isCharSemantics()) {
				type = type.replaceAll("\\)", " char)");
			}

			if (typeData.isArray() && PostgresDBManager.ID.equals(database)) {
				for (int i = 0; i < typeData.getArrayDimension(); i++) {
					type += "[]";
				}
			}

			if (sqlType.isNumber() && typeData.isUnsigned()
					&& MySQLDBManager.ID.equals(database)) {
				type += " unsigned";
			}

			if (sqlType.isNumber() && typeData.isZerofill()
					&& MySQLDBManager.ID.equals(database)) {
				type += " zerofill";
			}

			if (sqlType.doesNeedArgs()) {
				type += "(" + typeData.getArgs() + ")";
			}

		} else {
			type = "";
		}

	} else {
		type = "";
	}

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

示例14: setWordData

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void setWordData() {
	super.setWordData();

	this.primaryKeyCheck.setSelection(this.targetColumn.isPrimaryKey());

	if (this.autoIncrementCheck != null) {
		this.autoIncrementCheck.setSelection(this.targetColumn
				.isAutoIncrement());
	}

	if (this.primaryKeyCheck.getSelection()) {
		this.notNullCheck.setSelection(true);
		this.notNullCheck.setEnabled(false);
	} else {
		this.notNullCheck.setEnabled(true);
	}

	final NormalColumn autoIncrementColumn = this.erTable
			.getAutoIncrementColumn();

	if (this.primaryKeyCheck.getSelection()) {
		if (autoIncrementColumn == null
				|| autoIncrementColumn == targetColumn) {
			this.enableAutoIncrement(true);

		} else {
			this.enableAutoIncrement(false);
		}

	} else {
		this.enableAutoIncrement(false);
	}

	this.defaultText.setText(Format.null2blank(this.targetColumn
			.getDefaultValue()));

	this.uniqueKeyNameText.setText(Format.null2blank(this.targetColumn
			.getUniqueKeyName()));

	if (this.characterSetCombo != null) {
		this.characterSetCombo.setText(Format.null2blank(this.targetColumn
				.getCharacterSet()));

		for (String collation : MySQLDBManager
				.getCollationList(this.targetColumn.getCharacterSet())) {
			this.collationCombo.add(collation);
		}

		this.collationCombo.setText(Format.null2blank(this.targetColumn
				.getCollation()));
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:57,代码来源:ColumnDialog.java

示例15: loadTablespace

import org.insightech.er.db.impl.mysql.MySQLDBManager; //导入依赖的package包/类
private Tablespace loadTablespace(Element element, LoadContext context) {
	String id = this.getStringValue(element, "id");

	Tablespace tablespace = new Tablespace();
	tablespace.setName(this.getStringValue(element, "name"));

	NodeList nodeList = element.getElementsByTagName("properties");

	for (int i = 0; i < nodeList.getLength(); i++) {
		Element propertiesElemnt = (Element) nodeList.item(i);

		String environmentId = this.getStringValue(propertiesElemnt,
				"environment_id");
		Environment environment = context.environmentMap.get(environmentId);

		TablespaceProperties tablespaceProperties = null;

		if (DB2DBManager.ID.equals(this.database)) {
			tablespaceProperties = this
					.loadTablespacePropertiesDB2(propertiesElemnt);

		} else if (MySQLDBManager.ID.equals(this.database)) {
			tablespaceProperties = this
					.loadTablespacePropertiesMySQL(propertiesElemnt);

		} else if (OracleDBManager.ID.equals(this.database)) {
			tablespaceProperties = this
					.loadTablespacePropertiesOracle(propertiesElemnt);

		} else if (PostgresDBManager.ID.equals(this.database)) {
			tablespaceProperties = this
					.loadTablespacePropertiesPostgres(propertiesElemnt);

		}

		tablespace.putProperties(environment, tablespaceProperties);
	}

	if (id != null) {
		context.tablespaceMap.put(id, tablespace);
	}

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


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