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


Java PostgresDBManager类代码示例

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


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

示例1: initialize

import org.insightech.er.db.impl.postgres.PostgresDBManager; //导入依赖的package包/类
@Override
protected void initialize(final Composite composite) {
    incrementText = CompositeFactory.createNumText(this, composite, "Increment", true);

    if (PostgresDBManager.ID.equals(database)) {
        minValueText = CompositeFactory.createNumText(this, composite, "MinValue", true);
        maxValueText = CompositeFactory.createNumText(this, composite, "MaxValue", true);
    }

    startText = CompositeFactory.createNumText(this, composite, "Start", true);

    if (PostgresDBManager.ID.equals(database)) {
        cacheText = CompositeFactory.createNumText(this, composite, "Cache", true);
        cycleCheckBox = CompositeFactory.createCheckbox(this, composite, "Cycle", false, 2);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:17,代码来源:AutoIncrementSettingDialog.java

示例2: setEnabledBySqlType

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

    final SqlType selectedType = SqlType.valueOf(diagram.getDatabase(), typeCombo.getText());

    if (selectedType != null) {
        if (PostgresDBManager.ID.equals(diagram.getDatabase())) {
            if (SqlType.SQL_TYPE_ID_BIG_SERIAL.equals(selectedType.getId()) || SqlType.SQL_TYPE_ID_SERIAL.equals(selectedType.getId())) {
                autoIncrementSettingButton.setEnabled(true);
            } else {
                autoIncrementSettingButton.setEnabled(false);
            }
        }
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:17,代码来源:ColumnDialog.java

示例3: initialize

import org.insightech.er.db.impl.postgres.PostgresDBManager; //导入依赖的package包/类
@Override
protected void initialize(Composite composite) {
	this.incrementText = CompositeFactory.createNumText(this, composite,
			"Increment", true);

	if (PostgresDBManager.ID.equals(this.database)) {
		this.minValueText = CompositeFactory.createNumText(this, composite,
				"MinValue", true);
		this.maxValueText = CompositeFactory.createNumText(this, composite,
				"MaxValue", true);
	}

	this.startText = CompositeFactory.createNumText(this, composite,
			"Start", true);

	if (PostgresDBManager.ID.equals(this.database)) {
		this.cacheText = CompositeFactory.createNumText(this, composite,
				"Cache", true);
		this.cycleCheckBox = CompositeFactory.createCheckbox(this,
				composite, "Cycle", false, 2);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:23,代码来源:AutoIncrementSettingDialog.java

示例4: setEnabledBySqlType

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

	SqlType selectedType = SqlType.valueOf(diagram.getDatabase(),
			typeCombo.getText());

	if (selectedType != null) {
		if (PostgresDBManager.ID.equals(this.diagram.getDatabase())) {
			if (SqlType.SQL_TYPE_ID_BIG_SERIAL.equals(selectedType.getId())
					|| SqlType.SQL_TYPE_ID_SERIAL.equals(selectedType
							.getId())) {
				this.autoIncrementSettingButton.setEnabled(true);
			} else {
				this.autoIncrementSettingButton.setEnabled(false);
			}
		}
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:20,代码来源:ColumnDialog.java

示例5: formatType

import org.insightech.er.db.impl.postgres.PostgresDBManager; //导入依赖的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

示例6: formatType

import org.insightech.er.db.impl.postgres.PostgresDBManager; //导入依赖的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

示例7: loadTablespace

import org.insightech.er.db.impl.postgres.PostgresDBManager; //导入依赖的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

示例8: loadTablespace

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

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

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

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

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

        TablespaceProperties tablespaceProperties = null;

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

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

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

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

        }

        tablespace.putProperties(environment, tablespaceProperties);
    }

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

    return tablespace;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:40,代码来源:XMLLoader.java


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