This is a Spring way to accomplish what you are trying to do:
Code:
JdbcTemplate jdbc = new JdbcTemplate(dataSource);
final long[] tehingArray = new long[]{1,2};
Object[] args = { jdbc.execute(new ConnectionCallback() {
Object doInConnection(Connection con) throws SQLException, DataAccessException {
ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("TABLE_OF_NUMBER" , con);
return new oracle.sql.ARRAY(descriptor, con, tehingArray);
}
String stmt = "update table r set r.field=? where id in (select * from table(cast(? as TABLE_OF_NUMBER))))";
jdbc.update(stmt,args);