當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。