// can be used for the queries, we use method and sequence
// to be more general. If this type is defined via CURSOR%ROWTYPE,
// for which method, method_no and sequence has to be used to
// identify this type in ALL_ARGUMENTS.
ViewCache viewCache = reflector.getViewCache();
Iterator<ViewRow> iter = viewCache.getRows(ALL_ARGUMENTS, new String[0], new String[]{
PACKAGE_NAME, OBJECT_NAME, OVERLOAD}, new Object[]{packageName,
methodName, methodNo}, new String[]{SEQUENCE});
ArrayList<ViewRow> viewRows = new ArrayList<ViewRow>();
while (iter.hasNext()) {
UserArguments item = (UserArguments)iter.next();
viewRows.add(item);
}
PlsqlTypeInfo[] info = PlsqlTypeInfo.getPlsqlTypeInfo(viewRows);
if (info != null) {
for (int i = 0; i < info.length; i++) {
if (data_level == -1 && (sequence == -1 || sequence == info[i].sequence)) {
data_level = info[i].dataLevel; // Data level for the record
}
if (data_level > -1 && data_level == info[i].dataLevel && next_rec_sequence == -1
&& sequence < info[i].sequence) {
next_rec_sequence = info[i].sequence;
break;
}
}
}
data_level++;
iter = viewCache.getRows(ALL_ARGUMENTS, new String[0], new String[]{PACKAGE_NAME,
OBJECT_NAME, OVERLOAD, DATA_LEVEL}, new Object[]{packageName,
methodName, methodNo, Integer.valueOf(data_level)}, new String[]{SEQUENCE});
viewRows = new ArrayList<ViewRow>();
while (iter.hasNext()) { // DISTINCT
UserArguments item = (UserArguments)iter.next();