1 public Row[] getEmployees1(List empIds) { 2 ViewObjectImpl empVO = this.getEmpVO(); 3 String inClause = getInClauseWithParamNames(empIds); 4 //setting the where cluase to use the generated in clause 5 empVO.setWhereClause("EmpEO.EMPNO in (" + inClause + ")"); 6 //clearing all existing where clause params if any 7 empVO.setWhereClauseParams(null); 8 //setting values for all bind variables one by one in the in clause 9 for (int i = 0; i < empIds.size(); i++) { 10 //defining the named bind variables programatically 11 empVO.defineNamedWhereClauseParam("empno" + (i + 1), null, null); 12 //setting the value for each named bind variable 13 empVO.setNamedWhereClauseParam("empno" + (i + 1), empIds.get(i)); 14 } 15 empVO.setRangeSize(-1); 16 //executing the query 17 empVO.executeQuery(); 18 //returning the rows from query result 19 return empVO.getAllRowsInRange(); 20 }