如何将列表转换为UpdatableRecord? [英] How to convert list into UpdatableRecord?

查看:183
本文介绍了如何将列表转换为UpdatableRecord?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题相关的batchDelete在jooq。我有一个列表 folderProcessChecklistRecordList 在下面给出的代码。但是问题是将列表转换为 UpdatableRecord 。因为batchDelete

I have issue related batchDelete in jooq. I have a list folderProcessChecklistRecordListin my code given below .But the issue is that convert list into UpdatableRecord .Because of batchDelete argument required UpdatableRecord .

错误:


方法batchDelete(UpdatableRecord .. 。)类型Transaction
不适用于参数
(List)

The method batchDelete(UpdatableRecord...) in the type Transaction is not applicable for the arguments (List)

代码这里:

public void deleteFolderProcessChecklist(String folderType, List<FolderProcessChecklistRecord> folderProcessChecklistRecordList) throws ProcessCheckListException{

        if(UserSubject.current().hasPermission(folderType, ButtonPermissionCode.FOLDER_PROCESS_CHECKLIST_DELETE)){
            Transaction.current().batchDelete(folderProcessChecklistRecordList));
        }else{
            throw new ProcessCheckListException();
        }
    }

任何人都能告诉我:

如何将列表转换为updatablerecord?

How to convert the list into updatablerecord ?

推荐答案

您确定 FolderProcessChecklistRecord UpdatableRecord 吗?否则,您无法将其传递给 batchDelete()方法

Are you sure that your FolderProcessChecklistRecord is an UpdatableRecord? Otherwise, you couldn't pass it to either batchDelete() method

重载 DSLContext.batchDelete()方法:

  • batchDelete(UpdatableRecord...)
  • batchDelete(Collection<? extends UpdatableRecord<?>>)

其他问题(您的同事?) ,我怀疑您的自定义 Transaction 类型可能无法正确实现 DSLContext

From other questions (by your coworkers?), I suspect that your custom Transaction type might not correctly implement DSLContext.

这篇关于如何将列表转换为UpdatableRecord?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆