}
}
protected void _makePrimarySortOrderingWithSelector(NSSelector aSelector) {
String aKey = key();
WODisplayGroup aDisplayGroup = displayGroup();
NSArray<EOSortOrdering> sortOrderings = aDisplayGroup.sortOrderings();
NSMutableArray<EOSortOrdering> aSortOrderingArray;
if (sortOrderings!=null) {
aSortOrderingArray = new NSMutableArray<EOSortOrdering>(sortOrderings);
} else {
aSortOrderingArray = new NSMutableArray<EOSortOrdering>();
}
EOSortOrdering aNewSortOrdering = EOSortOrdering.sortOrderingWithKey(aKey, aSelector);
aSortOrderingArray.insertObjectAtIndex(aNewSortOrdering, 0);
if (aSortOrderingArray.count() > 3) {
// ** limits sorting to 3 levels
aSortOrderingArray.removeLastObject();
}
aDisplayGroup.setSortOrderings(aSortOrderingArray);
}