code: @SuppressWarnings("UNCHECKED_CAST")
      public void delete(Class clazz, Object identifier) {
  
          EntityManager entityManager = null;
          try {
              entityManager = entityManagers.poll();
              entityManager.getTransaction().begin();
              try {
  
                  @SuppressWarnings("unchecked") Object object = entityManager.find(clazz, identifier);
                  entityManager.remove(object);
                  entityManager.getTransaction().commit();
              } catch (Exception e) {
                  e.printStackTrace();
                  entityManager.getTransaction().rollback();
              }
          } finally {
              if(entityManager != null)
                  entityManagers.add(entityManager);
          }
      }
docs: Delete an entity within the database
  
  @param clazz Entity type
  @param identifier Primary key of the entity