public void setEntityManager(EntityManager entityManager) {
this.entityManager = entityManager;
}
public void setUpAccout(Order order) {
Account account = new Account(createAccountNumber(),
order.getAccounttype(), null);
entityManager.persist(account);
Address address = new Address(order.getAddress().getStreet(), order
.getAddress().getNumber(), order.getAddress().getZipcode(),
order.getAddress().getCity(), order.getAddress().getState(),
order.getAddress().getCountry());
Customer customer = new Customer(order.getPerson().getFirstname(),
order.getPerson().getLastname(), order.getPerson().getTitle(),
order.getPerson().getDateofbirth(), order.getPerson()
.getPlaceofbirth(), order.getPerson().getGender(),
order.getPerson().getPhonenumber(), order.getPerson()
.getEmail(), address);
account.setCustomer(customer);
}