The embedded format should not replicate the lines
kind regards Victor Perez www.e-evolution.com Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=3014091
This commit is contained in:
parent
fc957f778d
commit
a8396e8333
|
@ -88,6 +88,9 @@ public class ImportHelper {
|
||||||
/** Set change PO */
|
/** Set change PO */
|
||||||
boolean isChanged= false;
|
boolean isChanged= false;
|
||||||
|
|
||||||
|
/** ReplicationEvent **/
|
||||||
|
int ReplicationMode = -1;
|
||||||
|
|
||||||
/** Context */
|
/** Context */
|
||||||
private Properties ctx = null;
|
private Properties ctx = null;
|
||||||
|
|
||||||
|
@ -127,7 +130,7 @@ public class ImportHelper {
|
||||||
throw new Exception(Msg.getMsg(ctx, "XMLVersionAttributeMandatory"));
|
throw new Exception(Msg.getMsg(ctx, "XMLVersionAttributeMandatory"));
|
||||||
}
|
}
|
||||||
///Getting Attributes.
|
///Getting Attributes.
|
||||||
int ReplicationMode = new Integer(rootElement.getAttribute("ReplicationMode"));
|
ReplicationMode = new Integer(rootElement.getAttribute("ReplicationMode"));
|
||||||
String ReplicationType = rootElement.getAttribute("ReplicationType");
|
String ReplicationType = rootElement.getAttribute("ReplicationType");
|
||||||
int ReplicationEvent = new Integer(rootElement.getAttribute("ReplicationEvent"));
|
int ReplicationEvent = new Integer(rootElement.getAttribute("ReplicationEvent"));
|
||||||
|
|
||||||
|
@ -230,6 +233,7 @@ public class ImportHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.append("Save Successful ;");
|
result.append("Save Successful ;");
|
||||||
|
ReplicationMode = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -341,11 +345,16 @@ public class ImportHelper {
|
||||||
}
|
}
|
||||||
else if (MEXPFormatLine.TYPE_EmbeddedEXPFormat.equals(line.getType()))
|
else if (MEXPFormatLine.TYPE_EmbeddedEXPFormat.equals(line.getType()))
|
||||||
{
|
{
|
||||||
if(po.is_Changed())
|
|
||||||
|
if(po.is_Changed() && MReplicationStrategy.REPLICATION_DOCUMENT == ReplicationMode)
|
||||||
{
|
{
|
||||||
isChanged = true;
|
isChanged = true;
|
||||||
po.saveReplica(true);
|
po.saveReplica(true);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
// Embedded Export Format It is used for Parent-Son records like Order&OrderLine
|
// Embedded Export Format It is used for Parent-Son records like Order&OrderLine
|
||||||
//get from cache
|
//get from cache
|
||||||
|
@ -363,7 +372,16 @@ public class ImportHelper {
|
||||||
log.info("=== BEGIN RECURSION CALL ===");
|
log.info("=== BEGIN RECURSION CALL ===");
|
||||||
embeddedPo = importElement(ctx, result, referencedElement, referencedExpFormat,ReplicationType, po.get_TrxName());
|
embeddedPo = importElement(ctx, result, referencedElement, referencedExpFormat,ReplicationType, po.get_TrxName());
|
||||||
log.info("embeddedPo = " + embeddedPo);
|
log.info("embeddedPo = " + embeddedPo);
|
||||||
|
if(!embeddedPo.is_Changed())
|
||||||
|
{
|
||||||
|
log.info("Object not changed = " + po.toString());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
embeddedPo.saveReplica(true);
|
embeddedPo.saveReplica(true);
|
||||||
|
isChanged = true;
|
||||||
|
}
|
||||||
result.append(" Embedded Save Successful ; ");
|
result.append(" Embedded Save Successful ; ");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue