}
List addressList = bp.getAddress();
addressList.clear();
if (addressType!=null) {
for (int i=0;i<addressType.length;i++) {
Address address=bp.newAddress();
address.setType(addressType[i]);
address.setStreet1(addressStreet[i]);
address.setCityOrLocality(addressCity[i]);
address.setStateOrProvince(addressState[i]);
address.setZipOrPostalCode(addressZip[i]);
address.setEffectiveDate(toDate("EffectiveDate",addressEffective[i]));
addressList.add(address);
}
bp.setAddress(addressList);
}
List phoneList = bp.getPhone();