Interface SortStatementFormatter
- All Known Implementing Classes:
DefaultSortStatementFormatter,ItemtypeSortStatementFormatter,StringSortStatementFormatter
public interface SortStatementFormatter
The formatter detects if a custom sort statement should be used given a special condition is fulfilled.
-
Method Summary
Modifier and TypeMethodDescriptionformatSortStatement(Sort sort) Format the sort parameter of the providedSortobject.booleanisApplicable(AttributeDescriptorModel attributeDescriptor) Determines if a custom sort statement formatter should be applied given theAttributeDescriptorModelprovided.
-
Method Details
-
isApplicable
Determines if a custom sort statement formatter should be applied given theAttributeDescriptorModelprovided.- Parameters:
attributeDescriptor- the attribute descriptor model used to evaluate the condition- Returns:
- true when the condition is met and the sort parameter should be formatted using
formatSortStatement(Sort); false otherwise
-
formatSortStatement
Format the sort parameter of the providedSortobject.- Parameters:
sort- the Sort object containing the sort parameter and direction- Returns:
- the formatted sort parameter
-