use of org.teiid.query.sql.navigator.PreOrPostOrderNavigator in project teiid by teiid.
the class GroupCollectorVisitor method getGroupsIgnoreInlineViewsAndEvaluatableSubqueries.
/**
* Helper to quickly get the groups from obj in the groups collection
* @param obj Language object
* @param elements Collection to collect groups in
*/
public static void getGroupsIgnoreInlineViewsAndEvaluatableSubqueries(LanguageObject obj, Collection<GroupSymbol> groups) {
GroupCollectorVisitor visitor = new GroupCollectorVisitor(groups);
visitor.setIgnoreInlineViewGroups(true);
PreOrPostOrderNavigator nav = new PreOrPostOrderNavigator(visitor, PreOrPostOrderNavigator.PRE_ORDER, true);
nav.setSkipEvaluatable(true);
obj.acceptVisitor(nav);
if (visitor.getInlineViewGroups() != null) {
groups.removeAll(visitor.getInlineViewGroups());
}
}
Aggregations