本文整理汇总了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;
}