@Transactional public void delete(T persistentObject){
  if (!entityManager.contains(persistentObject)) {
    persistentObject=entityManager.merge(persistentObject);
  }
  entityManager.remove(persistentObject);
}

@ Transactional public void delete ( T persistentObject ) { if ( ! entityManager . contains ( persistentObject ) ) { persistentObject = entityManager . merge ( persistentObject ) ; } entityManager . remove ( persistentObject ) ; }
remove an object from persistent storage in the database
