/** * Creates the account. * * @param account the account */ private void createAccount(final Account account) { this.accountDao.addNewEntity(account); // FUTURE: init data objects in database for subsystem Barker here! // INITIALIZING ROLE DATA ELEMENTS for (final DistributionRole distributionRole : account.getUserRoles()) { this.distributionRoleSetup.setUpRole(distributionRole, account.getUserId()); } }
/** * Destroy account. * * @param account the account */ private void destroyAccount(final Account account) { final UserId userId = account.getUserId(); this.accountDao.deleteByNaturalId(account.getLocalUsername()); // FUTURE: destroy data objects in database for subsystem Barker here! // DESTROYING ROLE DATA ELEMENTS for (final DistributionRole distributionRole : account.getUserRoles()) { this.distributionRoleSetup.tearDownRole(distributionRole, userId); } }