Instead of
select name from table1 where id in (1,...,2500)
use a disjunction of IN clauses:
select name from table1 where id in (1,.. .,1000) or id in (1001,..,2000) or id in (2001,..,2500)
In the attachment you can find helper methods, which are creating the IN query automatically for you (either with a Query or Criteria).
Query usage example:List idList = Arrays.asList(1L, ... , 2500L);
String queryString = "update table1 set verarbeitungsStatus = 'DONE' where {INQUERY}";
query = JPAUtil.createInDisjunctionQuery(entityManager, queryString, "id", idList);
query.executeUpdate();
Criteria usage example:Criteria criteria=entityManager.unwrap(Session.class).createCriteria(Entity1.class);
JPAUtil.createInDisjunction(idList, criteria, "id");
criteria.list();