You can use In and bindList:
List<Employee> list = handle
.createQuery("SELECT * from employee where department in (<List>)")
.bindList(Arrays.asList(new String ["Finance""HR","Legal"}))
Should do the Trick.
Beware: depending on the database you are using, the number of entries in bindList is limited. For example,
with MS SQL Server each list entry is counted as a "Parameter" and there is a Maximum of 2100 Parameters allowed,
which can easily be reached in more complex use-cases.
So maybe you have to split your Input up into Blocks of 2000 Entries or to use some other technique.
For the Record: with Oracle, there is also a "2000 Parameters" Limit on Queries, but the whole List counts as
one single Parameter.
Maybe some more Details here: