Thursday, January 19, 2012

ADF 11G : How to remove Multiple Recode Programatically from a Table?

Put the above code in to XXImpl.java & Expose it as client Interface----

public void deleteEmployees(Set keySet){
if(keySet != null){
ViewObject empVO = getEmployeesView1();
for(Key k: (Set)keySet){
Row[] rowToDelete = empVO.findByKey(k, 1);
if(rowToDelete == null rowToDelete.length ==0){
throw new JboException("Failed to find row with serialize Key!" +k.toStringFormat(false));
}
rowToDelete[0].remove();
getTransaction().commit();
}
}
}