A ideia é receber uma lista que contenha os nomes, e retornar uma lista que não tenha esses nome que está nessa lista recebida.
Então, o código é esse:
[code]public ArrayList findSelectedList(List lista) {
ArrayList<String> layoutsSelecionados = new ArrayList<String>();
EntityManager em = getEntityManager();
String sql= "select u.nome from Layoutsos u where u.nome not in = " + lista + "";
layoutsSelecionados = (ArrayList<String>) em.createQuery(sql).getResultList();
em.getTransaction().commit();
return layoutsSelecionados ;
}[/code]
E esses erros aparecem:
[code]Exception Description: Syntax error parsing [select u.name from Layoutsos u where u.name not in = [Banner, Cartaz, Cartaz]].
[50, 50] The left parenthesis is missing from the IN expression.
[77, 77] The right parenthesis is missing from the IN expression.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1605)