Arry to List of Different Type

BSPaymentOCRRuleTO arrBsOCRRule[] = bsProductRegistrationInfoTO.getBSPaymentOCRRuleTO();
List listbsPaymentOCRRuleTO = new ArrayList();
BsPaymentOCRRuleTO ocrRule=null;

for(BSPaymentOCRRuleTO ocr : arrBsOCRRule){
ocrRule=new BsPaymentOCRRuleTO();
ocrRule.setPositionNo(ocr.getPositionNo());
ocrRule.setFromPos(ocr.getFromPos());
ocrRule.setToPos(ocr.getToPos());
listbsPaymentOCRRuleTO.add(ocrRule);
}

bsProductRegistrationInfoTOWS.setBsPaymentOCRRuleTO(bsPaymentOCRRuleTO);

0 comments: