Пример #1
0
  public DynamicVO getDynamicType(String cdConductanceType, String cdNucleusPre, String cdNucleus) {
    for (int i = 0; i < dynamicTypes.size(); i++) {
      DynamicVO vo = (DynamicVO) dynamicTypes.get(i);

      if (vo.getCdConductanceType().equals(cdConductanceType)
          && vo.getCdNucleusPre().equals(cdNucleusPre)
          && vo.getCdNucleus().equals(cdNucleus)) {
        return vo;
      }
    }

    return null;
  }
Пример #2
0
  public void setDynamicType(DynamicVO vo) {
    boolean found = false;

    for (int i = 0; i < dynamicTypes.size(); i++) {
      DynamicVO voList = (DynamicVO) dynamicTypes.get(i);

      if (vo.getCdConductanceType().equals(voList.getCdConductanceType())
          && vo.getCdNucleusPre().equals(voList.getCdNucleusPre())
          && vo.getCdNucleus().equals(voList.getCdNucleus())) {
        dynamicTypes.set(i, vo);
        found = true;
        break;
      }
    }

    if (found == false) {
      dynamicTypes.add(vo);
    }
  }