// create a compound comparator based on the list of properties
ElComparator<T>[] comparators = new ElComparator[sortBy.size()];
List<Property> sortProps = sortBy.getProperties();
for (int i = 0; i < sortProps.size(); i++) {
Property sortProperty = sortProps.get(i);
comparators[i] = createPropertyComparator(sortProperty);
}
return new ElComparatorCompound<T>(comparators);
}