SELECT clause the result of a query may be the result of an aggregate
function applied to a path expression.
BNF: aggregate_expression ::= {AVG|MAX|MIN|SUM}([DISTINCT] state_field_path_expression) |
COUNT([DISTINCT] identification_variable | state_field_path_expression | single_valued_association_path_expression)
AggregateFunction
| Modifier and Type | Field and Description |
|---|---|
| private boolean | distinct
Determines whether the |
| public static final String | DISTINCT_PROPERTY
Notifies the visibility of the |
| Access | Constructor and Description |
|---|---|
| protected | AggregateFunctionStateObject(StateObject
The parent of this state object, which cannot be parent)nullCreates a new |
| protected | AggregateFunctionStateObject(StateObject
The parent of this state object, which cannot be parent, boolean nulltrue to add DISTINCT to the query in order to
have distinct values; false if it is not requiredThe stateObject)StateObject representing the encapsulated expressionCreates a new |
| protected | AggregateFunctionStateObject(StateObject
The parent of this state object, which cannot be parent, boolean nulltrue to add DISTINCT to the query in order to
have distinct values; false if it is not requiredEither the identification variable or the state field path expression path)Creates a new |
| protected | AggregateFunctionStateObject(StateObject
The parent of this state object, which cannot be parent, StateObject nullThe stateObject)StateObject representing the encapsulated expressionCreates a new |
| protected | AggregateFunctionStateObject(StateObject
The parent of this state object, which cannot be parent, String nullEither the identification variable or the state field path expression path)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| public AggregateFunction | getExpression()
Implements org. StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
|
| public boolean | Returns: true to add DISTINCT to the query in order to have
distinct values; false if it is not requiredSets whether the |
| public boolean | isEquivalent(StateObject
The stateObject)
StateObject to compare its content to this oneImplements org. StateObject is equivalent to this one, i.e. the
information of both StateObject is the same.
|
| public void | setDistinct(boolean
true to add DISTINCT to the query in order to
have distinct values; false if it is not requiredSets whether the |
| public void | setStateObject(StateObject
The new encapsulated stateObject)
Sets the given StateObjectStateObject to represent the new encapsulated expression.
|
| public void | |
| protected void | toTextEncapsulatedExpression(Appendable
The writer used to print out the string representation of the encapsulated
information writer)
Prints out a string representation of this encapsulated information, which should not be used
to define a true string representation of a JPQL query but should be used for
debugging purposes.
|
| distinct | back to summary |
|---|---|
| private boolean distinct Determines whether the | |
| DISTINCT_PROPERTY | back to summary |
|---|---|
| public static final String DISTINCT_PROPERTY Notifies the visibility of the | |
| AggregateFunctionStateObject | back to summary |
|---|---|
| protected AggregateFunctionStateObject(StateObject parent) Creates a new
| |
| AggregateFunctionStateObject | back to summary |
|---|---|
| protected AggregateFunctionStateObject(StateObject parent, boolean distinct, StateObject stateObject) Creates a new
| |
| AggregateFunctionStateObject | back to summary |
|---|---|
| protected AggregateFunctionStateObject(StateObject parent, boolean distinct, String path) Creates a new
| |
| AggregateFunctionStateObject | back to summary |
|---|---|
| protected AggregateFunctionStateObject(StateObject parent, StateObject stateObject) Creates a new
| |
| AggregateFunctionStateObject | back to summary |
|---|---|
| protected AggregateFunctionStateObject(StateObject parent, String path) Creates a new
| |
| getExpression | back to summary |
|---|---|
| public AggregateFunction getExpression() Implements org. Doc from org. Returns the actual parsed object if this
| |
| hasDistinct | back to summary |
|---|---|
| public boolean hasDistinct() Sets whether the
| |
| isEquivalent | back to summary |
|---|---|
| public boolean isEquivalent(StateObject stateObject) Implements org. Doc from org. Determines whether the given
| |
| setDistinct | back to summary |
|---|---|
| public void setDistinct(boolean distinct) Sets whether the
| |
| setStateObject | back to summary |
|---|---|
| public void setStateObject(StateObject stateObject) Sets the given
| |
| toggleDistinct | back to summary |
|---|---|
| public void toggleDistinct() Reverses the visibility of the | |
| toTextEncapsulatedExpression | back to summary |
|---|---|
| protected void toTextEncapsulatedExpression(Appendable writer) throws IOException Prints out a string representation of this encapsulated information, which should not be used
to define a
| |