return null;
}
RDBMSStoreManager storeMgr = (RDBMSStoreManager)ec.getStoreManager();
SQLExpressionFactory exprFactory = storeMgr.getSQLExpressionFactory();
ClassLoaderResolver clr = ec.getClassLoaderResolver();
// Form a query UNIONing all possible root candidates (and their subclasses)
Iterator<AbstractClassMetaData> rootCmdIter = rootCmds.iterator();
// Get UNION statement for primary root
AbstractClassMetaData rootCmd = rootCmdIter.next();
UnionStatementGenerator stmtGen =
new UnionStatementGenerator(storeMgr, clr, clr.classForName(rootCmd.getFullClassName()), true,
null, null);
stmtGen.setOption(StatementGenerator.OPTION_SELECT_NUCLEUS_TYPE);
SQLStatement sqlStmtMain = stmtGen.getStatement();
while (rootCmdIter.hasNext())
{
// UNION to any other roots
AbstractClassMetaData cmd = rootCmdIter.next();
stmtGen = new UnionStatementGenerator(storeMgr, clr, clr.classForName(cmd.getFullClassName()), true,
null, null);
stmtGen.setOption(StatementGenerator.OPTION_SELECT_NUCLEUS_TYPE);
SQLStatement sqlStmt = stmtGen.getStatement();
sqlStmtMain.union(sqlStmt);