state_field_path_expression that evaluates to an orderable
state field of an entity or embeddable class abstract schema type designated in the SELECT clause
by one of the following:
state_field_path_expression that evaluates to the same
state field of the same entity or embeddable abstract schema type as a state_field_path_expression in the SELECT clause
result_variable that refers to an orderable item in the SELECT
clause for which the same result_variable has been specified. This may be
the result of an aggregate_expression, a scalar_expression, or a state_field_path_expression in the SELECT clause.
orderby_item ::= state_field_path_expression [ ASC | DESC ]orderby_item ::= state_field_path_expression | result_variable [ ASC | DESC ]orderby_item ::= state_field_path_expression | result_variable [ ASC | DESC ] [ NULLS FIRST | NULLS LAST ]| Modifier and Type | Class and Description |
|---|---|
| public static enum | OrderByItem.NullOrdering
This enumeration lists all the possible choices for ordering nulls in an item. |
| public static enum | OrderByItem.Ordering
This enumeration lists all the possible choices for ordering an item. |
| Modifier and Type | Field and Description |
|---|---|
| private AbstractExpression | expression
The |
| private String | firstIdentifier
The actual 'FIRST' identifier found in the string representation of the JPQL query. |
| private boolean | hasSpaceAfterExpression
Determines whether a whitespace was parsed after the order by expression. |
| private boolean | hasSpaceAfterNulls
Determines whether a whitespace was parsed after |
| private boolean | hasSpaceAfterOrdering
Determines whether a whitespace was parsed after the ordering. |
| private String | lastIdentifier
The actual 'LAST' identifier found in the string representation of the JPQL query. |
| private OrderByItem. | nullOrdering
The keyword NULLS FIRST specifies ordering null first; the keyword NULLS LAST specifies ordering nulls last. |
| private String | nullsIdentifier
The actual 'NULLS' identifier found in the string representation of the JPQL query. |
| private OrderByItem. | ordering
The keyword ASC specifies that ascending ordering be used; the keyword DESC specifies that descending ordering be used. |
| private String | orderingIdentifier
The actual ordering identifier found in the string representation of the JPQL query. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(ExpressionVisitor
The visitor)ExpressionVisitor to visit this objectImplements org. Expression by the given visitor.
|
| public void | acceptChildren(ExpressionVisitor
The visitor)visitor to visit the children of this object.Implements org. Expression.
|
| protected void | addChildrenTo(Collection<Expression>
The collection used to store the children children)Overrides org. AbstractExpression to the given collection.
|
| protected void | addOrderedChildrenTo(List<Expression>
The list used to store the string representation of this children)AbstractExpressionOverrides org. AbstractExpression to the given list.
|
| public JPQLQueryBNF | findQueryBNF(Expression
The expression)Expression that is a descendant of this oneOverrides org. Implements org. JPQLQueryBNF that represents the fragment of this Expression
that was used when parsing the given Expression.
|
| public String | Returns: Thenull ordering identifier that was actually parsed, if one was present,
otherwise an empty string is returnedReturns the actual |
| public String | Returns: The ordering identifier that was actually parsed, if one was present, otherwise an empty string is returnedReturns the actual ordering identifier found in the string representation of the JPQL query, which has the actual case that was used. |
| public Expression | Returns: The expression that was parsed representing the order by expressionReturns the |
| public OrderByItem. | Returns: The constant representing the null ordering, in the case the ordering was not parsed, thenNullOrdering#DEFAULT is returnedReturns the enum constant representing the null ordering type. |
| public OrderByItem. | Returns: The constant representing the ordering, in the case the ordering was not parsed, thenOrdering#DEFAULT is returnedReturns the enum constant representing the ordering type. |
| public JPQLQueryBNF | getQueryBNF()
Implements org. Expression.
|
| public boolean | Returns: true if the order by expression was parsed; false otherwiseDetermines whether the order by expression was parsed. |
| public boolean | Returns: true if the NULLS identifier was parsed;
false otherwiseDetermines whether the |
| public boolean | Returns: true if the ordering status was parsed; false otherwiseDetermines whether |
| public boolean | Returns: true if there was a whitespace after the order by expression;
false otherwiseDetermines whether a whitespace was parsed after the order by expression. |
| public boolean | Returns: true if there was a whitespace after the NULLS identifier;
false otherwiseDetermines whether a whitespace was parsed after the |
| public boolean | Returns: true if there was a whitespace after the ordering;
false otherwiseDetermines whether a whitespace was parsed after the ordering. |
| public boolean | Returns: true if ASC was parsed; false otherwiseDetermines whether the ordering was specified as being ascendant. |
| public boolean | Returns: true if no ordering was parsed; false otherwiseDetermines whether the ordering was not specified. |
| public boolean | Returns: true if DESC was parsed; false otherwiseDetermines whether the ordering was specified as being descendant. |
| public boolean | Returns: true if NULLS FIRST was parsed; false otherwiseDetermines whether the ordering was specified as being nulls first. |
| public boolean | Returns: true if NULLS LAST was parsed; false otherwiseDetermines whether the ordering was specified as being nulls first. |
| protected boolean | isParsingComplete(WordParser
The text to parse based on the current position of the cursor wordParser, String The word that was retrieved from the given text, which is the first word in the text word, Expression The expression)Expression that has already been parsedOverrides org. |
| protected void | parse(WordParser
The text to parse based on the current position of the cursor wordParser, boolean Determines whether the parsing system should be tolerant, meaning if it should
try to parse invalid or incomplete queries tolerant)Implements abstract org. WordParser.
|
| protected void | toParsedText(StringBuilder
The buffer used to append this writer, boolean Expression's string representationDetermines whether the string representation should represent what was parsed,
i.e. include any "virtual" whitespace (such as ending whitespace) and the actual case of the
JPQL identifiers actual)Implements abstract org. Expression, including its children,
if it has any.
|
| expression | back to summary |
|---|---|
| private AbstractExpression expression The | |
| firstIdentifier | back to summary |
|---|---|
| private String firstIdentifier The actual 'FIRST' identifier found in the string representation of the JPQL query. | |
| hasSpaceAfterExpression | back to summary |
|---|---|
| private boolean hasSpaceAfterExpression Determines whether a whitespace was parsed after the order by expression. | |
| hasSpaceAfterNulls | back to summary |
|---|---|
| private boolean hasSpaceAfterNulls Determines whether a whitespace was parsed after | |
| hasSpaceAfterOrdering | back to summary |
|---|---|
| private boolean hasSpaceAfterOrdering Determines whether a whitespace was parsed after the ordering. | |
| lastIdentifier | back to summary |
|---|---|
| private String lastIdentifier The actual 'LAST' identifier found in the string representation of the JPQL query. | |
| nullOrdering | back to summary |
|---|---|
| private OrderByItem. The keyword NULLS FIRST specifies ordering null first; the keyword NULLS LAST specifies ordering nulls last. | |
| nullsIdentifier | back to summary |
|---|---|
| private String nullsIdentifier The actual 'NULLS' identifier found in the string representation of the JPQL query. | |
| ordering | back to summary |
|---|---|
| private OrderByItem. The keyword ASC specifies that ascending ordering be used; the keyword DESC specifies that descending ordering be used. Ascending ordering is the default. | |
| orderingIdentifier | back to summary |
|---|---|
| private String orderingIdentifier The actual ordering identifier found in the string representation of the JPQL query. | |
| OrderByItem | back to summary |
|---|---|
| public OrderByItem(AbstractExpression parent) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(ExpressionVisitor visitor) Implements org. Doc from org. Visits this
| |
| acceptChildren | back to summary |
|---|---|
| public void acceptChildren(ExpressionVisitor visitor) Implements org. Doc from org. Visits the children of this
This does not traverse the
| |
| addChildrenTo | back to summary |
|---|---|
| protected void addChildrenTo(Collection<Expression> children) Overrides org. Doc from org. Adds the children of this
| |
| addOrderedChildrenTo | back to summary |
|---|---|
| protected void addOrderedChildrenTo(List<Expression> children) Overrides org. Doc from org. Adds the children of this
| |
| findQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF findQueryBNF(Expression expression) Overrides org. Implements org. Doc from org. Retrieves the
| |
| getActualNullOrdering | back to summary |
|---|---|
| public String getActualNullOrdering() Returns the actual
| |
| getActualOrdering | back to summary |
|---|---|
| public String getActualOrdering() Returns the actual ordering identifier found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getExpression | back to summary |
|---|---|
| public Expression getExpression() Returns the
| |
| getNullOrdering | back to summary |
|---|---|
| public OrderByItem. Returns the enum constant representing the null ordering type.
| |
| getOrdering | back to summary |
|---|---|
| public OrderByItem. Returns the enum constant representing the ordering type.
| |
| getQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF getQueryBNF() Implements org. Doc from org. Returns the BNF of this
| |
| hasExpression | back to summary |
|---|---|
| public boolean hasExpression() Determines whether the order by expression was parsed.
| |
| hasNulls | back to summary |
|---|---|
| public boolean hasNulls() Determines whether the
| |
| hasOrdering | back to summary |
|---|---|
| public boolean hasOrdering() Determines whether
| |
| hasSpaceAfterExpression | back to summary |
|---|---|
| public boolean hasSpaceAfterExpression() Determines whether a whitespace was parsed after the order by expression.
| |
| hasSpaceAfterNulls | back to summary |
|---|---|
| public boolean hasSpaceAfterNulls() Determines whether a whitespace was parsed after the
| |
| hasSpaceAfterOrdering | back to summary |
|---|---|
| public boolean hasSpaceAfterOrdering() Determines whether a whitespace was parsed after the ordering.
| |
| isAscending | back to summary |
|---|---|
| public boolean isAscending() Determines whether the ordering was specified as being ascendant.
| |
| isDefault | back to summary |
|---|---|
| public boolean isDefault() Determines whether the ordering was not specified.
| |
| isDescending | back to summary |
|---|---|
| public boolean isDescending() Determines whether the ordering was specified as being descendant.
| |
| isNullsFirst | back to summary |
|---|---|
| public boolean isNullsFirst() Determines whether the ordering was specified as being nulls first.
| |
| isNullsLast | back to summary |
|---|---|
| public boolean isNullsLast() Determines whether the ordering was specified as being nulls first.
| |
| isParsingComplete | back to summary |
|---|---|
| protected boolean isParsingComplete(WordParser wordParser, String word, Expression expression) Overrides org. Doc from org. Determines whether the parsing is complete based on what is left in the given text. The text is never empty.
| |
| parse | back to summary |
|---|---|
| protected void parse(WordParser wordParser, boolean tolerant) Implements abstract org. Doc from org. Parses the query by starting at the current position, which is part of the given
| |
| toParsedText | back to summary |
|---|---|
| protected void toParsedText(StringBuilder writer, boolean actual) Implements abstract org. Doc from org. Generates a string representation of this
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final OrderByItem. | DEFAULT
The constant used when the ordering is not specify. |
| private String | identifier
The actual composite identifier. |
| public static final OrderByItem. | NULLS_FIRST
The constant for 'NULLS FIRST', which tells to order nulls first. |
| public static final OrderByItem. | NULLS_LAST
The constant for 'NULLS LAST', which tells to order nulls last. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: The composite identifiersReturns the actual JPQL composite identifiers identified by this enum constant. |
| public String | toString()
Overrides java. |
| public static OrderByItem. | |
| public static OrderByItem. |
| DEFAULT | back to summary |
|---|---|
| public static final OrderByItem. The constant used when the ordering is not specify. | |
| identifier | back to summary |
|---|---|
| private String identifier The actual composite identifier. | |
| NULLS_FIRST | back to summary |
|---|---|
| public static final OrderByItem. The constant for 'NULLS FIRST', which tells to order nulls first. | |
| NULLS_LAST | back to summary |
|---|---|
| public static final OrderByItem. The constant for 'NULLS LAST', which tells to order nulls last. | |
| NullOrdering | back to summary |
|---|---|
| private NullOrdering(String identifier) Creates a new
| |
| getIdentifier | back to summary |
|---|---|
| public String getIdentifier() Returns the actual JPQL composite identifiers identified by this enum constant.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists. | |
| valueOf | back to summary |
|---|---|
| public static OrderByItem. | |
| values | back to summary |
|---|---|
| public static OrderByItem. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final OrderByItem. | ASC
The constant for 'ASC', which tells to order the items in ascending ordering. |
| public static final OrderByItem. | DEFAULT
The constant used when the ordering is not specify, the default is ascending ordering. |
| public static final OrderByItem. | DESC
The constant for 'DESC', which tells to order the items in descending ordering. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static OrderByItem. | |
| public static OrderByItem. |
| ASC | back to summary |
|---|---|
| public static final OrderByItem. The constant for 'ASC', which tells to order the items in ascending ordering. | |
| DEFAULT | back to summary |
|---|---|
| public static final OrderByItem. The constant used when the ordering is not specify, the default is ascending ordering. | |
| DESC | back to summary |
|---|---|
| public static final OrderByItem. The constant for 'DESC', which tells to order the items in descending ordering. | |
| Ordering | back to summary |
|---|---|
| private Ordering() | |
| valueOf | back to summary |
|---|---|
| public static OrderByItem. | |
| values | back to summary |
|---|---|
| public static OrderByItem. | |