## 类的使用
kd.bos.entity.operate.result.OperationResult

- 使用OperationResult的程序包
  程序包 | 说明
  --- | ---
  kd.bos.entity.datamodel |
  kd.bos.entity.operate |
  kd.bos.entity.plugin |
  kd.bos.form |
  kd.bos.form.events |
  kd.bos.form.operate |
  kd.bos.servicehelper.operation |

- - ### kd.bos.entity.datamodel中OperationResult的使用

    类型变量类型为OperationResult的kd.bos.entity.datamodel中的方法参数
    限定符和类型 | 方法和说明
    --- | ---
    `java.lang.Object` | IDataModel.`createNewData(java.lang.Object newObject, java.util.function.Supplier<OperationResult> initializer)` 创建数据包，调用初始化方法后触发afterCreateNew事件（一般webapi用来填充数据包）
    `java.lang.Object` | AbstractFormDataModel.`createNewData(java.lang.Object newObject, java.util.function.Supplier<OperationResult> initializer)`
    `java.lang.Object` | IDataModel.`createNewData(java.util.function.Supplier<OperationResult> initializer)` 已过时。 废弃，请使用createNewData(Object newObject, Supplier initializer)
    `java.lang.Object` | AbstractFormDataModel.`createNewData(java.util.function.Supplier<OperationResult> initializer)`
    `void` | IBillModel.`load(java.lang.Object pk, java.util.function.Supplier<OperationResult> initializer)` 加载单据后调用初始化方法（一般webapi用来覆盖更新数据包）

  - ### kd.bos.entity.operate中OperationResult的使用

    返回OperationResult的kd.bos.entity.operate中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `OperationResult` | IOperate.`execute()`

    参数类型为OperationResult的kd.bos.entity.operate中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | IOperationTask.`execute(OperationContext context, kd.bos.dataentity.entity.DynamicObject[] dataEntites, OperationResult result)`

  - ### kd.bos.entity.plugin中OperationResult的使用

    返回OperationResult的kd.bos.entity.plugin中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `OperationResult` | IOperationService.`getOperationResult()`
    `OperationResult` | AbstractOperationServicePlugIn.`getOperationResult()`

    参数类型为OperationResult的kd.bos.entity.plugin中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | OperationServicePlugInProxy.`fireInitializeOperationResult(OperationResult e)`
    `default void` | IOperationServicePlugIn.`initializeOperationResult(OperationResult result)`
    `void` | AbstractOperationServicePlugIn.`initializeOperationResult(OperationResult result)`
    `void` | IOperationService.`setOperationResult(OperationResult operationResult)`
    `void` | AbstractOperationServicePlugIn.`setOperationResult(OperationResult operationResult)` 已过时。

  - ### kd.bos.form中OperationResult的使用

    返回OperationResult的kd.bos.form中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `OperationResult` | IFormView.`invokeOperation(java.lang.String operationKey)` 调用表单操作
    `OperationResult` | IFormView.`invokeOperation(java.lang.String operationKey, kd.bos.dataentity.OperateOption option)` 调用表单操作
    `OperationResult` | IFormView.`invokeOperation(java.lang.String operationKey, OperateParameter operateParameter)` 已过时。 请使用 invokeOperation(String operationKey, OperateOption option)

    参数类型为OperationResult的kd.bos.form中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | IFormView.`showOperationResult(OperationResult operationResult)`
    `void` | AbstractFormView.`showOperationResult(OperationResult operationResult)` 在表单上显示操作的结果
    `void` | IFormView.`showOperationResult(OperationResult operationResult, java.lang.String operateName)`
    `void` | AbstractFormView.`showOperationResult(OperationResult operationResult, java.lang.String operateName)` 在表单上显示操作的结果

  - ### kd.bos.form.events中OperationResult的使用

    返回OperationResult的kd.bos.form.events中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `OperationResult` | AfterDoOperationEventArgs.`getOperationResult()`

    参数类型为OperationResult的kd.bos.form.events中的构造器
    构造器和说明
    `AfterDoOperationEventArgs(java.lang.Object source, java.lang.String operateKey, OperationResult operationResult)`

  - ### kd.bos.form.operate中OperationResult的使用

    返回OperationResult的kd.bos.form.operate中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `abstract OperationResult` | EntityOperate.`callEntityOperate()`
    `OperationResult` | FormOperate.`execute()` 操作执行入口主干方法：调用各个子函数，完成操作的各个逻辑单元
    `OperationResult` | AbstractOperate.`execute()`
    `OperationResult` | EntityOperate.`invokeOperation()`

  - ### kd.bos.servicehelper.operation中OperationResult的使用

    返回OperationResult的kd.bos.servicehelper.operation中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `OperationResult` | DeleteServiceHelper.`deleteOperate(java.lang.String entityName, java.lang.Object[] pks)` 已过时。 请改用 deleteOperate(String entityName, Object[] pks, OperateOption option)
    `OperationResult` | DeleteServiceHelper.`deleteOperate(java.lang.String entityName, java.lang.Object[] pks, kd.bos.dataentity.OperateOption option)`
    `OperationResult` | DeleteServiceHelper.`deleteOperate(java.lang.String operationKey, java.lang.String entityName, java.lang.Object[] pks)` 已过时。 请改用 deleteOperate(String operationKey, String entityName, Object[] pks, OperateOption option)
    `OperationResult` | DeleteServiceHelper.`deleteOperate(java.lang.String operationKey, java.lang.String entityName, java.lang.Object[] pks, kd.bos.dataentity.OperateOption option)`
    `static OperationResult` | OperationServiceHelper.`executeOperate(java.lang.String operationKey, java.lang.String entityNumber, kd.bos.dataentity.entity.DynamicObject[] dataEntities)` 已过时。 请改用 executeOperate(String operationKey, String entityNumber, DynamicObject[] dataEntities, OperateOption option)
    `static OperationResult` | OperationServiceHelper.`executeOperate(java.lang.String operationKey, java.lang.String entityNumber, kd.bos.dataentity.entity.DynamicObject[] dataEntities, kd.bos.dataentity.OperateOption option)`
    `static OperationResult` | OperationServiceHelper.`executeOperate(java.lang.String operationKey, java.lang.String entityNumber, java.lang.Object[] ids)` 已过时。 请改用 executeOperate(String operationKey, String entityNumber, Object[] ids, OperateOption option)
    `static OperationResult` | OperationServiceHelper.`executeOperate(java.lang.String operationKey, java.lang.String entityNumber, java.lang.Object[] ids, kd.bos.dataentity.OperateOption option)`
    `static OperationResult` | SaveServiceHelper.`saveOperate(java.lang.String entityNumber, kd.bos.dataentity.entity.DynamicObject[] dataEntities)` 已过时。 请改用 saveOperate(String entityNumber, DynamicObject[] dataEntities, OperateOption option)
    `static OperationResult` | SaveServiceHelper.`saveOperate(java.lang.String entityNumber, kd.bos.dataentity.entity.DynamicObject[] dataEntities, kd.bos.dataentity.OperateOption option)`
    `static OperationResult` | SaveServiceHelper.`saveOperate(java.lang.String operationKey, java.lang.String entityNumber, kd.bos.dataentity.entity.DynamicObject[] dataEntities)` 已过时。 请改用 (String operationKey, String entityNumber, DynamicObject[] dataEntities, OperateOption option)
    `static OperationResult` | SaveServiceHelper.`saveOperate(java.lang.String operationKey, java.lang.String entityNumber, kd.bos.dataentity.entity.DynamicObject[] dataEntities, kd.bos.dataentity.OperateOption option)` 执行保存操作