Interface SORT
-
- All Known Implementing Classes:
SORTImpl
public interface SORTProvides an architectural hook to return sorted selections.
The bridges in this external entity are not bridges in the normal sense that the provide an interface into hand written code, but they serve as a proxy for a missing OAL feature to sort the result of a
selectstatement.Inject a call to one of the
SORTbridges in a "where" clause to cause the result to be sorted. TheSORTbridges returnbooleanwhich allows them to be included with the rest of a "where" expression via a logicaland.Example:
select many persons from instances of Person where (SORT::ascending(attr:"name") and selected.age >= 21);This selection will result in a set of
Persons greater than or equal to 21 years of age, sorted by name. TheSORTbridges only support sorting by a single attribute at a time.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanascending(String attr)Sort the selection ascending by the attribute specified.booleandescending(String attr)Sort the selection descending by the attribute specified.
-
-
-
Method Detail
-
ascending
boolean ascending(String attr)
Sort the selection ascending by the attribute specified.- Parameters:
attr- the attribute to sort by- Returns:
- true
-
descending
boolean descending(String attr)
Sort the selection descending by the attribute specified.- Parameters:
attr- the attribute to sort by- Returns:
- true
-
-