java.lang.Object
java.lang.Record
org.litebridge.orm.api.select.ast.OrderByNode
- Record Components:
previous- the previous node in the chainexpression- the expression to order byascending- whether to sort in ascending order
- All Implemented Interfaces:
QueryNode
public record OrderByNode(@Nullable QueryNode previous, ExpressionSpec expression, boolean ascending)
extends Record
implements QueryNode
Represents an ORDER BY clause in the query AST.
-
Constructor Summary
ConstructorsConstructorDescriptionOrderByNode(@Nullable QueryNode previous, ExpressionSpec expression, boolean ascending) Creates an instance of aOrderByNoderecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theascendingrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpressionrecord component.final inthashCode()Returns a hash code value for this object.@Nullable QueryNodeprevious()Returns the value of thepreviousrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OrderByNode
Creates an instance of aOrderByNoderecord class.- Parameters:
previous- the value for thepreviousrecord componentexpression- the value for theexpressionrecord componentascending- the value for theascendingrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
previous
Returns the value of thepreviousrecord component. -
expression
Returns the value of theexpressionrecord component.- Returns:
- the value of the
expressionrecord component
-
ascending
public boolean ascending()Returns the value of theascendingrecord component.- Returns:
- the value of the
ascendingrecord component
-