JAASAuthenticationService jas = new JAASAuthenticationService();
jas.login("test", "welcome1");
String amDef = "com.adfSpecialists.dataSecurity.model.am.EmployeesAM";
String config = "EmployeesAMLocal";
ApplicationModule am =
Configuration.createRootApplicationModule(amDef, config);
// Work with your appmodule and view object here
ViewObjectImpl vo = (ViewObjectImpl)am.findViewObject("EmployeesVO1");
ViewCriteria vc = vo.getViewCriteria("DS_DUMMYVC__EmployeeEO__DEPARTMENT_ID");
vo.applyViewCriteria(vc);
System.out.println(vo.getQuery());
vo.executeQuery();
Configuration.releaseRootApplicationModule(am, true);
jas.logout();
Thanks! Very very helpful post!
ReplyDelete