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

This commit is contained in:
hieplq 2017-10-17 15:48:02 +07:00
parent 784c46fb24
commit e91fdb28b4
1 changed files with 12 additions and 1 deletions

View File

@ -48,6 +48,17 @@ public class PoFiller{
value = "".equals(value) ? null : value; value = "".equals(value) ? null : value;
return value; return value;
} }
protected boolean isBlobOnPackinFile (String columnName){
String value = getStringValue(columnName);
if(value == null)
return false;
String strParts [] = value.split("[|]");
return strParts.length == 2;
}
/** /**
* *
* @param columnName * @param columnName
@ -292,7 +303,7 @@ public class PoFiller{
} else if (info.getColumnClass(index) == Timestamp.class) { } else if (info.getColumnClass(index) == Timestamp.class) {
setTimestamp(qName); 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) }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) { if (getStringValue (qName) != null || !isBlobOnPackinFile(qName)) {
setString(qName); setString(qName);
}else { }else {
setBlob(qName); setBlob(qName);