code style improvements.
[utils] / test / enterprise / src / main / java / org / wamblee / support / persistence / JpaTester.java
index 19f7f187d5838f5ef1272db9d67d8934d3a1bb48..26bf6bbc1d75f8c9edb43fafcb5013529c8553ef 100644 (file)
@@ -94,18 +94,12 @@ public class JpaTester {
             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();
     }
 
     /**
@@ -123,26 +117,42 @@ public class JpaTester {
         }
     }
 
+    /**
+     * 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;
     }