code: private void switchAccountStatus(Account account, Account.Status status,
              UserIdentityContext userIdentityContext) {
          if (logger.isDebugEnabled()) {
              logger.debug("Switching status for account:" + account.getSid() + ",status:" + status);
          }
          switch (status) {
              case CLOSED:
                  sendRVDStatusNotification(account,userIdentityContext);
                  // then proceed to dependency removal
                  removeAccoundDependencies(account.getSid());
                  break;
              default:
                  break;
  
          }
          // finally, set and persist account status
          account = account.setStatus(status);
          accountsDao.updateAccount(account);
      }
docs: Switches an account status at dao level.
  
  If status is CLSOED, Removes all resources belonging to an account.
  
  If rcmlServerApi is not null it will
  also send account-removal notifications to the rcmlserver
  
  @param account