class MetadataEntityManager implements SecuredEntityManager {

    @Transactional(propagation = Propagation.REQUIRED)
    public void deleteMetadataEntitiesInProject(Long projectId, String entityClassName) {
        Objects.requireNonNull(projectId);
        if (StringUtils.hasText(entityClassName)) {
            MetadataClass metadataClass =  loadClass(entityClassName);
            metadataEntityDao.deleteMetadataClassFromProject(projectId, metadataClass.getId());
        } else {
            metadataEntityDao.deleteMetadataFromFolder(projectId);
        }
    }

}