public ResultModel toResultModel() {
    if (StringUtils.isEmpty(keyClass)) {
      keyClass = "java.lang.String";
    }

    if (StringUtils.isEmpty(valueClass)) {
      valueClass = "java.lang.String";
    }

    ResultModel result = new ResultModel();
    DataResultModel data = result.addData(DATA_INFO_SECTION);

    if (errorString != null) {
      data.addData("Message", errorString);
      data.addData(RESULT_FLAG, operationCompletedSuccessfully);
      return result;
    }

    data.addData(RESULT_FLAG, operationCompletedSuccessfully);
    if (infoString != null) {
      data.addData("Message", infoString);
    }

    if (isGet()) {
      toResultModel_isGet(data);
    } else if (isLocateEntry()) {
      toResultModel_isLocate(result, data);
    } else if (isPut()) {
      toResultModel_isPut(data);
    } else if (isRemove()) {
      toResultModel_isRemove(data);
    }

    return result;
  }
Domain object used for Data Commands Functions
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/domain/DataCommandResult.java