|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jett.util.GroupOrderByComparator<T>
public class GroupOrderByComparator<T extends Group>
A GroupOrderByComparator is an OrderByComparator
that operates on groups and understands that some of the "order by"
properties are group properties (these must all be before the other "order
by" properties that aren't group properties).
| Constructor Summary | |
|---|---|
GroupOrderByComparator(OrderByComparator<java.lang.Object> orderByComparator,
java.util.List<java.lang.String> groupByProperties)
Constructs a GroupOrderByComparator that operates on the
given List of "order by" expressions, and assumes that the
Groups are grouped by the given List of "group
by" expressions. |
|
| Method Summary | |
|---|---|
int |
compare(T g1,
T g2)
Compares the given Groups to determine order. |
java.util.List<java.lang.String> |
getGroupByProperties()
Returns the List of "group by" properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Constructor Detail |
|---|
public GroupOrderByComparator(OrderByComparator<java.lang.Object> orderByComparator,
java.util.List<java.lang.String> groupByProperties)
GroupOrderByComparator that operates on the
given List of "order by" expressions, and assumes that the
Groups are grouped by the given List of "group
by" expressions.
orderByComparator - An OrderByComparator.groupByProperties - A List of "group by" properties.
ParseException - If there is a problem parsing the expressions, or
if any "group by" properties are preceded in the "order by" properties
by other properties that are not "group by" properties.| Method Detail |
|---|
public int compare(T g1,
T g2)
Compares the given Groups to determine order. Fulfills
the Comparator contract by returning a negative integer, 0,
or a positive integer if o1 is less than, equal to, or
greater than o2.
This compare method compares the group's representative objects.
compare in interface java.util.Comparator<T extends Group>g1 - The left-hand-side Group to compare.g2 - The right-hand-side Group to compare.
g1
is less than, equal to, or greater than g2.
java.lang.UnsupportedOperationException - If any property specified in the
constructor doesn't correspond to a no-argument "get<Property>"
getter method in T, or if the property's type is not
Comparable.public java.util.List<java.lang.String> getGroupByProperties()
List of "group by" properties.
List of "group by" properties.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||