Well, you can embed the query that you used to get the list in the where clause for the update.
UPDATE User a SET a.email = null
WHERE user IN (SELECT b FROM User b WHERE lastName = :?)
By doing this, you will run a query to search the list and update in a single update request.
How do you like it? Do you think this might work?
-Edit -
, , , ,
UPDATE User a SET a.email = null
WHERE user IN (SELECT b FROM User b WHERE lastName IN(:originalList))
, , - :
Collection<String> originalList = Arrays.asList("Kenobi", "Skywalker", "Windu");
query.setParameter("originalList", originalList);
, , , , , .