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


Java DBObject.TYPE_SEQUENCE属性代码示例

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


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

示例1: importSequences

@Override
protected List<DBObject> importSequences() throws SQLException {
    final List<DBObject> list = new ArrayList<DBObject>();

    ResultSet resultSet = null;
    PreparedStatement stmt = null;

    if (schemaList.isEmpty()) {
        schemaList.add(null);
    }

    for (final String schemaPattern : schemaList) {
        try {
            if (schemaPattern == null) {
                stmt = con.prepareStatement("SELECT SEQSCHEMA, SEQNAME FROM SYSIBM.SYSSEQUENCES");

            } else {
                stmt = con.prepareStatement("SELECT SEQSCHEMA, SEQNAME FROM SYSIBM.SYSSEQUENCES WHERE SEQSCHEMA = ?");
                stmt.setString(1, schemaPattern);
            }

            resultSet = stmt.executeQuery();

            while (resultSet.next()) {
                final String schema = resultSet.getString("SEQSCHEMA");
                final String name = resultSet.getString("SEQNAME");

                final DBObject dbObject = new DBObject(schema, name, DBObject.TYPE_SEQUENCE);
                list.add(dbObject);
            }

        } finally {
            if (resultSet != null) {
                resultSet.close();
                resultSet = null;
            }
            if (stmt != null) {
                stmt.close();
                stmt = null;
            }
        }
    }

    return list;

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

示例2: importSequences

@Override
protected List<DBObject> importSequences() throws SQLException {
    final List<DBObject> list = new ArrayList<DBObject>();

    ResultSet resultSet = null;
    PreparedStatement stmt = null;

    if (schemaList.isEmpty()) {
        schemaList.add(null);
    }

    for (final String schemaPattern : schemaList) {
        try {
            if (schemaPattern == null) {
                stmt = con.prepareStatement("SELECT SEQUENCE_SCHEMA, SEQUENCE_NAME FROM INFORMATION_SCHEMA.SEQUENCES");

            } else {
                stmt = con.prepareStatement("SELECT SEQUENCE_SCHEMA, SEQUENCE_NAME FROM INFORMATION_SCHEMA.SEQUENCES WHERE SEQUENCE_SCHEMA = ?");
                stmt.setString(1, schemaPattern);
            }

            resultSet = stmt.executeQuery();

            while (resultSet.next()) {
                final String schema = resultSet.getString("SEQUENCE_SCHEMA");
                final String name = resultSet.getString("SEQUENCE_NAME");

                final DBObject dbObject = new DBObject(schema, name, DBObject.TYPE_SEQUENCE);
                list.add(dbObject);
            }

        } finally {
            if (resultSet != null) {
                resultSet.close();
                resultSet = null;
            }
            if (stmt != null) {
                stmt.close();
                stmt = null;
            }
        }
    }

    return list;

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

示例3: importSequences

@Override
protected List<DBObject> importSequences() throws SQLException {
	List<DBObject> list = new ArrayList<DBObject>();

	ResultSet resultSet = null;
	PreparedStatement stmt = null;

	if (this.schemaList.isEmpty()) {
		this.schemaList.add(null);
	}

	for (String schemaPattern : this.schemaList) {
		try {
			if (schemaPattern == null) {
				stmt = con
						.prepareStatement("SELECT SEQSCHEMA, SEQNAME FROM SYSCAT.SEQUENCES");

			} else {
				stmt = con
						.prepareStatement("SELECT SEQSCHEMA, SEQNAME FROM SYSCAT.SEQUENCES WHERE SEQSCHEMA = ?");
				stmt.setString(1, schemaPattern);
			}

			resultSet = stmt.executeQuery();

			while (resultSet.next()) {
				String schema = resultSet.getString("SEQSCHEMA");
				String name = resultSet.getString("SEQNAME");

				DBObject dbObject = new DBObject(schema, name,
						DBObject.TYPE_SEQUENCE);
				list.add(dbObject);
			}

		} finally {
			if (resultSet != null) {
				resultSet.close();
				resultSet = null;
			}
			if (stmt != null) {
				stmt.close();
				stmt = null;
			}
		}
	}

	return list;

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

示例4: importSequences

@Override
protected List<DBObject> importSequences() throws SQLException {
	List<DBObject> list = new ArrayList<DBObject>();

	ResultSet resultSet = null;
	PreparedStatement stmt = null;

	if (this.schemaList.isEmpty()) {
		this.schemaList.add(null);
	}

	for (String schemaPattern : this.schemaList) {
		try {
			if (schemaPattern == null) {
				stmt = con
						.prepareStatement("SELECT SEQUENCE_SCHEMA, SEQUENCE_NAME FROM INFORMATION_SCHEMA.SEQUENCES");

			} else {
				stmt = con
						.prepareStatement("SELECT SEQUENCE_SCHEMA, SEQUENCE_NAME FROM INFORMATION_SCHEMA.SEQUENCES WHERE SEQUENCE_SCHEMA = ?");
				stmt.setString(1, schemaPattern);
			}

			resultSet = stmt.executeQuery();

			while (resultSet.next()) {
				String schema = resultSet.getString("SEQUENCE_SCHEMA");
				String name = resultSet.getString("SEQUENCE_NAME");

				DBObject dbObject = new DBObject(schema, name,
						DBObject.TYPE_SEQUENCE);
				list.add(dbObject);
			}

		} finally {
			if (resultSet != null) {
				resultSet.close();
				resultSet = null;
			}
			if (stmt != null) {
				stmt.close();
				stmt = null;
			}
		}
	}

	return list;

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

示例5: importSequences

@Override
protected List<DBObject> importSequences() throws SQLException, InterruptedException {
	List<DBObject> list = new ArrayList<DBObject>();

	ResultSet resultSet = null;
	PreparedStatement stmt = null;

	if (this.schemaList.isEmpty()) {
		this.schemaList.add(null);
	}
	
	for (String schemaPattern : this.schemaList) {
		try {
			if (schemaPattern == null) {
				stmt = con.prepareStatement("SELECT NULL AS TABLE_SCHEM, NAME AS TABLE_NAME FROM DB_SERIAL WHERE CLASS_NAME IS NULL");
			}

			resultSet = stmt.executeQuery();

			while (resultSet.next()) {
				String schema = resultSet.getString("TABLE_SCHEM");
				String name = resultSet.getString("TABLE_NAME");

				DBObject dbObject = new DBObject(schema, name, DBObject.TYPE_SEQUENCE);
				list.add(dbObject);
			}

		} finally {
			if (resultSet != null) {
				resultSet.close();
				resultSet = null;
			}
			if (stmt != null) {
				stmt.close();
				stmt = null;
			}
		}
	}

	return list;
}
 
开发者ID:justinkwony,项目名称:ermaster-nhit,代码行数:41,代码来源:CUBRIDPreTableImportManager.java


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