예제 #1
0
 @Override
 public void init() {
   EnumRange range = new EnumRange();
   Map<String, String> map = new LinkedHashMap<String, String>();
   map.put("0", "男");
   map.put("1", "女");
   range.setResult(map);
   addRange(range);
 }
예제 #2
0
  /**
   * 判断是否有枚举值
   *
   * @return
   */
  public boolean hasItems() {
    boolean result = false;

    Set<Range> rangeList = getBc().getRange().getRangeList();
    for (Range rang : rangeList) {
      if (rang instanceof EnumRange) {
        EnumRange enumRange = (EnumRange) rang;
        Map<String, String> map = enumRange.getResult();
        if (ContainerUtil.isNotNull(map)) result = true;
      }
    }

    return result;
  }
예제 #3
0
파일: StreetBOP.java 프로젝트: jdepend/ILF
  /**
   * @param sourceBCList
   * @return
   */
  @Override
  public BusinessComponent query(BOProperty sourceBop) {
    Map<String, String> streetMap = new LinkedHashMap<String, String>();
    EnumRange.addPlease(streetMap);
    if (StringUtils.isEqual(sourceBop.getValue().getValue(), "9905")) {
      streetMap.put("1", "街道1");
      streetMap.put("2", "街道2");
      streetMap.put("3", "街道3");
      streetMap.put("4", "街道4");
    }

    EnumRange streetRange = new EnumRange();
    streetRange.setResult(streetMap);
    BCRange bcRange = new BCRange();
    bcRange.addRange(streetRange);
    setRange(bcRange);
    return this;
  }