public void removeAccount ( Account accountToDelete ) { // Thou shalt not delete root if ( accountToDelete . getId ( ) . equals ( rootAccount . getId ( ) ) ) return ; Account parent = findParent ( accountToDelete ) ; if ( parent != null ) { removeAccount ( parent , accountToDelete ) ; setDirty ( true ) ; } }
Removes an account from a parent account .