[ 2195016 ] Implementation delete records messages

http://sourceforge.net/tracker/index.php?func=detail&aid=2195016&group_id=176962&atid=879332
This commit is contained in:
vpj-cd 2008-10-25 18:57:46 +00:00
parent 821ae5d8b6
commit dee3c8bf79
1 changed files with 12 additions and 2 deletions

View File

@ -61,6 +61,9 @@ import org.w3c.dom.NodeList;
/** /**
* @author Trifon N. Trifonov * @author Trifon N. Trifonov
* @author Antonio Cañaveral, e-Evolution
* <li>[ 2195016 ] Implementation delete records messages
* <li>http://sourceforge.net/tracker/index.php?func=detail&aid=2195016&group_id=176962&atid=879332
*/ */
public class ImportHelper { public class ImportHelper {
@ -121,6 +124,8 @@ public class ImportHelper {
if (version == null || "".equals(version)) { if (version == null || "".equals(version)) {
throw new Exception(Msg.getMsg(ctx, "XMLVersionAttributeMandatory")); throw new Exception(Msg.getMsg(ctx, "XMLVersionAttributeMandatory"));
} }
boolean isDelete=false;
isDelete=rootElement.getAttribute("deleted").equals("Y");
MClient client = null; MClient client = null;
client = getAD_ClientByValue(ctx, AD_Client_Value, trxName); client = getAD_ClientByValue(ctx, AD_Client_Value, trxName);
@ -154,7 +159,12 @@ public class ImportHelper {
PO po = importElement(ctx, result, rootElement, expFormat, trxName); PO po = importElement(ctx, result, rootElement, expFormat, trxName);
// Here must invoke other method else we get cycle... // Here must invoke other method else we get cycle...
boolean resultSave = po.saveReplica(true); boolean resultSave=false;
if(isDelete)
resultSave=po.delete(true);
else
resultSave = po.saveReplica(true);
result.append("ResultSave=").append(resultSave).append("; "); result.append("ResultSave=").append(resultSave).append("; ");
if (resultSave) { if (resultSave) {
// Success in save // Success in save