Class DefaultSortStatementFormatter
- java.lang.Object
-
- de.hybris.platform.cms2.cmsitems.service.impl.DefaultSortStatementFormatter
-
- All Implemented Interfaces:
SortStatementFormatter
public class DefaultSortStatementFormatter extends java.lang.Object implements SortStatementFormatter
Default implementation ofSortStatementFormatterwhich wraps theSort.getParameter()value to follow the Flexible Search query syntax (e.g. wrapping with "{" and "}").
-
-
Constructor Summary
Constructors Constructor Description DefaultSortStatementFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringformatSortStatement(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 Detail
-
isApplicable
public boolean isApplicable(AttributeDescriptorModel attributeDescriptor)
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
public java.lang.String formatSortStatement(Sort sort)
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
-
-