|
|
@ -51,6 +51,7 @@ public class ProcedureUtils { |
|
|
|
if(oracleCursorIndex==-1){ |
|
|
|
rs=cs.executeQuery(); |
|
|
|
}else{ |
|
|
|
cs.executeUpdate(); |
|
|
|
rs=(ResultSet)cs.getObject(oracleCursorIndex); |
|
|
|
} |
|
|
|
ResultSetMetaData metadata=rs.getMetaData(); |
|
|
@ -80,6 +81,7 @@ public class ProcedureUtils { |
|
|
|
if(oracleCursorIndex==-1){ |
|
|
|
rs=cs.executeQuery(); |
|
|
|
}else{ |
|
|
|
cs.executeUpdate(); |
|
|
|
rs=(ResultSet)cs.getObject(oracleCursorIndex); |
|
|
|
} |
|
|
|
ResultSetMetaData metadata=rs.getMetaData(); |
|
|
@ -121,12 +123,13 @@ public class ProcedureUtils { |
|
|
|
sql=sql.replaceFirst(param, "?"); |
|
|
|
oracleCursorIndex=paramIndex; |
|
|
|
continue; |
|
|
|
}else if(param.startsWith(":")){ |
|
|
|
sql=sql.replaceFirst(param, "?"); |
|
|
|
String paramName=param.substring(1,param.length()); |
|
|
|
Object paramValue=pmap.get(paramName); |
|
|
|
paramMap.put(paramName, (paramValue==null ? "" : paramValue)); |
|
|
|
}else if(!param.startsWith(":")){ |
|
|
|
continue; |
|
|
|
} |
|
|
|
sql=sql.replaceFirst(param, "?"); |
|
|
|
String paramName=param.substring(1,param.length()); |
|
|
|
Object paramValue=pmap.get(paramName); |
|
|
|
paramMap.put(paramName, (paramValue==null ? "" : paramValue)); |
|
|
|
} |
|
|
|
String procedure="{"+sql+"}"; |
|
|
|
CallableStatement cs= conn.prepareCall(procedure); |
|
|
|