Search in sources :

Example 1 with GeneratedAddress

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);
}
Also used : OldCustomer(eu.ggnet.dwoss.customer.ee.priv.OldCustomer) OldCustomer(eu.ggnet.dwoss.customer.ee.priv.OldCustomer) GeneratedAddress(eu.ggnet.dwoss.util.gen.GeneratedAddress)

Aggregations

OldCustomer (eu.ggnet.dwoss.customer.ee.priv.OldCustomer)1 GeneratedAddress (eu.ggnet.dwoss.util.gen.GeneratedAddress)1