001package gudusoft.gsqlparser.nodes; 002 003import gudusoft.gsqlparser.ESqlClause; 004import gudusoft.gsqlparser.TCustomSqlStatement; 005 006/** 007 * GROUPING SETS are a further extension of the GROUP BY clause that let you specify multiple groupings of data. 008*/ 009public class TGroupingSet extends TParseTreeNode { 010 private TGroupingSetItemList items; 011 012 public void init(Object arg1) 013 { 014 items = (TGroupingSetItemList)arg1; 015 } 016 017 public void doParse(TCustomSqlStatement psql, ESqlClause plocation){ 018 items.doParse(psql,plocation); 019 } 020 021 /** 022 * 023 * @return items in the grouping set item list can be type of rollup_cube_clause and grouping_expression_list 024 * @see TGroupingSetItem 025 */ 026 public TGroupingSetItemList getItems() { 027 return items; 028 } 029 030 public void accept(TParseTreeVisitor v){ 031 v.preVisit(this); 032 v.postVisit(this); 033 } 034 035 public void acceptChildren(TParseTreeVisitor v){ 036 v.preVisit(this); 037 if (this.getItems() != null){ 038 this.getItems().acceptChildren(v); 039 } 040 v.postVisit(this); 041 } 042 043 public void setItems(TGroupingSetItemList items) { 044 this.items = items; 045 } 046}