public final class OrderByElement extends DataObject
DataObject
that represents an expression of an OrderByClause
.OrderByClause
Constructor and Description |
---|
OrderByElement(TypedExpression expression, boolean ascending, boolean nullsFirst)
Creates an
OrderByElement with the specified expression and characteristics. |
Modifier and Type | Method and Description |
---|---|
TypedExpression |
getExpression()
Gets the expression of this
OrderByElement . |
boolean |
isAscending()
Indicates whether the ordering sequence is ascending.
|
boolean |
isCompositeObject()
Indicates whether this
OrderByElement contains other SyntaxObject objects. |
boolean |
isDescending()
Indicates whether the ordering sequence is descending.
|
boolean |
isNullsFirst()
Indicates whether returned rows containing null values should appear first in the ordering sequence.
|
boolean |
isNullsLast()
Indicates whether returned rows containing null values should appear last in the ordering sequence.
|
java.lang.Object |
visit(SyntaxObjectVisitor visitor, java.lang.Object context)
Calls the
visitOrderByElement method of the SyntaxObjectVisitor and passes that method this OrderByElement and an Object . |
equals, equals, fromSyntax, fromSyntax, fromSyntax, fromSyntax, fromSyntax, isValid, toSyntax, toSyntax, toSyntax, toSyntax, toSyntax, toSyntax
public OrderByElement(TypedExpression expression, boolean ascending, boolean nullsFirst)
OrderByElement
with the specified expression and characteristics.expression
- A TypedExpression
that represents an expression of an OrderByClause
.ascending
- A boolean
that is true
if the sequence of the results for the expression should be in ascending order or false
if they should be in descending order.nullsFirst
- A boolean
that is true
if null
values should appear first in the sequence of the results for the expression or false
if they should appear last.public java.lang.Object visit(SyntaxObjectVisitor visitor, java.lang.Object context)
visitOrderByElement
method of the SyntaxObjectVisitor
and passes that method this OrderByElement
and an Object
.visit
in class SyntaxObject
visitor
- A SyntaxObjectVisitor
.context
- An Object
.Object
returned by the visitOrderByElement
method.public TypedExpression getExpression()
OrderByElement
.TypedExpression
that evaluates to an expression of a SQL ORDER BY
clause.public boolean isAscending()
boolean
that is true
is the ordering sequence is ascending or false
if it is not.public boolean isDescending()
boolean
that is true
is the ordering sequence is descending or false
if it is not.public boolean isNullsFirst()
boolean
that is true
if null
values should appear first in the ordering sequence or false
if they should not.public boolean isNullsLast()
boolean
that is true
if null
values should appear last in the ordering sequence or false
if they should not.public boolean isCompositeObject()
OrderByElement
contains other SyntaxObject
objects. Because an OrderByElement
contains a TypedExpression
, this method returns true
.boolean
that is true
.