public AccountingXml (final @Nonnull Accounting accounting) { customersXml = accounting.getCustomerRegistry().findCustomers().stream().map(customer -> new CustomerXml(customer)) .collect(toList()); projectsXml = accounting.getProjectRegistry().findProjects().stream().map(project -> new ProjectXml(project)) .collect(toList()); invoicesxml = accounting.getInvoiceRegistry().findInvoices().stream().map(invoice -> new InvoiceXml(invoice)) .collect(toList()); }
public void dumpAll() throws IOException { dumpCustomers(accounting.getCustomerRegistry().findCustomers()); dumpProjects(accounting.getProjectRegistry().findProjects()); dumpInvoices(accounting.getInvoiceRegistry().findInvoices()); }