code: public boolean isPrimarySort(String sortExpression) {
          if(sortExpression == null)
              return false;
  
          /* optimizing for the case where the sortExpression *is* the primary sort */
          if(_sorts != null &&
             _sorts.size() > 0 &&
             ((Sort)_sorts.get(0)).getSortExpression().equals(sortExpression)) {
              return true;
          }
          else
              return false;
      }
docs: Check to see if a sort expression is the first {@link Sort} in the {@link SortModel}.  If the
  first {@link Sort} in the SortModel has a {@link Sort#getSortExpression()} that matches the
  <code>sortExpression</code> parameter, the method returns <code>true</code>.  Otherwise, it
  returns <code>false</code>.
  
  @param sortExpression the sort expression to use when checking the SortModel's first {@link Sort}
  @return <code>true</code> if the first {@link Sort} has a sortExpression that matches the
  sortExpression parameter.  <code>false</code> otherwise.