code: @Deprecated
      public static BasicDBObject parseFieldsString(final String str, final Class clazz, final Mapper mapper, final boolean validate) {
          BasicDBObject ret = new BasicDBObject();
          final String[] parts = str.split(",");
          for (String s : parts) {
              s = s.trim();
              int dir = 1;
  
              if (s.startsWith("-")) {
                  dir = -1;
                  s = s.substring(1).trim();
              }
  
              if (validate) {
                  s = new PathTarget(mapper, clazz, s).translatedPath();
              }
              ret.put(s, dir);
          }
          return ret;
      }
docs: Parses the string and validates each part
  
  @param str      the String to parse
  @param clazz    the class to use when validating
  @param mapper   the Mapper to use
  @param validate true if the results should be validated
  @return the DBObject
  @deprecated this is an internal method and will be removed in the next version