private void removeAccoundDependencies ( Sid sid ) { logger . debug ( "removing accoutn dependencies" ) ; DaoManager daoManager = ( DaoManager ) context . getAttribute ( DaoManager . class . getName ( ) ) ; // remove dependency entities first and dependent entities last. Also, do safer operation first (as a secondary rule) daoManager . getAnnouncementsDao ( ) . removeAnnouncements ( sid ) ; daoManager . getNotificationsDao ( ) . removeNotifications ( sid ) ; daoManager . getShortCodesDao ( ) . removeShortCodes ( sid ) ; daoManager . getOutgoingCallerIdsDao ( ) . removeOutgoingCallerIds ( sid ) ; daoManager . getTranscriptionsDao ( ) . removeTranscriptions ( sid ) ; daoManager . getRecordingsDao ( ) . removeRecordings ( sid ) ; daoManager . getApplicationsDao ( ) . removeApplications ( sid ) ; removeIncomingPhoneNumbers ( sid , daoManager . getIncomingPhoneNumbersDao ( ) ) ; daoManager . getClientsDao ( ) . removeClients ( sid ) ; profileAssociationsDao . deleteProfileAssociationByTargetSid ( sid . toString ( ) ) ; }
Removes all dependent resources of an account . Some resources like CDRs are excluded .