私はstrutsとjavaに比較的慣れていません。私は次のコードを理解しようとしています。
List<LabelValueBean> dbList = getCardProductList();
ConcurrentMap<Integer, ProductItem> ret = new ConcurrentHashMap<Integer, ProductItem>();
for (LabelValueBean lb : dbList) {
ProductItem pi = new ProductItem();
pi.setId(Integer.valueOf(lb.getId()));
pi.setCode(lb.getCode());
pi.setName(lb.getDescription());
LabelValueBeanAuxCol[] aux = lb.getLabelvaluebeanauxcol();
pi.setTypeProduct(Boolean.TRUE);
if (null != aux) {
for (LabelValueBeanAuxCol element : aux) {
if (null != element
&& "PRDCT_SVC_IND".equals(element.getName())) {
pi.setTypeProduct(Boolean.valueOf("Y".equals(element
.getValue())));
}
}
}
pi.setNeedSetup(Boolean.TRUE);
ret.put(pi.getId(), pi);
}
return Himms2LookupUtil
.<ConcurrentMap<Integer, ProductItem>> setValueInCache(
Himms2Names.CARD_SERVICE_PRODUCT_LIST, ret);
}
「PRDCT_SVC_IND」の周りのコードブロックに関連して、列の名前はどのようにlabelvaluebeanにマップされますか?
並行マップとキーと値のペアの機能については考えていますが、ここでの概念のほとんどについてはかなり確信が持てず、運が悪かったのでインターネットで検索しようとしました。コンカレントハッシュマップ、リスト(labelvaluebean)など、ここで使用されている概念の観点から、上記の行が実際に何を意味するのか(もちろん一般的に)、より明確な概要が必要です。入力をいただければ幸いです。