dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25018
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12327: Exposed emptyTable method in DbmsManager
------------------------------------------------------------
revno: 12327
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-09-30 14:29:47 +0200
message:
Exposed emptyTable method in DbmsManager
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dbms/DbmsManager.java
dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dbms/DbmsManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dbms/DbmsManager.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dbms/DbmsManager.java 2013-09-30 12:29:47 +0000
@@ -39,4 +39,6 @@
void emptyDatabase();
void clearSession();
+
+ void emptyTable( String table );
}
=== modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.java'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.java 2013-09-23 07:28:36 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/dbms/HibernateDbmsManager.java 2013-09-30 12:29:47 +0000
@@ -193,22 +193,22 @@
sessionFactory.getCurrentSession().clear();
}
+ public void emptyTable( String table )
+ {
+ try
+ {
+ jdbcTemplate.update( "DELETE FROM " + table );
+ }
+ catch ( BadSqlGrammarException ex )
+ {
+ log.debug( "Table " + table + " does not exist" );
+ }
+ }
+
// -------------------------------------------------------------------------
// Supportive methods
// -------------------------------------------------------------------------
- private void emptyTable( String table )
- {
- try
- {
- jdbcTemplate.update( "DELETE FROM " + table );
- }
- catch ( BadSqlGrammarException ex )
- {
- log.debug( "Table " + table + " does not exist" );
- }
- }
-
private void dropTable( String table )
{
try