code: public static OrderByClause getOrderByClause(JPQLExpression jpqlExpression)
      {
          OrderByClause orderByClause = null;
  
          if (hasOrderBy(jpqlExpression))
          {
              orderByClause = (OrderByClause) ((SelectStatement) jpqlExpression.getQueryStatement()).getOrderByClause();
          }
          return orderByClause;
      }
docs: Gets the order by clause.
  
  @param jpqlExpression
  the jpql expression
  @return the order by clause