Create uuid during 2pack export.

This commit is contained in:
Heng Sin Low 2011-02-16 15:06:12 +08:00
parent d31059cc6d
commit c6eeb2c76e
1 changed files with 8 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package org.adempiere.pipo2;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.UUID;
import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.sax.TransformerHandler;
@ -286,6 +287,13 @@ public class PoExporter {
} else if (DisplayType.isLOB(displayType)) { } else if (DisplayType.isLOB(displayType)) {
addBlob(columnName); addBlob(columnName);
} else { } else {
if (columnName.equals(po.get_TableName() +"_UU")) {
if (po.get_Value(columnName) == null) {
UUID uuid = UUID.randomUUID();
po.set_ValueOfColumn(columnName, uuid.toString());
po.saveEx();
}
}
add(columnName, "", new AttributesImpl()); add(columnName, "", new AttributesImpl());
} }
} }