Friday, April 3, 2015

Remove/Delete all rows from View Object ADF



// This is a method is AMImpl

public void deleteAdminUser(BigDecimal userId, String code) {


        AdminUserDelVOImpl adminUserDelVO = this.getAdminUserDelVO1();
        adminUserDelVO.applyViewCriteria(null);
        adminUserDelVO.setApplyViewCriteriaName("AdminUserDelVOCriteria");
        adminUserDelVO.setBindCode(code);
        adminUserDelVO.setBindUserId(userId);
        adminUserDelVO.executeQuery();
        adminUserDelVO.setRangeSize(-1);
        Row[] rows = adminUserDelVO.getAllRowsInRange();
        for (Row row : rows) {
            row.remove();
        }
        this.getDBTransaction().commit();
    }

  • https://community.oracle.com/thread/1112374
  • http://tanveeroracle.blogspot.com/2011/12/remove-all-rows-from-viewobject.html

No comments: