@Test public void itShouldCreateWithMultipleCompetitionGroups() { daoTestRule.inTransaction(() -> { CompetitionGroupHibernateEntity openEntity = HibernateEntityTestUtils.fullCompetitionGroup( null, "Open", false, BigDecimal.ONE, CompetitionGroup.ResultTimeType.RAW.toString() ); entityDao.create(openEntity); CompetitionGroupHibernateEntity noviceEntity = HibernateEntityTestUtils.fullCompetitionGroup( null, "Novice", true, BigDecimal.ONE, CompetitionGroup.ResultTimeType.HANDICAP.toString() ); entityDao.create(noviceEntity); CompetitionGroupHibernateEntity proEntity = HibernateEntityTestUtils.fullCompetitionGroup( null, "Pro", true, BigDecimal.ONE, CompetitionGroup.ResultTimeType.HANDICAP.toString() ); entityDao.create(proEntity); CompetitionGroupSetHibernateEntity setEntity = HibernateEntityTestUtils.fullCompetitionGroupSet( null, "2017 Competition Groups", Sets.newHashSet(openEntity, noviceEntity, proEntity) ); setDao.create(setEntity); }); }
@Override public void create(CompetitionGroupSetHibernateEntity entity) { persist(entity); }
CompetitionGroupSetDao extends BaseHibernateEntityDao<CompetitionGroupSetHibernateEntity> { @Override public void create(CompetitionGroupSetHibernateEntity entity) { persist(entity); } }
CompetitionGroupSetDao extends BaseHibernateEntityDao<CompetitionGroupSetHibernateEntity> { @Override public void create(CompetitionGroupSetHibernateEntity entity) { persist(entity); } @Inject  CompetitionGroupSetDao(SessionFactory sessionFactory); }
CompetitionGroupSetDao extends BaseHibernateEntityDao<CompetitionGroupSetHibernateEntity> { @Override public void create(CompetitionGroupSetHibernateEntity entity) { persist(entity); } @Inject  CompetitionGroupSetDao(SessionFactory sessionFactory); @Override void create(CompetitionGroupSetHibernateEntity entity); @Override List<CompetitionGroupSetHibernateEntity> findAll(); @Override CompetitionGroupSetHibernateEntity findById(String id); }
CompetitionGroupSetDao extends BaseHibernateEntityDao<CompetitionGroupSetHibernateEntity> { @Override public void create(CompetitionGroupSetHibernateEntity entity) { persist(entity); } @Inject  CompetitionGroupSetDao(SessionFactory sessionFactory); @Override void create(CompetitionGroupSetHibernateEntity entity); @Override List<CompetitionGroupSetHibernateEntity> findAll(); @Override CompetitionGroupSetHibernateEntity findById(String id);  }