GROUP BY construct enables the aggregation of values according to the
properties of an entity class.
BNF: groupby_clause ::= GROUP BY groupby_item {, groupby_item}*
GroupByClause
| Modifier and Type | Field and Description |
|---|---|
| public static final String | GROUP_BY_ITEMS_LIST
Notify the list of |
| Access | Constructor and Description |
|---|---|
| public | GroupByClauseStateObject(AbstractSelectStatementStateObject
The parent of this state object, which cannot be parent)nullCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(StateObjectVisitor
The visitor)visitor to visit this objectImplements org. StateObject by the given visitor.
|
| public StateObject | Returns: TheStateObject encapsulating the given pathEither an identification variable or a state-field path expression path)Adds the given path as a select item, which can either be an identification variable or a state-field path expression. |
| public GroupByClause | getExpression()
Overrides org. Implements org. StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
|
| public AbstractSelectStatementStateObject | getParent()
Overrides org. Implements org. StateObject.
|
| public boolean | isEquivalent(StateObject
The stateObject)StateObject to compare its content to this oneOverrides org. Implements org. StateObject is equivalent to this one, i.e. the
information of both StateObject is the same.
|
| protected String | listName()
Implements abstract org. |
| public void | |
| public void | setExpression(GroupByClause
The expression)parsed object representing a GROUP
BY clauseKeeps a reference of the |
| protected void | toTextInternal(Appendable
The writer used to print out the string representation writer)Implements abstract org. StateObject, which should not be used to
define a true string representation of a JPQL query but should be used for
debugging purposes.
|
| GROUP_BY_ITEMS_LIST | back to summary |
|---|---|
| public static final String GROUP_BY_ITEMS_LIST Notify the list of | |
| GroupByClauseStateObject | back to summary |
|---|---|
| public GroupByClauseStateObject(AbstractSelectStatementStateObject parent) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(StateObjectVisitor visitor) Implements org. Doc from org. Visits this
| |
| addGroupByItem | back to summary |
|---|---|
| public StateObject addGroupByItem(String path) Adds the given path as a select item, which can either be an identification variable or a state-field path expression.
| |
| getExpression | back to summary |
|---|---|
| public GroupByClause getExpression() Overrides org. Implements org. Doc from org. Returns the actual parsed object if this
| |
| getParent | back to summary |
|---|---|
| public AbstractSelectStatementStateObject getParent() Overrides org. Implements org. Doc from org. Returns the parent of this
| |
| isEquivalent | back to summary |
|---|---|
| public boolean isEquivalent(StateObject stateObject) Overrides org. Implements org. Doc from org. Determines whether the given
| |
| listName | back to summary |
|---|---|
| protected String listName() Implements abstract org. Doc from org. Returns the name that is uniquely identifying the list. | |
| parse | back to summary |
|---|---|
| public void parse(String jpqlFragment) Parses the given JPQL fragment, which will represent the group by items. The fragment cannot
start with the
| |
| setExpression | back to summary |
|---|---|
| public void setExpression(GroupByClause expression) Keeps a reference of the
| |
| toTextInternal | back to summary |
|---|---|
| protected void toTextInternal(Appendable writer) throws IOException Implements abstract org. Doc from org. Prints out a string representation of this
| |