if (publicEntitiesOnly) {
// add the public-entries-only filter to the start of the list, since
// this is a fast filter that has the potential to filter out a lot of entities
// so it should be the first filter to be run
scopedEntityFilterList.add(0, new PublicEntitiesOnlyFilter());
}
// create the module and scoped entity filters from the aggregated lists.
ModuleFilter moduleFilter = CompositeModuleFilter.make(moduleFilterList);
ScopedEntityFilter scopedEntityFilter = CompositeScopedEntityFilter.make(scopedEntityFilterList);