@Test public void itShouldAddMultipleSimilarRegistrations() { List<RegistrationHibernateEntity> inEntities = Arrays.asList( buildUnsavedRegistration(), buildUnsavedRegistration(), buildUnsavedRegistration() ); daoTestRule.inTransaction(() -> inEntities.forEach(it -> dao.create(it))); }
@Override public void create(RegistrationHibernateEntity registration) { persist(registration); }
RegistrationDao extends BaseHibernateEntityDao<RegistrationHibernateEntity> { @Override public void create(RegistrationHibernateEntity registration) { persist(registration); } }
RegistrationDao extends BaseHibernateEntityDao<RegistrationHibernateEntity> { @Override public void create(RegistrationHibernateEntity registration) { persist(registration); } @Inject  RegistrationDao(SessionFactory sessionFactory); }
RegistrationDao extends BaseHibernateEntityDao<RegistrationHibernateEntity> { @Override public void create(RegistrationHibernateEntity registration) { persist(registration); } @Inject  RegistrationDao(SessionFactory sessionFactory); @Override RegistrationHibernateEntity findById(String id); List<RegistrationHibernateEntity> getAllWith(EventHibernateEntity event); @Override void create(RegistrationHibernateEntity registration); @Override List<RegistrationHibernateEntity> findAll(); }
RegistrationDao extends BaseHibernateEntityDao<RegistrationHibernateEntity> { @Override public void create(RegistrationHibernateEntity registration) { persist(registration); } @Inject  RegistrationDao(SessionFactory sessionFactory); @Override RegistrationHibernateEntity findById(String id); List<RegistrationHibernateEntity> getAllWith(EventHibernateEntity event); @Override void create(RegistrationHibernateEntity registration); @Override List<RegistrationHibernateEntity> findAll();  }