public class DefaultSearchHelper extends java.lang.Object implements SearchHelper
SearchHelper.| Constructor and Description |
|---|
DefaultSearchHelper() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Sort> |
convertSort(java.lang.String sort,
SortDirection defaultSortDirection)
Converts the String sort param into a list of
Sort objects. |
Sort |
convertSortBlock(java.lang.String sortBlock,
SortDirection defaultSortDirection)
Convert a sort block, i.e.
|
public java.util.List<Sort> convertSort(java.lang.String sort, SortDirection defaultSortDirection)
SearchHelperSort objects. The input, if not empty, should be already
validated with the following format: {param}:{direction} Multiple sort parameters are allowed if the blocks are
separated by comma.convertSort in interface SearchHelpersort - - the sort parameter received from the requestdefaultSortDirection - the default sort direction if not supplied in any of the sortBlockspublic Sort convertSortBlock(java.lang.String sortBlock, SortDirection defaultSortDirection)
SearchHelperSort object. When a sort direction is invalid or is
not provided, the sort direction is defaulted to the defaultSortDirection param.convertSortBlock in interface SearchHelpersortBlock - a colon delimited String containing the sort field name and sorting directiondefaultSortDirection - the default sort direction if not supplied in the sortBlockSort objectCopyright © 2018 SAP SE. All Rights Reserved.