\r
import java.sql.ResultSet;\r
import java.sql.SQLException;\r
+import java.util.UUID;\r
\r
import org.apache.commons.lang.StringUtils;\r
import org.apache.log4j.Logger;\r
while (rs.next()){\r
\r
//Created KeyStatement\r
- String updateQuery = " INSERT INTO KeyStatement@_aud (id, created, updated, createdby_id, updatedby_id @audParam)" + \r
- " VALUES (@id, @createdWhen, @updatedWhen, @createdby_id, @updatedby_id @audValue)";\r
+ String updateQuery = " INSERT INTO KeyStatement@_aud (id, uuid, created, updated, createdby_id, updatedby_id @audParam)" + \r
+ " VALUES (@id, @uuid, @createdWhen, @updatedWhen, @createdby_id, @updatedby_id @audValue)";\r
updateQuery = updateQuery.replace("@audValue", audValue);\r
updateQuery = updateQuery.replace("@id", rs.getObject("FeatureNode_id").toString()); //use feature node id for key statement id \r
+ updateQuery = updateQuery.replace("@uuid", UUID.randomUUID().toString()); //use random uuid\r
updateQuery = updateQuery.replace("@createdWhen", nullSafeString(rs.getString("created")));\r
updateQuery = updateQuery.replace("@updatedWhen", nullSafeString((rs.getString("updated"))));\r
updateQuery = updateQuery.replace("@createdby_id", nullSafe(rs.getObject("createdby_id")));\r