public class OrderBy
extends java.lang.Object
implements java.lang.Comparable, java.util.Comparator
| Constructor and Description |
|---|
OrderBy()
Default constructor takes no parameters.
|
OrderBy(java.lang.String clause)
Optional constructor takes a String for the initial order by.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares two Mbos using the order by clause given earlier.
|
int |
compareTo(java.lang.Object o)
Compares this OrderBy object to another object.
|
java.lang.String |
getOrderBy()
Returns the order by clause in standard form.
|
boolean |
isEmpty()
Tests to see if any order by has been defined.
|
java.util.List |
orderMboList(java.util.List mboList)
Reorders the list of Mbos using the order by set earlier.
|
void |
setOrderBy(java.lang.String clause)
Parses the order by clause and stores the information internally.
|
public OrderBy()
public OrderBy(java.lang.String clause)
clause - public void setOrderBy(java.lang.String clause)
clause - The order by clause. Assumed to contain attribute names, commas,
and optionally asc & desc tags. If null or the empty string, this order by is cleared.MXApplicationException - Thrown with "workorder", "OrderBy" if the
clause can't be readpublic boolean isEmpty()
public java.lang.String getOrderBy()
public java.util.List orderMboList(java.util.List mboList)
public int compare(java.lang.Object o1,
java.lang.Object o2)
compare in interface java.util.Comparatoro1 - - the first object to be compared.o2 - - the second object to be compared.java.lang.ClassCastException - if the objects aren't both Mbos.public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - The other object to compare tojava.lang.ClassCastException - Is thrown if the parameter is not a String, representing
an order by clause or another OrderBy object.