zoukankan      html  css  js  c++  java
  • ADF中遍历VO中的行数据(Iterator)

    在ADF中VO实质上就是一个迭代器,

    1.在Application Module的实现类中,直接借助VO实现类和Row的实现类

     TestVOImpl organizationUser = (TestVOImpl) this.getTestVO1();
     while(organizationUser.hasNext()){
             TestVORowImpl   userRow =(TestVORowImpl) organizationUser.next();
    }

    2.在Application Module的实现类中,按照行数来遍历

     ProcessTaskVOImpl processTaskVO = this.getProcessTaskVO1();
     Row[] processTaskRowSet = processTaskVO.getAllRowsInRange(); //
     for(int i=0,rowSetSize=processTaskRowSet.length;i<rowSetSize;i++){
          ProcessTaskVORowImpl processTaskRow =(ProcessTaskVORowImpl) processTaskRowSet[i];
    }

    3.在Manage bean中遍历

    BindingContext bindingContext = BindingContext.getCurrent();
    BindingContainer bindingContainer = bindingContext.getCurrentBindingsEntry();
    DCBindingContainer dcb = (DCBindingContainer)bindingContainer;
    DCIteratorBinding serviceLogIterator = dcb.findIteratorBinding("ServiceLogPolicyVO1Iterator");
    ServiceLogPolicyVOImpl vo = (ServiceLogPolicyVOImpl) serviceLogIterator.getViewObject();
       for (int i = 0, rowCount = vo.getEstimatedRowCount(); i < rowCount; i++) {
             ServiceLogPolicyVORowImpl serviceRowImpl = (ServiceLogPolicyVORowImpl)vo.getRowAtRangeIndex(i); 
    }
  • 相关阅读:
    书法的艺术
    书法的艺术
    matlab gabor 滤波器
    matlab gabor 滤波器
    生活中的物理学(电学)
    生活中的物理学(电学)
    CCD 与 CMOS
    CCD 与 CMOS
    博物院与国宝
    【设计模式】学习笔记13:组合模式(Composite)
  • 原文地址:https://www.cnblogs.com/qizhelongdeyang/p/3822036.html
Copyright © 2011-2022 走看看