- generate PatientViewImpl and PatientViewRowImp
//instance of AM
PatientAMImpl patientAM = (PatientAMImpl)Configuration.createRootApplicationModule(".......model.patient.am.PatientAM", "PatientAMLocal");
//getVO
PatientViewImpl vo = patientAM.getPatientView1();
//param set
vo.setp_name("patient name existent in database");
//set view criteria name
vo.applyViewCriteria(vo.getViewCriteriaManager().getViewCriteria("PatientViewCriteria"));
//execute VO
vo.executeQuery();
//iterator VO
RowSetIterator iterator = vo.createRowSetIterator(null);
while(iterator.hasNext()){
PatientViewRowImpl patient = (PatientViewRowImpl)iterator.next();
System.out.print("patient: " + patient.getName());
}
//close connection, this is very important to conection pool management
Configuration.releaseRootApplicationModule(patientAM, true);
No responses yet for "Programatically Applying and getting View Criteria Data"
Post a Comment