param.setIsarray(true);
cls = cls.getComponentType();
} else
param.setIsarray(false);
VoltType type;
try {
type = VoltType.typeFromClass(cls);
} catch (RuntimeException e) {
// handle the case where the type is invalid
String msg = "Procedure: " + shortName + " has a parameter with invalid type: ";
msg += cls.getSimpleName();
throw compiler.new VoltCompilerException(msg);
}
param.setType(type.getValue());
} // FOR
}
// The input parameters to the MapInputQuery are the input parameters
// for the Procedure
else {
paramTypes = new Class<?>[mapStatement.getParameters().size()];
for (int i = 0; i < paramTypes.length; i++) {
StmtParameter catalog_stmt_param = mapStatement.getParameters().get(i);
assert (catalog_stmt_param != null);
VoltType vtype = VoltType.get(catalog_stmt_param.getJavatype());
paramTypes[i] = vtype.classFromType();
ProcParameter catalog_proc_param = procedure.getParameters().add(catalog_stmt_param.getName());
catalog_proc_param.setIndex(i);
catalog_proc_param.setIsarray(false); // One day...
catalog_proc_param.setType(vtype.getValue());
} // FOR
}
return (paramTypes);
}