Property prop = (Property) iterator.next();
DialogPropertyElements dialogPropertyElements = (DialogPropertyElements) XStreamHelper.fromXML(prop.getTextValue());
// loop over all elements
List list = dialogPropertyElements.getDialogPropertyElements();
for (Iterator iterator2 = list.iterator(); iterator2.hasNext();) {
DialogElement dialogElement = (DialogElement) iterator2.next();
counterDialogElement++;
try {
String author = dialogElement.getAuthor();
Identity identity = ManagerFactory.getManager().findIdentityByName(author);
if (identity == null) {
// Did not found username => try to find as deleted username <TIMESTAMP>_bks_<USERNAME>
identity = findDeletedIdentityByName(author);
if (identity != null) {
log.audit("migrateAllDialogElementsProperty setIdentityId for author=" + author + " with IdentityId=" + identity.getKey());
dialogElement.setAuthorIdentityId(identity.getKey().toString());
counter++;
} else {
log.warn("migrateAllDialogElementsProperty: Could not found username=" + author);
}
} else {
dialogElement.setAuthor(author);
counterSetAuthor++;
}
if (counterDialogElement % 10 == 0) {
DBFactory.getInstance().intermediateCommit();
}