code: public int compareEntitysWithRespectToProperties(Entity entity1, Entity entity2) {
          List<SortKeyType> sortKeys = sortControl.getSortKeys();
  
          int temp = 0;
          for (int i = 0; i < sortKeys.size() && temp == 0; i++) {
              SortKeyType sortKey = (SortKeyType) sortKeys.get(i);
              String propName = sortKey.getPropertyName();
              boolean ascendingSorting = sortKey.isAscendingOrder();
              Object propValue1 = getPropertyValue(entity1, propName, ascendingSorting);
              Object propValue2 = getPropertyValue(entity2, propName, ascendingSorting);
              temp = compareProperties(propValue1, propValue2);
              if (!ascendingSorting) {
                  temp = 0 - temp;
              }
          }
          return temp;
      }
docs: Compares the two entity data objects.
  
  @param member1 the first member object to be compared
  @param member2 the second member object to be compared
  @return a negative integer, zero, or a positive integer as the first member object is less than,
  equal to, or greater than the second.