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 ) ; }
Switches an account status at dao level .