本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}