code: public static <T> OrderBy<T> convertToEbeanOrderBy(Sort sort) {
          if (sort == null) {
              return null;
          }
          List<String> list = new ArrayList<>();
  
          Iterator<Sort.Order> orderIterator = sort.iterator();
          while (orderIterator.hasNext()) {
              Sort.Order so = orderIterator.next();
              list.add(so.getProperty() + " " + so.getDirection());
          }
          return new OrderBy<T>(StringUtils.collectionToCommaDelimitedString(list));
      }
docs: Convert spring data Sort to Ebean OrderBy.
  
  @param sort
  @param <T>
  @return