} catch (IllegalAccessException e) {
e.printStackTrace();
}
// add the statement to the catalog
Statement catalogStmt = procedure.getStatements().add(f.getName());
// compile the statement
try {
StatementCompiler.compile(compiler, hsql, catalog, db, estimates, catalogStmt, stmt.getText(), info.singlePartition);
} catch (VoltCompiler.VoltCompilerException e) {
e.printStackTrace();
String msg = shortName + "." + f.getName() + ": " + e.getMessage();
throw compiler.new VoltCompilerException(msg);
}
// If this Field has a Prefetchable annotation or the Statement was
// identified as prefetchable in the project XML, then we will want to
// set the "prefetchable" flag in the catalog for the Statement + Procedure
if (f.getAnnotation(Prefetchable.class) != null ||
procedureDescriptor.m_prefetchable.contains(catalogStmt.getName())) {
catalogStmt.setPrefetchable(true);
procedure.setPrefetchable(true);
}
// If this Field has a Deferrable annotation or the Statement was
// identified as deferrable in the project XML, then we will want to
// set the "deferrable" flag in the catalog for the Statement + Procedure
if (f.getAnnotation(Deferrable.class) != null) {
catalogStmt.setDeferrable(true);
procedure.setDeferrable(true);
}
// if a single stmt is not read only, then the proc is not read
// only
if (catalogStmt.getReadonly() == false)
procHasWriteStmts = true;
}
}
// set the read onlyness of a proc