Exemple #1
0
 public static Database connect(SessionFactory sessionFactory) {
   Database database = new Database(sessionFactory);
   database.openConnection();
   return database;
 }
 public void given(Builder<?>... builders) throws Exception {
   database.persist(builders);
 }
 public void stop() {
   database.disconnect();
 }
 public <T> void given(T... entities) throws Exception {
   database.persist(entities);
 }
 public void start() {
   database.openConnection();
   database.clean();
 }