addressForm.setCustSuffix(custAddress.getCustSuffix());
addressForm.setCustAddressLine1(custAddress.getCustAddressLine1());
addressForm.setCustAddressLine2(custAddress.getCustAddressLine2());
addressForm.setCustCityName(custAddress.getCustCityName());
Country country = custAddress.getCountry();
State state = custAddress.getState();
if (state != null) {
addressForm.setCustStateName(state.getStateName());
addressForm.setCustStateCode(state.getStateCode());
}
addressForm.setCustCountryName(country.getCountryName());
addressForm.setCustCountryCode(country.getCountryCode());
addressForm.setCustZipCode(custAddress.getCustZipCode());
addressForm.setCustPhoneNum(custAddress.getCustPhoneNum());
addressForm.setCustFaxNum(custAddress.getCustFaxNum());
form.setCustAddress(addressForm);
OrderAddress billingAddress = orderHeader.getBillingAddress();
addressForm = new CustomerAddressDisplayForm();
addressForm.setCustUseAddress(billingAddress.getCustUseAddress());
if (billingAddress.getCustUseAddress().equals(Constants.CUST_ADDRESS_USE_OWN)) {
addressForm.setOrderAddressId(billingAddress.getOrderAddressId().toString());
addressForm.setCustPrefix(billingAddress.getCustPrefix());
addressForm.setCustFirstName(billingAddress.getCustFirstName());
addressForm.setCustMiddleName(billingAddress.getCustMiddleName());
addressForm.setCustLastName(billingAddress.getCustLastName());
addressForm.setCustSuffix(billingAddress.getCustSuffix());
addressForm.setCustAddressLine1(billingAddress.getCustAddressLine1());
addressForm.setCustAddressLine2(billingAddress.getCustAddressLine2());
country = billingAddress.getCountry();
state = billingAddress.getState();
addressForm.setCustCityName(billingAddress.getCustCityName());
if (state != null) {
addressForm.setCustStateName(state.getStateName());
addressForm.setCustStateCode(state.getStateCode());
}
addressForm.setCustCountryName(country.getCountryName());
addressForm.setCustCountryCode(country.getCountryCode());
addressForm.setCustZipCode(billingAddress.getCustZipCode());
addressForm.setCustPhoneNum(billingAddress.getCustPhoneNum());
addressForm.setCustFaxNum(billingAddress.getCustFaxNum());
}
form.setBillingAddress(addressForm);
OrderAddress shippingAddress = orderHeader.getShippingAddress();
addressForm = new CustomerAddressDisplayForm();
addressForm.setCustUseAddress(shippingAddress.getCustUseAddress());
if (shippingAddress.getCustUseAddress().equals(Constants.CUST_ADDRESS_USE_OWN)) {
addressForm.setOrderAddressId(shippingAddress.getOrderAddressId().toString());
addressForm.setCustPrefix(shippingAddress.getCustPrefix());
addressForm.setCustFirstName(shippingAddress.getCustFirstName());
addressForm.setCustMiddleName(shippingAddress.getCustMiddleName());
addressForm.setCustLastName(shippingAddress.getCustLastName());
addressForm.setCustSuffix(shippingAddress.getCustSuffix());
addressForm.setCustAddressLine1(shippingAddress.getCustAddressLine1());
addressForm.setCustAddressLine2(shippingAddress.getCustAddressLine2());
addressForm.setCustCityName(shippingAddress.getCustCityName());
country = shippingAddress.getCountry();
state = shippingAddress.getState();
if (state != null) {
addressForm.setCustStateName(state.getStateName());
addressForm.setCustStateCode(state.getStateCode());
}
addressForm.setCustCountryName(country.getCountryName());
addressForm.setCustCountryCode(country.getCountryCode());
addressForm.setCustZipCode(shippingAddress.getCustZipCode());
addressForm.setCustPhoneNum(shippingAddress.getCustPhoneNum());