throw new RuntimeException("JNDI problem", e);
}
- dbUtils = new DatabaseUtils(dataSource, persistenceUnit.getTables());
+ dbUtils = new DatabaseUtils(dataSource);
dbUtils.start();
- dbUtils.dropTables();
dbUtils.dropTables(JpaCustomizerBuilder.getCustomizer().getJpaTables());
jpaBuilder = new JpaBuilder(db.getJdbcUrl(), db.getUsername(), db.getPassword(), persistenceUnit);
jpaBuilder.start();
-
- // db tester should be created after Jpa builder because jpa builder
- // creates the
- // tables that the tester looks at when it is initialized.
- dbTester = dbUtils.createDbTester();
}
/**
}
}
+ /**
+ * Gets the database.
+ * @return Database.
+ */
public Database getDb() {
return db;
}
+ /**
+ * Gets the datasource.
+ * @return Datasource.
+ */
public DataSource getDataSource() {
return dataSource;
}
- public IDatabaseTester getDbTester() {
- return dbTester;
- }
-
+ /**
+ * Gets the database utilities.
+ * @return Database utilities.
+ */
public DatabaseUtils getDbUtils() {
return dbUtils;
}
+ /**
+ * Gets the jpa builder.
+ * @return JPA builder.
+ */
public JpaBuilder getJpaBuilder() {
return jpaBuilder;
}
+ /**
+ * Gets the persistence unit.
+ * @return Persistence unit.
+ */
public PersistenceUnitDescription getPersistenceUnit() {
return persistenceUnit;
}