OQLQuery oql = db.getOQLQuery(sqlSNV);
QueryResults results = oql.execute(Database.READONLY);
while (results.hasMore())
{
TableCount tableCount = (TableCount)results.next();
accessRightsStatusText += "SiteNode versions wrongly connected and removable: " + tableCount.getCount() + "\n";
}
/*
String sql = "CALL SQL select count(*) from cmAccessRight ar where ar.interceptionPointId in (select interceptionPointId from cmInterceptionPoint where name like 'SiteNodeVersion.%') AND ar.parameters NOT IN (select siteNodeVersionId from cmSiteNodeVersion where siteNodeVersionId = ar.parameters) AS org.infoglue.cms.entities.management.TableCount";
if(CmsPropertyHandler.getUseShortTableNames().equalsIgnoreCase("true"))
sql = "CALL SQL select count(*) from cmAccessRight ar where ar.interceptionPointId in (select interceptionPointId from cmInterceptionPoint where name like 'SiteNodeVersion.%') AND ar.parameters NOT IN (select siNoVerId from cmSiNoVer where siNoVerId = ar.parameters) AS org.infoglue.cms.entities.management.TableCount";