use of eu.ggnet.dwoss.util.gen.GeneratedAddress in project dwoss by gg-net.
the class CustomerGeneratorOperation method scrambleAddress.
public void scrambleAddress(long customerId, AddressType type) {
Customer c = cem.find(Customer.class, customerId);
OldCustomer sc = ConverterUtil.convert(c, mandator.getMatchCode(), defaults);
GeneratedAddress newAddress = GEN.makeAddress();
if (type == INVOICE) {
sc.setREAdresse(newAddress.getStreet());
sc.setREOrt(newAddress.getTown());
sc.setREPlz(newAddress.getPostalCode());
} else {
sc.setLIAdresse(newAddress.getStreet());
sc.setLIOrt(newAddress.getTown());
sc.setLIPlz(newAddress.getPostalCode());
}
ConverterUtil.mergeFromOld(sc, c, mandator.getMatchCode(), defaults);
}
Aggregations