if (source != null) {
tmp = HibernateHelper.initializeAndUnproxy(source);
}
if (tmp instanceof CorporateCustomerEntity) {
CorporateCustomer corporateCustomer = new CorporateCustomer();
corporateCustomer.setId(tmp.getId());
corporateCustomer.setApartment(tmp.getApartment());
List<Car> cars = DozerHelper.mapList(tmp.getCars(), Car.class);
corporateCustomer.setCars(cars);
corporateCustomer.setCity(tmp.getCity());
corporateCustomer.setCompanyName(((CorporateCustomerEntity) tmp)
.getCompanyName());
corporateCustomer.setCountry(tmp.getCountry());
corporateCustomer.setEmail(tmp.getEmail());
corporateCustomer.setHouse(tmp.getHouse());
corporateCustomer.setHousing(tmp.getHousing());
corporateCustomer.setName(tmp.getName());
corporateCustomer.setPassword(tmp.getPassword());
corporateCustomer.setPatronymic(tmp.getPatronymic());
corporateCustomer.setPhone(tmp.getPhone());
corporateCustomer.setProvince(tmp.getProvince());
corporateCustomer.setRole(tmp.getRole());
corporateCustomer.setStreet(tmp.getStreet());
corporateCustomer.setSurname(tmp.getSurname());
corporateCustomer.setVatRegNo(((CorporateCustomerEntity) tmp)
.getVatRegNo());
corporateCustomer.setZip(tmp.getZip());
result = corporateCustomer;
}
if (tmp instanceof PersonalCustomerEntity) {