public void loadThings() { thingList = entityManager.createQuery("select t from UnversionedThing t").getResultList(); thingSet = new HashSet<UnversionedThing>(thingList); thingMap = new HashMap<Long, UnversionedThing>(); for (UnversionedThing thing : thingList) { thingMap.put(thing.getId(), thing); } thing = thingList.get(0); }
public void createSomeThings() { UnversionedThing thing1 = new UnversionedThing(); thing1.setName("thing one"); entityManager.persist(thing1); }