org.eclipse.datatools.sqltools.sqlbuilder.model
Class SelectHelper

java.lang.Object
  extended by org.eclipse.datatools.sqltools.sqlbuilder.model.SelectHelper

public class SelectHelper
extends java.lang.Object

Helper class for SelectStatement


Constructor Summary
SelectHelper()
           
 
Method Summary
static void addOrderByColumn(QuerySelectStatement selectStmt, QueryValueExpression anExpr, java.lang.String sortType, int position)
          Adds a QueryValueExpression to the Order by clause of a QuerySelectStatement
static void addResultColumn(QuerySelectStatement selectStmt, ResultColumn aResultColumn, java.lang.String alias, int index)
          Adds a column to to the select statement's result columns list
static void addTableToStatement(QuerySelectStatement stmt, TableExpression tableExpr)
          Adds the given table expression to list of tables for a select statement.
static void addTableToStatement(QuerySelect qSelect, TableExpression tableExpr)
          Adds the given table expression to list of tables for a select statement.
static void addTableToStatementAtPosition(SQLQueryObject stmt, TableExpression tableExpr, int position)
           
static OrderByValueExpression appendOrderByColumn(QuerySelectStatement selectStmt, QueryValueExpression colExpr, java.lang.String sortType)
          Creates the OrderByValueExpression column for "Order By" clause from the given value expression if not already exists and appends it to Order By list.
static OrderByResultColumn appendOrderByColumn(QuerySelectStatement selectStmt, ResultColumn resCol, java.lang.String alias, java.lang.String sortType)
          Creates the OrderByResultColumn column for "Order By" clause from the given ResultColumn if not already exists and appends it to Order By list.
static ResultColumn appendResultColumn(SQLQueryObject selectStmt, QueryValueExpression colExpr, java.lang.String alias)
          Creates the Result column from the given ValueExpression and appends it to the select column list in the given Select statement.
static ResultColumn appendResultColumn(SQLQueryObject selectStmt, ResultColumn resCol, java.lang.String alias)
          Appends the given ResultColumn to the select column list in the given Select statement.
static void clearStatementContents(QuerySelectStatement stmt)
          Clears the contents of the given Select statement.Containments which are objects, are set to null and containments which are lists, are cleared.
static GroupingExpression createGroupingExpression(QueryValueExpression valExpr)
          Creates the GroupingExpression and set the given ValueExpression
static GroupingSets createGroupingSets()
          Creates the GroupingSets.
static GroupingSetsElementExpression createGroupingSetsElementExpression()
          Creates the GroupingSetsElementExpression
static GroupingSetsElementExpression createGroupingSetsElementExpression(QueryValueExpression valExpr)
          Creates the GroupingSetsElementExpression and set the given ValueExpression
static GroupingSetsElementSublist createGroupingSetsElementSublist()
          Creates the GroupingSetsElementSublist
static SuperGroup createSuperGroup(int superGroupType)
          Creates the SuperGroup and sets the given type.
static SuperGroupElementExpression createSuperGroupElementExpression(QueryValueExpression valExpr)
          Creates the SuperGroupElementExpression and set the given ValueExpression
static SuperGroupElementSublist createSuperGroupElementSublist()
          Creates the SuperGroupElementSublist.
static WithTableSpecification createWithTableSpecification()
          Creates the WithTableSpecification.
static java.lang.String getCombinedOperatorSQLString(java.lang.String inString)
           
static java.lang.String getCombinedOperatorStringConstant(java.lang.String inString)
          Returns a string to create a QueryCombinedOperator,based on the given string, which is the SQL of the operator
static int getOrderByColIndexFromValueExpr(SQLQueryObject selectStmt, QueryValueExpression searchValExpr)
          Returns the position of the column that matches the given ValueExpression in the order by column list.
static QueryExpressionBody getQueryExpressionBody(QuerySelectStatement stmt)
          Returns the QueryExpressionBody from the Select statement
static QuerySelect getQuerySelect(QuerySelectStatement stmt)
          Returns the QuerySelect from the Select statement
static QuerySelectStatement getQuerySelectStatement(QueryExpressionBody queryExprBody)
          Returns the QuerySelectStatement whose QueryExpressionRoot contain the given QueryExpressionBody object
static ValueExpressionColumn getSelectColumnFromColumnName(SQLQueryObject selectStmt, java.lang.String columnName)
          Looks for a ValueExpressionColumn in the list of assignment select columns in the given statement, with name same as the given name
static boolean hasChild(QueryCombined node)
          Checks if the given QueryCombined object has either a left side child or a right side child.
static void initSelectStmt(QuerySelectStatement stmt)
          Creates the Query Select and appends it to QueryExpressionRoot.
static boolean isNodeFull(QueryCombined node)
          Checks if the given QueryCombined object's left and right children are set.
static boolean isResultColumn(QuerySelect qSelect, ResultColumn resCol)
          Returns true if the give ResultColumn is part of the given select.
static boolean isResultColumn(QuerySelect qSelect, ValueExpressionColumn resColExpr)
          Returns true if the give ValueExpression is part of the given query select's result columns.
static boolean isResultColumn(SQLQueryObject selectStmt, ResultColumn resCol)
          Returns true if the give ResultColumn is part of the given select statement.
static boolean isResultColumn(SQLQueryObject selectStmt, ValueExpressionColumn resColExpr)
          Returns true if the give ValueExpression is part of the given select statement's result columns.
static boolean isSelectStarQuery(QuerySelect querySelect)
          Gets whether or not the given QuerySelect object is a "select *" query.
static boolean moveColumnInStatement(QuerySelectStatement selectStmt, ResultColumn aResultColumn, int movePosition)
          Moves a column in the selectClause to another position (ie new index) in the List.
static boolean moveOrderByInStatement(QuerySelectStatement selectStmt, OrderBySpecification anExpr, int movePosition)
          Moves a column in the order by clause to another position (ie new index in the list).
static void moveOrderByToPosition(OrderBySpecification orderBy, java.util.List orderByList, int position)
          Moves the given OrderBySpecification to the gievn position in the given List containing it
static void refresh(QuerySelect stmt)
          Refreshes the model that ultimately refreseh the UI, this is temporary.
static void refresh(QuerySelectStatement stmt)
          Refreshes the model that ultimately refreseh the UI, this is temporary.
static void refresh(SQLQueryObject stmt)
          Refreshes the model that ultimately refreseh the UI, this is temporary.
static void removeAllColumnFromOrderBy(QuerySelectStatement selectStmt, QueryValueExpression sqlExpr)
          Removes the order by column that contains the given value expression from the given statement.
static void removeAllColumnFromResultColumns(SQLQueryObject selectStmt, QueryValueExpression sqlExpr)
          Removes the result column that contains the given ValueExpression from the given statement.
static void removeColFunctionsForTable(SQLQueryObject selectStmt, TableReference aRef)
          Removes the functions from the result columns whose parameters use columns in the table that is being removed.
static void removeColumnFromOrderBy(SQLQueryObject selectStmt, QueryValueExpression sqlExpr)
          Removes the order by column that contains the given value expression from the given statement.
static void removeColumnFromOrderBy(SQLQueryObject selectStmt, ResultColumn resCol)
          Removes the order by column that contains the given ResultColumn from the given statement.
static void removeColumnFromResultColumns(SQLQueryObject selectStmt, QueryValueExpression sqlExpr)
          Removes the result column that contains the given ValueExpression from the given statement.
static boolean removeTableFromStatement(QuerySelectStatement stmt, TableExpression tableExpr)
          Removes the table from the given Select statement
static boolean replaceColumnValueExpr(QuerySelectStatement selectStmt, ResultColumn resCol, QueryValueExpression newValExpr)
          Replaces the value expression in the given result column of a statement.
static boolean replaceColumnValueExpr(SQLQueryObject selectStmt, ResultColumn resCol, QueryValueExpression newValExpr)
          Replaces the value expression in the given result column of a statement.
static boolean replaceColumnValueExprForOrderBy(QuerySelectStatement selectStmt, ResultColumn resCol, QueryValueExpression newValExpr)
          Replaces the value expression of the Order By column that matches the value expression of the given result column of a statement.
static void replaceStatementContents(QuerySelectStatement oldStmt, QuerySelectStatement newStmt)
          Replaces contents of the statement from the given new statement
static boolean repositionColumnInOrderBy(SQLQueryObject selectStmt, QueryValueExpression sqlExpr, int position)
          Repositions the order by column that contains the given value expression in the given statement.
static void setChildForQueryCombined(QueryCombined combined, QueryExpressionBody child)
          Sets the given QueryExpressionBody object as a child of the given Querycombined object.
static void setResultColumnAlias(ResultColumn resultColumn, java.lang.String alias)
          Assigns the alias to the given result column.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectHelper

public SelectHelper()
Method Detail

refresh

public static void refresh(QuerySelectStatement stmt)
Refreshes the model that ultimately refreseh the UI, this is temporary.

Parameters:
stmt - the QuerySelectStatement which needs to be refreshed

refresh

public static void refresh(QuerySelect stmt)
Refreshes the model that ultimately refreseh the UI, this is temporary.

Parameters:
stmt - the QuerySelect which needs to be refreshed

refresh

public static void refresh(SQLQueryObject stmt)
Refreshes the model that ultimately refreseh the UI, this is temporary.

Parameters:
stmt - the SQLQueryObject which needs to be refreshed

moveOrderByToPosition

public static void moveOrderByToPosition(OrderBySpecification orderBy,
                                         java.util.List orderByList,
                                         int position)
Moves the given OrderBySpecification to the gievn position in the given List containing it

Parameters:
orderBy - the OrderBySpecification
orderByList - the List containing the OrderBySpecification
position - the position in the list to which the OrderBySpecification is to be moved

addTableToStatementAtPosition

public static void addTableToStatementAtPosition(SQLQueryObject stmt,
                                                 TableExpression tableExpr,
                                                 int position)

addTableToStatement

public static void addTableToStatement(QuerySelectStatement stmt,
                                       TableExpression tableExpr)
Adds the given table expression to list of tables for a select statement.

Parameters:
stmt - the QuerySelectStatement in which table needs to be added
tableExpr - the TableExpression which needs to be added

addTableToStatement

public static void addTableToStatement(QuerySelect qSelect,
                                       TableExpression tableExpr)
Adds the given table expression to list of tables for a select statement.

Parameters:
qSelect - the QuerySelect in which table needs to be added
tableExpr - the TableExpression which needs to be added

setChildForQueryCombined

public static void setChildForQueryCombined(QueryCombined combined,
                                            QueryExpressionBody child)
Sets the given QueryExpressionBody object as a child of the given Querycombined object. Attempts to add the child on the left side first, but if there is already a child on the left side then sets the given child object as the right side.

Parameters:
combined - the QueryCombined
child - the QueryExpressionbody object

isNodeFull

public static boolean isNodeFull(QueryCombined node)
Checks if the given QueryCombined object's left and right children are set.

Parameters:
node - the QueryCombined object
Returns:
false if either the left or the right side child of the given node is null

hasChild

public static boolean hasChild(QueryCombined node)
Checks if the given QueryCombined object has either a left side child or a right side child.

Parameters:
node - the QueryCombined object
Returns:
true if node has either a left side child or a right side child

initSelectStmt

public static void initSelectStmt(QuerySelectStatement stmt)
Creates the Query Select and appends it to QueryExpressionRoot.

Parameters:
stmt - the QuerySelectStatement in which table needs to be added

removeTableFromStatement

public static boolean removeTableFromStatement(QuerySelectStatement stmt,
                                               TableExpression tableExpr)
Removes the table from the given Select statement

Parameters:
stmt - the QuerySelectStatement from which table needs to be removed
tableExpr - the TableExpression which needs to be removed
Returns:
true if a value was removed otherwise false

clearStatementContents

public static void clearStatementContents(QuerySelectStatement stmt)
Clears the contents of the given Select statement.Containments which are objects, are set to null and containments which are lists, are cleared.

Parameters:
stmt - the statement being modified

replaceStatementContents

public static void replaceStatementContents(QuerySelectStatement oldStmt,
                                            QuerySelectStatement newStmt)
Replaces contents of the statement from the given new statement

Parameters:
oldStmt - the QuerySelectStatement that needs to be refreshed
newStmt - the QuerySelectStatement from which contents needs to be replaced

getQueryExpressionBody

public static QueryExpressionBody getQueryExpressionBody(QuerySelectStatement stmt)
Returns the QueryExpressionBody from the Select statement

Parameters:
stmt - the QuerySelectStatement from which QuerySelect needs tobe returned
Returns:
the QueryExpressionBody if exists otherwise null

getQuerySelectStatement

public static QuerySelectStatement getQuerySelectStatement(QueryExpressionBody queryExprBody)
Returns the QuerySelectStatement whose QueryExpressionRoot contain the given QueryExpressionBody object

Parameters:
queryExprBody - the QueryExpressionBody
Returns:
the QuerySelectStatement or null.

getCombinedOperatorStringConstant

public static java.lang.String getCombinedOperatorStringConstant(java.lang.String inString)
Returns a string to create a QueryCombinedOperator,based on the given string, which is the SQL of the operator

Parameters:
inString -
Returns:

getCombinedOperatorSQLString

public static java.lang.String getCombinedOperatorSQLString(java.lang.String inString)

getQuerySelect

public static QuerySelect getQuerySelect(QuerySelectStatement stmt)
Returns the QuerySelect from the Select statement

Parameters:
stmt - the QuerySelectStatement from which QuerySelect needs tobe returned
Returns:
the QuerySelect if exists otherwise null

appendResultColumn

public static ResultColumn appendResultColumn(SQLQueryObject selectStmt,
                                              QueryValueExpression colExpr,
                                              java.lang.String alias)
Creates the Result column from the given ValueExpression and appends it to the select column list in the given Select statement.

Parameters:
selectStmt - the QuerySelectStatement to which new column needs to added
colExpr - the given ValueExpression for the column
alias - the Sting value for the alias name of the column
Returns:
the created ResultColumn

appendResultColumn

public static ResultColumn appendResultColumn(SQLQueryObject selectStmt,
                                              ResultColumn resCol,
                                              java.lang.String alias)
Appends the given ResultColumn to the select column list in the given Select statement.

Parameters:
selectStmt - the QuerySelectStatement to which new column needs to added
resCol - the given ResultColumn that needs to be added
alias - the Sting value for the alias name of the column
Returns:
the appended ResultColumn

appendOrderByColumn

public static OrderByValueExpression appendOrderByColumn(QuerySelectStatement selectStmt,
                                                         QueryValueExpression colExpr,
                                                         java.lang.String sortType)
Creates the OrderByValueExpression column for "Order By" clause from the given value expression if not already exists and appends it to Order By list.

Parameters:
selectStmt - the QuerySelectStatement to which new Order By column needs to added
colExpr - the given ValueExpression for the Order By column
sortType - the sort order for the column, it can be ASC or DESC
Returns:
the created OrderByValueExpression column

appendOrderByColumn

public static OrderByResultColumn appendOrderByColumn(QuerySelectStatement selectStmt,
                                                      ResultColumn resCol,
                                                      java.lang.String alias,
                                                      java.lang.String sortType)
Creates the OrderByResultColumn column for "Order By" clause from the given ResultColumn if not already exists and appends it to Order By list.

Parameters:
selectStmt - the QuerySelectStatement to which new Order By column needs to added
resCol - the given ResultColumn that needs to be added to the Order By column
alias - the Sting value for the alias name of the column
sortType - the sort order for the column, it can be ASC or DESC
Returns:
the created OrderByResultColumn column

isResultColumn

public static boolean isResultColumn(SQLQueryObject selectStmt,
                                     ResultColumn resCol)
Returns true if the give ResultColumn is part of the given select statement.

Parameters:
selectStmt - the given QuerySelectStatement
resCol - the given ResultColumn that needs to be find in the given select statement
Returns:
true if the given column exits in the statement otherwise false

isResultColumn

public static boolean isResultColumn(QuerySelect qSelect,
                                     ResultColumn resCol)
Returns true if the give ResultColumn is part of the given select.

Parameters:
qSelectStmt - the given QuerySelect
resCol - the given ResultColumn that needs to be find in the given select statement
Returns:
true if the given column exits in the statement otherwise false

isResultColumn

public static boolean isResultColumn(SQLQueryObject selectStmt,
                                     ValueExpressionColumn resColExpr)
Returns true if the give ValueExpression is part of the given select statement's result columns.

Parameters:
selectStmtselectStmt - the given QuerySelectStatement
resColExpr - the given ValueExpression that needs to be find in the given select statement
Returns:
true if the given ValueExpression exits in the statement otherwise false

isResultColumn

public static boolean isResultColumn(QuerySelect qSelect,
                                     ValueExpressionColumn resColExpr)
Returns true if the give ValueExpression is part of the given query select's result columns.

Parameters:
qSelect - the given QuerySelect
resColExpr - the given ValueExpression that needs to be find in the given select statement
Returns:
true if the given ValueExpression exits in the statement otherwise false

isSelectStarQuery

public static boolean isSelectStarQuery(QuerySelect querySelect)
Gets whether or not the given QuerySelect object is a "select *" query.

Parameters:
querySelect - the QuerySelect to check
Returns:
true when the QuerySelect is "select * from", otherwise false

moveColumnInStatement

public static boolean moveColumnInStatement(QuerySelectStatement selectStmt,
                                            ResultColumn aResultColumn,
                                            int movePosition)
Moves a column in the selectClause to another position (ie new index) in the List. The column is first removed then added to list.

Parameters:
selectStmt - the QuerySelectStatement that the column belongs to
aResultColumn - the ResultColumn that needs to be moved
movePosition - the position to be moved.

-1 moves the column up one position (newIndex = oldIndex -1) +1 moves the column down one position

Returns:
true if column successfully moved, false if not

addResultColumn

public static void addResultColumn(QuerySelectStatement selectStmt,
                                   ResultColumn aResultColumn,
                                   java.lang.String alias,
                                   int index)
Adds a column to to the select statement's result columns list

Parameters:
selectStmt - the QuerySelectStatement object that the column is added
aResultColumn - the ResultColumn object to be added
index - the index of the columns list to add to

addOrderByColumn

public static void addOrderByColumn(QuerySelectStatement selectStmt,
                                    QueryValueExpression anExpr,
                                    java.lang.String sortType,
                                    int position)
Adds a QueryValueExpression to the Order by clause of a QuerySelectStatement

Parameters:
selectStmt - the QueryValueExpression object containing the Order by clause that the QueryValueExpression is to be added to
anExpr - the QueryValueExpression to be added
sortType - the sorttype
position - the position in the order by clause to be inserted

moveOrderByInStatement

public static boolean moveOrderByInStatement(QuerySelectStatement selectStmt,
                                             OrderBySpecification anExpr,
                                             int movePosition)
Moves a column in the order by clause to another position (ie new index in the list). The column is first removed then added to the list in the new position.

Parameters:
selectStmt - the QuerySelectStatement holding the order by clause
anExpr - the OrderBySpecification object to move
movePosition - the number of places to move

-1 moves the column up one position (newIndex = oldIndex -1) +1 moves the column down one position

Returns:
true if column successfully moved, false if not

removeColumnFromResultColumns

public static void removeColumnFromResultColumns(SQLQueryObject selectStmt,
                                                 QueryValueExpression sqlExpr)
Removes the result column that contains the given ValueExpression from the given statement.

Parameters:
selectStmt - the given QuerySelectStatement from which column needs to be removed
sqlExpr - the ValueExpression which needs to be matched

removeColumnFromOrderBy

public static void removeColumnFromOrderBy(SQLQueryObject selectStmt,
                                           ResultColumn resCol)
Removes the order by column that contains the given ResultColumn from the given statement.

Parameters:
selectStmt - the give QuerySelectStatement from which column needs to be removed
resCol - the ResultColumn which needs to be matched

removeColumnFromOrderBy

public static void removeColumnFromOrderBy(SQLQueryObject selectStmt,
                                           QueryValueExpression sqlExpr)
Removes the order by column that contains the given value expression from the given statement.

Parameters:
selectStmt - the give QuerySelectStatement from which column needs to be removed
sqlExpr - the Value Expression which needs to be matched

repositionColumnInOrderBy

public static boolean repositionColumnInOrderBy(SQLQueryObject selectStmt,
                                                QueryValueExpression sqlExpr,
                                                int position)
Repositions the order by column that contains the given value expression in the given statement.

Parameters:
selectStmt - the give QuerySelectStatement from which column needs to be removed
sqlExpr - the Value Expression which needs to be matched
position - the new position for the column
Returns:
true if orderby column found and moved, otherwise false.

replaceColumnValueExpr

public static boolean replaceColumnValueExpr(QuerySelectStatement selectStmt,
                                             ResultColumn resCol,
                                             QueryValueExpression newValExpr)
Replaces the value expression in the given result column of a statement.

Parameters:
selectStmt - the QuerySelectStatement of which the result column is part of
resCol - the given ResultColum for which new ValueExpression needs to be replaced
newValExpr - the new QueryValueExpression that needs to be assigned
Returns:
true if value is replaced, otherwise false

replaceColumnValueExpr

public static boolean replaceColumnValueExpr(SQLQueryObject selectStmt,
                                             ResultColumn resCol,
                                             QueryValueExpression newValExpr)
Replaces the value expression in the given result column of a statement.

Parameters:
selectStmt - the SQLQueryObject of which the result column is part of
resCol - the given ResultColum for which new ValueExpression needs to be replaced
newValExpr - the new QueryValueExpression that needs to be assigned
Returns:
true if value is replaced, otherwise false

replaceColumnValueExprForOrderBy

public static boolean replaceColumnValueExprForOrderBy(QuerySelectStatement selectStmt,
                                                       ResultColumn resCol,
                                                       QueryValueExpression newValExpr)
Replaces the value expression of the Order By column that matches the value expression of the given result column of a statement.

Parameters:
selectStmt - the QuerySelectStatement that contain the order by
resCol - the ResultColumn that needs to be matched with
newValExpr - the new ValueExpression
Returns:
true if value is replaced, otherwise false

getOrderByColIndexFromValueExpr

public static int getOrderByColIndexFromValueExpr(SQLQueryObject selectStmt,
                                                  QueryValueExpression searchValExpr)
Returns the position of the column that matches the given ValueExpression in the order by column list.

Parameters:
selectStmt - the given QuerySelectStatement that contains the order by
searchValExpr - the ValueExpression that needs to be searched
Returns:
the position of the order by column

setResultColumnAlias

public static void setResultColumnAlias(ResultColumn resultColumn,
                                        java.lang.String alias)
Assigns the alias to the given result column.

Parameters:
resultColumn - the ResultColumn for which alias needs to be set
alias - the String value for the alias

getSelectColumnFromColumnName

public static ValueExpressionColumn getSelectColumnFromColumnName(SQLQueryObject selectStmt,
                                                                  java.lang.String columnName)
Looks for a ValueExpressionColumn in the list of assignment select columns in the given statement, with name same as the given name

Parameters:
statement - the statement on which the search needs to be performed
columnName - the name of the ValueExpressionColumn to search for
Returns:
the ValueExpressionColumn with a matching name or null if no match is found

removeAllColumnFromOrderBy

public static void removeAllColumnFromOrderBy(QuerySelectStatement selectStmt,
                                              QueryValueExpression sqlExpr)
Removes the order by column that contains the given value expression from the given statement.

Parameters:
selectStmt - the give QuerySelectStatement from which column needs to be removed
sqlExpr - the Value Expression which needs to be matched

removeAllColumnFromResultColumns

public static void removeAllColumnFromResultColumns(SQLQueryObject selectStmt,
                                                    QueryValueExpression sqlExpr)
Removes the result column that contains the given ValueExpression from the given statement.

Parameters:
selectStmt - the given QuerySelectStatement from which column needs to be removed
sqlExpr - the ValueExpression which needs to be matched

removeColFunctionsForTable

public static void removeColFunctionsForTable(SQLQueryObject selectStmt,
                                              TableReference aRef)
Removes the functions from the result columns whose parameters use columns in the table that is being removed.

Parameters:
selectStmt - the given QuerySelectStatement from which column needs to be removed
aRef - the TableReference that is being removed

createGroupingExpression

public static GroupingExpression createGroupingExpression(QueryValueExpression valExpr)
Creates the GroupingExpression and set the given ValueExpression

Parameters:
valExpr - the ValueExpression that needs to be set in the new GroupingExpressing
Returns:
new GroupingExpression

createSuperGroup

public static SuperGroup createSuperGroup(int superGroupType)
Creates the SuperGroup and sets the given type.

Parameters:
superGroupType - the Int type of the new SuperGroup.
Returns:
the new SuperGroup

createSuperGroupElementExpression

public static SuperGroupElementExpression createSuperGroupElementExpression(QueryValueExpression valExpr)
Creates the SuperGroupElementExpression and set the given ValueExpression

Parameters:
valExpr - the ValueExpression that needs to be set in the new SuperGroupElementExpression
Returns:
the new SuperGroupElementExpression

createSuperGroupElementSublist

public static SuperGroupElementSublist createSuperGroupElementSublist()
Creates the SuperGroupElementSublist.

Returns:
the new SuperGroupElementSublist

createGroupingSets

public static GroupingSets createGroupingSets()
Creates the GroupingSets.

Returns:
the new GroupingSets

createGroupingSetsElementExpression

public static GroupingSetsElementExpression createGroupingSetsElementExpression(QueryValueExpression valExpr)
Creates the GroupingSetsElementExpression and set the given ValueExpression

Parameters:
valExpr - the ValueExpression that needs to be set in the new GroupingSetsElementExpression
Returns:
the new GroupingSetsElementExpression

createGroupingSetsElementExpression

public static GroupingSetsElementExpression createGroupingSetsElementExpression()
Creates the GroupingSetsElementExpression

Returns:
the new GroupingSetsElementExpression

createGroupingSetsElementSublist

public static GroupingSetsElementSublist createGroupingSetsElementSublist()
Creates the GroupingSetsElementSublist

Returns:
the new GroupingSetsElementSublist

createWithTableSpecification

public static WithTableSpecification createWithTableSpecification()
Creates the WithTableSpecification.

Returns:
the new TableWithSpecificatio