192193194195196197198199200201202
userDao.setEntityManager(em); User user = new User(); user.setFirstName("Albert"); user.setSecondName("Sanso"); userDao.save(user); user = new User(); user.setFirstName("Angels"); user.setSecondName("Garrido"); userDao.save(user);
197198199200201202203204205206207
userDao.save(user); user = new User(); user.setFirstName("Angels"); user.setSecondName("Garrido"); userDao.save(user); user = new User(); user.setFirstName("Rafel"); user.setSecondName("Sanso"); userDao.save(user);
202203204205206207208209210211212
userDao.save(user); user = new User(); user.setFirstName("Rafel"); user.setSecondName("Sanso"); userDao.save(user); user = new User(); user.setFirstName("Cristina"); user.setSecondName("Sanso"); userDao.save(user);
207208209210211212213214215216217
userDao.save(user); user = new User(); user.setFirstName("Cristina"); user.setSecondName("Sanso"); userDao.save(user); user = new User(); user.setFirstName("Helena"); user.setSecondName("Trenchs"); userDao.save(user);
212213214215216217218219220221222
userDao.save(user); user = new User(); user.setFirstName("Helena"); user.setSecondName("Trenchs"); userDao.save(user); user = new User(); user.setFirstName("Sergi"); user.setSecondName("Alegre"); userDao.save(user);
217218219220221222223224
userDao.save(user); user = new User(); user.setFirstName("Sergi"); user.setSecondName("Alegre"); userDao.save(user); } }
171172173174175176177178179180181
Wine wine = null; wine = new Wine(); wine.setCellarName("cellar 1"); wine.setName("El meu vi"); wineDao.save(wine); wine = new Wine(); wine.setCellarName("cellar 2"); wine.setName("El meu vi 2"); wineDao.save(wine);
176177178179180181182183184185186
wineDao.save(wine); wine = new Wine(); wine.setCellarName("cellar 2"); wine.setName("El meu vi 2"); wineDao.save(wine); wine = new Wine(); wine.setCellarName("cellar 3"); wine.setName("El meu vi 3"); wineDao.save(wine);
181182183184185186187188189190191
wineDao.save(wine); wine = new Wine(); wine.setCellarName("cellar 3"); wine.setName("El meu vi 3"); wineDao.save(wine); } private void createPeople() { JPAUserDao userDao = new JPAUserDao();