A crude example of what I need to have an idea is the following:
SELECT name,last_name FROM employees WHERE employee.name IN('sstan','Ivan Botero','Stefan Nolde','Jose Javier Segura','jose','Miguel Osorio','etc');
That is to say that by means of connection with JDBC, to have a query to which a list of elements passes to him within IN by means of code java. concatenating and separating commas and single quotes with each element of the list.
Another crude example (since I can not place the query in question but for example terms serves as a reference) , it would be something like the following in java:
String Query = "SELECT name,lastname " +"FROM employees " +"WHERE lastname IN ("+ lista_con_nombres.toSting() +") " +