new String[]{"OBJECT_ID", "OBJECT_NAME", "SEQUENCE", "OVERLOAD"}, new Object[]{
Integer.valueOf(object_id), methodName, Integer.valueOf(sequence), overload},
new String[0]);
}
if (rowIter.hasNext()) {
SingleColumnViewRow row = (SingleColumnViewRow)rowIter.next();
String defaulted = row.getValue();
hasDefaultInt = "Y".equalsIgnoreCase(defaulted) ? 1 : 0;
}
else {
throw new SQLException(
"Pre-10.2 database do not support DEFAULTED in ALL_ARGUMENTS");
}
}
catch (Exception se) { // SQLException: ORA-00904: "DEFAULTED": invalid identifier
// se.printStackTrace();
// conn = m_reflector.getConnection();
try {
// DEFAULTED ONLY EXISTS in Database 10.2
final int oidIdx = 1;
final int methodNameIdx = 2;
final int sequenceIdx = 3;
final int overloadIdx = 4;
/*
* if (stmt != null) { stmt.close(); } if (rs != null) { rs.close(); }
*
* stmt =
* conn.prepareStatement("SELECT SYS.SQLJUTL.HAS_DEFAULT(:1, :2, :3, :4) FROM DUAL"
* ); stmt.setInt(oidIdx, object_id); stmt.setString(methodNameIdx, methodName);
* stmt.setInt(sequenceIdx, sequence); if (overload == null || overload.equals(""))
* { stmt.setInt(overloadIdx, 0); } else { stmt.setInt(overloadIdx,
* Integer.parseInt(overload)); } rs = stmt.executeQuery(); boolean hasNext =
* rs.next(); if (hasNext) { hasDefaultInt = rs.getInt(1); }
*/
String sqljutl = "SYS.SQLJUTL.HAS_DEFAULT(" + object_id + ", " + "'"
+ methodName.toUpperCase() + "', " + sequence + ","
+ ((overload == null || overload.equals("")) ? "0" : overload) + ")";
Iterator<ViewRow> rowIter = m_viewCache.getRows(Util.DUAL, new String[]{sqljutl},
new String[0], new Object[0], new String[0]);
if (rowIter.hasNext()) {
SingleColumnViewRow row = (SingleColumnViewRow)rowIter.next();
if (row.getValue() != null) {
hasDefaultInt = Integer.parseInt(row.getValue());
}
}
}
catch (Exception e8) {
e8.printStackTrace();