public class GroupByClauseStateObject extends AbstractListHolderStateObject<StateObject>
GROUP BY construct enables the aggregation of values according to the
properties of an entity class.
groupby_clause ::= GROUP BY groupby_item {, groupby_item}*GroupByClause| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GROUP_BY_ITEMS_LIST
Notify the list of
StateObjects representing the GROUP BY
items. |
| Constructor and Description |
|---|
GroupByClauseStateObject(AbstractSelectStatementStateObject parent)
Creates a new
GroupByClauseStateObject. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(StateObjectVisitor visitor)
Visits this
StateObject by the given visitor. |
StateObject |
addGroupByItem(java.lang.String path)
Adds the given path as a select item, which can either be an identification variable or a
state-field path expression.
|
GroupByClause |
getExpression()
Returns the actual parsed object if this
StateObject representation of the JPQL query
was created by parsing an existing JPQL query. |
AbstractSelectStatementStateObject |
getParent()
Returns the parent of this
StateObject. |
boolean |
isEquivalent(StateObject stateObject)
Determines whether the given
StateObject is equivalent to this one, i.e. |
void |
parse(java.lang.String jpqlFragment)
Parses the given JPQL fragment, which will represent the group by items.
|
void |
setExpression(GroupByClause expression)
Keeps a reference of the
parsed object object, which should only be
done when this object is instantiated during the conversion of a parsed JPQL query into
StateObjects. |
addItem, addItems, addListChangeListener, canMoveDown, canMoveUp, getItem, hasItems, items, itemsSize, moveDown, moveUp, removeItem, removeItems, removeListChangeListeneraddPropertyChangeListener, children, decorate, equals, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, isDecorated, removePropertyChangeListener, setExpression, setParent, toString, toString, toTextaddPropertyChangeListener, children, decorate, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, isDecorated, removePropertyChangeListener, setParent, toString, toTextpublic static final java.lang.String GROUP_BY_ITEMS_LIST
StateObjects representing the GROUP BY
items.public GroupByClauseStateObject(AbstractSelectStatementStateObject parent)
GroupByClauseStateObject.parent - The parent of this state object, which cannot be nulljava.lang.NullPointerException - The given parent cannot be nullpublic void accept(StateObjectVisitor visitor)
StateObject by the given visitor.visitor - The visitor to visit this objectpublic StateObject addGroupByItem(java.lang.String path)
path - Either an identification variable or a state-field path expressionStateObject encapsulating the given pathpublic GroupByClause getExpression()
StateObject representation of the JPQL query
was created by parsing an existing JPQL query.getExpression in interface StateObjectgetExpression in class AbstractStateObjectStateObject
or null when the JPQL query is manually created (i.e. not from a string)public AbstractSelectStatementStateObject getParent()
StateObject.getParent in interface StateObjectgetParent in class AbstractStateObjectStateObject, which is null only when
this is the root of the hierarchypublic boolean isEquivalent(StateObject stateObject)
StateObject is equivalent to this one, i.e. the
information of both StateObject is the same.isEquivalent in interface StateObjectisEquivalent in class AbstractStateObjectstateObject - The StateObject to compare its content to this onetrue if both object are equivalent; false otherwisepublic void parse(java.lang.String jpqlFragment)
GROUP BY.jpqlFragment - The string representation of the group by itemspublic void setExpression(GroupByClause expression)
parsed object object, which should only be
done when this object is instantiated during the conversion of a parsed JPQL query into
StateObjects.expression - The parsed object representing a GROUP
BY clauseEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference