|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.teiid.query.sql.lang.OrderBy
public class OrderBy
Represents the ORDER BY clause of a query. The ORDER BY clause states what order the rows of a result should be returned in. Each element in the ORDER BY represents a sort that is completed in the order listed. The optional keywords ASC and DESC can be put after each element to specify whether the sort is ascending or descending.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject |
---|
LanguageObject.Util |
Field Summary | |
---|---|
static boolean |
ASC
Constant for the ascending value |
static boolean |
DESC
Constant for the descending value |
Constructor Summary | |
---|---|
OrderBy()
Constructs a default instance of this class. |
|
OrderBy(java.util.List<? extends SingleElementSymbol> parameters)
Constructs an instance of this class from an ordered list of elements. |
|
OrderBy(java.util.List<? extends SingleElementSymbol> parameters,
java.util.List<java.lang.Boolean> types)
Constructs an instance of this class from an ordered set of elements. |
Method Summary | |
---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor. |
void |
addVariable(SingleElementSymbol element)
Adds a new variable to the list of order by elements. |
void |
addVariable(SingleElementSymbol 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(java.lang.Object obj)
Compare two OrderBys for equality. |
int |
getExpressionPosition(int orderIndex)
|
java.util.List<OrderByItem> |
getOrderByItems()
|
java.lang.Boolean |
getOrderType(int index)
Returns the sort order at the specified index |
java.util.List<SingleElementSymbol> |
getSortKeys()
Get the list or sort key symbols. |
java.util.List<java.lang.Boolean> |
getTypes()
|
SingleElementSymbol |
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()
|
void |
removeOrderByItem(int index)
|
void |
setExpressionPosition(int orderIndex,
int selectIndex)
|
java.lang.String |
toString()
Returns a string representation of an instance of this class. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean ASC
public static final boolean DESC
Constructor Detail |
---|
public OrderBy()
public OrderBy(java.util.List<? extends SingleElementSymbol> parameters)
parameters
- The ordered list of SingleElementSymbolpublic OrderBy(java.util.List<? extends SingleElementSymbol> parameters, java.util.List<java.lang.Boolean> types)
parameters
- The ordered list of SingleElementSymboltypes
- The list of directions by which the results are ordered (Boolean, true=ascending)Method Detail |
---|
public int getVariableCount()
public java.util.List<OrderByItem> getOrderByItems()
public SingleElementSymbol getVariable(int index)
index
- Index to get
public java.lang.Boolean getOrderType(int index)
index
- Index to get
public void addVariable(SingleElementSymbol element)
element
- Element to addpublic void addVariable(SingleElementSymbol 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 java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Other object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void setExpressionPosition(int orderIndex, int selectIndex)
public int getExpressionPosition(int orderIndex)
public void removeOrderByItem(int index)
public boolean hasUnrelated()
public java.util.List<SingleElementSymbol> getSortKeys()
OrderByItem
s.
public java.util.List<java.lang.Boolean> getTypes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |