Example #1
0
 /**
  * Returns a map for given sort info, or null if sort info is null.
  *
  * <p>The map keys are {@link #SORT_COLUMN_NAME} and {@link #SORT_ASCENDING_NAME}.
  *
  * @since 5.4.0
  */
 public static Map<String, Serializable> asMap(SortInfo sortInfo) {
   if (sortInfo == null) {
     return null;
   }
   Map<String, Serializable> res = new HashMap<String, Serializable>();
   res.put(SORT_COLUMN_NAME, sortInfo.getSortColumn());
   res.put(SORT_ASCENDING_NAME, Boolean.valueOf(sortInfo.getSortAscending()));
   return res;
 }