Saturday, 4 May 2013

Creating where clause programmatically and execute view object

       The below code is used to create where clause and bind variable programmatically execute the view object.        
The defineNamedWhereClauseParam () method of ViewObject is used to create the bind variable at run time.

                   ViewObject empvo = this.getEmployeesView1();
                   String whereClause = "Employees.DEPARTMENT_ID = :deptBind";
                   empvo.defineNamedWhereClauseParam("deptBind", null, null);
                   empvo.setNamedWhereClauseParam("deptBind",new Number(30));

No comments:

Post a Comment