private static <T extends WorkspaceEntity> boolean hasAnnotationRootInChanges(@NotNull VersionedStorageChange event,
                                                                                  @NotNull Class<T> entityClass,
                                                                                  @NotNull Predicate<T> hasAnnotationRoot) {
      for (EntityChange<T> change : event.getChanges(entityClass)) {
        T newEntity = change.getNewEntity();
        T oldEntity = change.getOldEntity();
        if (newEntity != null && hasAnnotationRoot.test(newEntity) || oldEntity != null && hasAnnotationRoot.test(oldEntity)) {
          return true;
        }
      }
      return false;
    }
private static <T extends WorkspaceEntity> boolean hasAnnotationRootInChanges(@NotNull VersionedStorageChange event,
                                                                                  @NotNull Class<T> entityClass,
                                                                                  @NotNull Predicate<T> hasAnnotationRoot)