Search in sources :

Example 6 with ObjectDeletionRequestedEvent

use of org.hisp.dhis.common.ObjectDeletionRequestedEvent in project dhis2-core by dhis2.

the class HibernateProgramInstanceStore method hardDelete.

@Override
public void hardDelete(ProgramInstance programInstance) {
    publisher.publishEvent(new ObjectDeletionRequestedEvent(programInstance));
    getSession().delete(programInstance);
}
Also used : ObjectDeletionRequestedEvent(org.hisp.dhis.common.ObjectDeletionRequestedEvent)

Aggregations

ObjectDeletionRequestedEvent (org.hisp.dhis.common.ObjectDeletionRequestedEvent)6 Test (org.junit.jupiter.api.Test)3 DeleteNotAllowedException (org.hisp.dhis.common.DeleteNotAllowedException)1 TrackedEntityInstance (org.hisp.dhis.trackedentity.TrackedEntityInstance)1