问题描述
我有两个课
class Attachment {
private Long uuid;
private String name;
private String type;
...
}
class User {
private Long uuid;
private String name;
private String type;
...
}
并且我想使用以下算法制定规范
for(Attachment attachment: attachments) {
if(user.getUuid == attachment.getUuid
&& user.getName == attachment.getName
&& user.getType == attachment.getType)
{
return TRUE;
}
}
我根本不理解如何在规范中做到这一点
public static Specification<User> getUsers(List<Attachment> attachments ) {
return (root,query,cb) -> ???;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)