Só quero transformar o comando de consulta em função lambda ou stream.
Criei a List cor = ArrayList<>(). E inseri elementos neste ArrayList.
List cor = new ArrayList<>();
cor.add(new Correspondencia(41,"Paper_Organization","Paper", "Organization",0,0,0.14,0.04,0.23,0.08"));
cor.add(new Correspondencia(11,"email_hasanemail","email", "hasanemail",0,0.19,0.21,0.19,0,0.12));
cor.add(new Correspondencia(31,"Review_Reviewer","Review","Reviewer",0,0.36,0.5,0.41,0,0.25));
cor.add(new Correspondencia(01,"PaperAbstract_Abstract","PaperAbstract","Abstract", 0,0.33,0.45,0.32,0,0.22));
Agora quero filtrar o curso com Lambda ou Stream de acordo com a query
SELECT * FROM CorrespondenciaCandidata c, (SELECT entidadeOrigem, MAX(m1) similaridadeMaxima FROM CorrespondenciaCandidata WHERE m1 <> 0 GROUP BY entidadeOrigem) r WHERE c.entidadeOrigem = r.entidadeOrigem AND c.m1 = r.similaridadeMaxima