Class DefaultSortStatementFormatter
java.lang.Object
de.hybris.platform.cms2.cmsitems.service.impl.DefaultSortStatementFormatter
- All Implemented Interfaces:
SortStatementFormatter
Default implementation of
SortStatementFormatter which wraps the Sort.getParameter() value to follow
the Flexible Search query syntax (e.g. wrapping with "{" and "}").-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
DefaultSortStatementFormatter
public DefaultSortStatementFormatter()
-
-
Method Details
-
isApplicable
Description copied from interface:SortStatementFormatterDetermines if a custom sort statement formatter should be applied given theAttributeDescriptorModelprovided.- Specified by:
isApplicablein interfaceSortStatementFormatter- 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
SortStatementFormatter.formatSortStatement(Sort); false otherwise
-
formatSortStatement
Description copied from interface:SortStatementFormatterFormat the sort parameter of the providedSortobject.- Specified by:
formatSortStatementin interfaceSortStatementFormatter- Parameters:
sort- the Sort object containing the sort parameter and direction- Returns:
- the formatted sort parameter
-