class DataModelerEventObserver {

    public void onDataObjectDeleted(@Observes DataObjectDeletedEvent event) {
        Path descriptorPath;
        PersistenceDescriptorModel persistenceDescriptor;

        descriptorPath = descriptorService.calculatePersistenceDescriptorPath(event.getCurrentModule());
        persistenceDescriptor = safeLoad(descriptorPath);

        if (persistenceDescriptor != null &&
                containsClass(persistenceDescriptor.getPersistenceUnit(), event.getCurrentDataObject().getClassName())) {
            persistenceDescriptor.getPersistenceUnit().getClasses().remove(new PersistableDataObject(event.getCurrentDataObject().getClassName()));
            descriptorService.save(descriptorPath,
                                   persistenceDescriptor,
                                   null,
                                   "Entity removed from persistence descriptor");
        }
    }

    public  DataModelerEventObserver();
    @Inject public  DataModelerEventObserver(final PersistenceDescriptorService descriptorService,
                                    final @Named("ioStrategy") IOService ioService);

}