Class SortMapper
- java.lang.Object
-
- org.bremersee.comparator.spring.mapper.SortMapper
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.springframework.data.domain.SortapplyDefaults(org.springframework.data.domain.Sort source, Boolean asc, Boolean ignoreCase, Boolean nullIsFirst, String... properties)Apply defaults to sort.static List<SortOrder>fromSort(org.springframework.data.domain.Sort sort)Transforms aSortobject into a sort order list.static SortOrderfromSortOrder(org.springframework.data.domain.Sort.Order sortOrder)Transforms aSort.Orderobject into a sort order.static org.springframework.data.domain.SorttoSort(List<? extends SortOrder> sortOrders)Transforms the sort order into aSortobject.static org.springframework.data.domain.SorttoSort(SortOrders sortOrders)Transforms sort orders into aSortobject.static org.springframework.data.domain.Sort.OrdertoSortOrder(SortOrder sortOrder)Transforms the sort order into aSort.Orderobject.
-
-
-
Method Detail
-
toSort
public static org.springframework.data.domain.Sort toSort(SortOrders sortOrders)
Transforms sort orders into aSortobject.- Parameters:
sortOrders- the sort orders- Returns:
- the sort
-
toSort
public static org.springframework.data.domain.Sort toSort(List<? extends SortOrder> sortOrders)
Transforms the sort order into aSortobject.- Parameters:
sortOrders- the sort orders- Returns:
- the sort object
-
fromSort
public static List<SortOrder> fromSort(org.springframework.data.domain.Sort sort)
Transforms aSortobject into a sort order list.- Parameters:
sort- theSortobject- Returns:
- the sort order list
-
toSortOrder
public static org.springframework.data.domain.Sort.Order toSortOrder(SortOrder sortOrder)
Transforms the sort order into aSort.Orderobject.- Parameters:
sortOrder- the sort order- Returns:
- the sort object
-
fromSortOrder
public static SortOrder fromSortOrder(org.springframework.data.domain.Sort.Order sortOrder)
Transforms aSort.Orderobject into a sort order.- Parameters:
sortOrder- theSort.Orderobject- Returns:
- the sort order
-
applyDefaults
public static org.springframework.data.domain.Sort applyDefaults(org.springframework.data.domain.Sort source, Boolean asc, Boolean ignoreCase, Boolean nullIsFirst, String... properties)Apply defaults to sort.- Parameters:
source- the sourceasc- the ascignoreCase- the ignore-case flagnullIsFirst- the null is first flagproperties- the properties- Returns:
- the sort
-
-