code: protected <E extends Identifiable> void deleteEntity(EntityManager em, E entity) {
  		requireArgument(em != null, "The entity manager cannot be null.");
  		requireArgument(entity != null, "The entity cannot be null.");
  		if (!em.contains(entity)) {
  			Identifiable attached = findEntity(em, entity.getId(), entity.getClass());
  			em.remove(attached);
  		} else {
  			em.remove(entity);
  		}
  	}
docs: Removes an entity from the database.
  
  @param  <E>     The entity type.
  @param  em      The entity manager to use. Cannot be null.
  @param  entity  The entity to remove. Cannot be null.