String schemaPattern = escapePunctuation(originalSchemaPattern, true);
final String procedurePattern = escapePunctuation(originalProcedurePattern, true);
if (schemaPattern == null || schemaPattern.length() == 0) {
schemaPattern = username;
}
SqlTypeWithMethods typ = null;
if (procedureModel.getJPubType() == null) {
SqlReflector sqlReflector = new SqlReflector(connection,username);
int whatItIs = IS_PACKAGE;
if (TOPLEVEL.equalsIgnoreCase(packageName)) {
whatItIs = IS_TOPLEVEL;
packageName = "";
}
try {
typ = (SqlTypeWithMethods)sqlReflector.addSqlUserType(schemaPattern,
packageName, whatItIs, true, 0, 0, new MethodFilter() {
public boolean acceptMethod(ProcedureMethod method, boolean preApprove) {
String methodName = method.getName();
if (sqlMatch(procedurePattern, methodName)) {
return true;
}
return false;
}
}
);
procedureModel.setJPubType(typ);
}
catch (Exception e) {
// TODO
}
}
else {
typ = procedureModel.getJPubType();
}
List<ProcedureMethod> methods = null;
try {
methods = typ.getDeclaredMethods();
}
catch (Exception e) {
// TODO
}
if (methods.size() > 0) {