// the query/datasource combination given in the parameter cannot be a selected
// combination if the query does not match the report's active query ..
return false;
}
AbstractReportDefinition reportDefinition = this.getParent();
while (reportDefinition != null)
{
final DataFactory reportDataFactory = reportDefinition.getDataFactory();
if (reportDataFactory instanceof CompoundDataFactory)
{
final CompoundDataFactory compoundDataFactory = (CompoundDataFactory) reportDataFactory;
for (int i = 0; i < compoundDataFactory.size(); i++)
{
final DataFactory df = compoundDataFactory.getReference(i);
for (final String query : df.getQueryNames())
{
if (!query.equals(queryName))
{
continue;
}
if (df == dataFactory)
{
return true;
}
else
{
return false;
}
}
}
}
else
{
if (reportDataFactory != null)
{
for (final String query : reportDataFactory.getQueryNames())
{
if (!query.equals(queryName))
{
continue;
}
if (reportDataFactory == dataFactory)
{
return true;
}
else
{
return false;
}
}
return true;
}
}
final Section parentSection = reportDefinition.getParentSection();
if (parentSection == null)
{
reportDefinition = null;
}
else