PIM-1771 : change visibility of applySorterByAttribute and begin to refactor the
implementation of FlexibleSorter