public class OrderBy extends Object implements LanguageObject
LanguageObject.Util
Modifier and Type | Field and Description |
---|---|
static boolean |
ASC
Constant for the ascending value
|
static boolean |
DESC
Constant for the descending value
|
Constructor and Description |
---|
OrderBy()
Constructs a default instance of this class.
|
OrderBy(List<? extends Expression> parameters)
Constructs an instance of this class from an ordered list of elements.
|
OrderBy(List<? extends Expression> parameters,
List<Boolean> types)
Constructs an instance of this class from an ordered set of elements.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.
|
OrderByItem |
addVariable(Expression element)
Adds a new variable to the list of order by elements.
|
OrderByItem |
addVariable(Expression element,
boolean type)
Adds a new variable to the list of order by elements with the
specified sort order
|
OrderBy |
clone()
Return deep copy of this ORDER BY clause.
|
boolean |
equals(Object obj)
Compare two OrderBys for equality.
|
int |
getExpressionPosition(int orderIndex) |
List<OrderByItem> |
getOrderByItems() |
Boolean |
getOrderType(int index)
Returns the sort order at the specified index
|
List<Expression> |
getSortKeys()
Get the list or sort key symbols.
|
List<Boolean> |
getTypes() |
Expression |
getVariable(int index)
Returns the ORDER BY element at the specified index.
|
int |
getVariableCount()
Returns the number of elements in ORDER BY.
|
int |
hashCode()
Get hashcode for OrderBy.
|
boolean |
hasUnrelated() |
boolean |
isUserOrdering() |
void |
removeOrderByItem(int index) |
void |
setExpressionPosition(int orderIndex,
int selectIndex) |
void |
setUserOrdering(boolean userOrdering) |
String |
toString()
Returns a string representation of an instance of this class.
|
public static final boolean ASC
public static final boolean DESC
public OrderBy()
public OrderBy(List<? extends Expression> parameters)
parameters
- The ordered list of SingleElementSymbolpublic OrderBy(List<? extends Expression> parameters, List<Boolean> types)
parameters
- The ordered list of SingleElementSymboltypes
- The list of directions by which the results are ordered (Boolean, true=ascending)public int getVariableCount()
public List<OrderByItem> getOrderByItems()
public Expression getVariable(int index)
index
- Index to getpublic Boolean getOrderType(int index)
index
- Index to getpublic OrderByItem addVariable(Expression element)
element
- Element to addpublic OrderByItem addVariable(Expression element, boolean type)
element
- Element to addtype
- True for ascending, false for descendingpublic void acceptVisitor(LanguageVisitor visitor)
LanguageObject
acceptVisitor
in interface LanguageObject
visitor
- Visitor being usedpublic OrderBy clone()
clone
in interface LanguageObject
clone
in class Object
public boolean equals(Object obj)
public int hashCode()
public String toString()
public void setExpressionPosition(int orderIndex, int selectIndex)
public int getExpressionPosition(int orderIndex)
public void removeOrderByItem(int index)
public boolean hasUnrelated()
public List<Expression> getSortKeys()
OrderByItem
s.public void setUserOrdering(boolean userOrdering)
public boolean isUserOrdering()
Copyright © 2019. All rights reserved.