dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22123
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10616: Analytics logging
------------------------------------------------------------
revno: 10616
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-04-18 12:37:32 +0200
message:
Analytics logging
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.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-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java 2013-02-25 12:33:35 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java 2013-04-18 10:37:32 +0000
@@ -95,13 +95,16 @@
try
{
int count = 0;
+
ResultSet resultSet = statement.executeQuery( "SELECT * from " + table + " WHERE uid IS NULL" );
+
while ( resultSet.next() )
{
++count;
resultSet.updateString( "uid", CodeGenerator.generateCode() );
resultSet.updateRow();
}
+
if ( count > 0 )
{
log.info( count + " uids updated on " + table );
@@ -133,7 +136,6 @@
{
log.info( count + " timestamps updated on " + table );
}
-
}
catch ( SQLException ex )
{
@@ -149,6 +151,8 @@
}
}
+ createUidConstraints();
+
try
{
Connection conn = dummyStatement.getConnection();
@@ -181,8 +185,6 @@
statement.close();
}
}
-
- createUidConstraints();
}
private void createUidConstraints()