1 package org.kuali.student.common.test.spring; 2 3 import java.util.List; 4 import java.util.Map; 5 import java.util.Map.Entry; 6 7 import javax.persistence.EntityManager; 8 9 import org.springframework.transaction.annotation.Transactional; 10 11 @Deprecated 12 @Transactional 13 public class PersistObjectsBean { 14 15 private Map<EntityManager, List<Object>> objectMap; 16 17 public void loadData() { 18 for (Entry<EntityManager, List<Object>> entry : objectMap.entrySet()) { 19 EntityManager em = entry.getKey(); 20 for (Object o : entry.getValue()) { 21 em.persist(o); 22 } 23 } 24 } 25 26 public void setObjectMap(Map<EntityManager, List<Object>> objectMap) { 27 this.objectMap = objectMap; 28 } 29 30 }