We can create ViewCriteria programatically at run time. For that we need to get the VO.
you can write below logic in AMImpl.
you can write below logic in AMImpl.
/*get view
object */
ViewObject
VO= this.findViewObject("EmployeeVO");
/* create VC
*/
ViewCriteria
vc = VO.createViewCriteria();
ViewCriteriaRow
vcRow = vc.createViewCriteriaRow();
/* Set
attribute */
vcRow .setAttribute("EmployeeId",
20);
vc.addRow(vcRow);
VO.applyViewCriteria(vc);
VO.executeQuery();
Thanks a lot
ReplyDelete