IDEMPIERE-3508:2pack: suport export from normal string column to text long string column

This commit is contained in:
hieplq 2017-09-29 08:53:56 +07:00
parent 53bebb21da
commit 784c46fb24
1 changed files with 14 additions and 5 deletions

View File

@ -41,16 +41,19 @@ public class PoFiller{
this.handler = handler;
}
protected String getStringValue (String columnName){
Element e = element.properties.get(columnName);
String value = e != null ? e.contents.toString() : null;
value = "".equals(value) ? null : value;
return value;
}
/**
*
* @param columnName
*/
public void setString(String columnName){
Element e = element.properties.get(columnName);
String value = e != null ? e.contents.toString() : null;
value = "".equals(value) ? null : value;
String value = getStringValue(columnName);
Object oldValue = po.get_Value(columnName);
if (value == null && oldValue == null)
@ -288,6 +291,12 @@ public class PoFiller{
setInteger(qName);
} else if (info.getColumnClass(index) == Timestamp.class) {
setTimestamp(qName);
}else if(DisplayType.TextLong == info.getColumnDisplayType(index)) {// export column from system have type is normal string, but import to system have this column but type is textlong (mean blob)
if (getStringValue (qName) != null) {
setString(qName);
}else {
setBlob(qName);
}
} else if (DisplayType.isLOB(info.getColumnDisplayType(index))) {
setBlob(qName);
} else {