IDEMPIERE-37 Make iDempiere safer using saveEx instead of save

This commit is contained in:
Carlos Ruiz 2013-03-12 08:39:50 -05:00
parent 1599ac448a
commit 171c5db67d
7 changed files with 17 additions and 17 deletions

View File

@ -195,21 +195,21 @@ public class BOMVerify extends SvrProcess
{
invalidproducts.add(product);
product.setIsVerified(false);
product.save();
product.saveEx();
return false;
}
else if (containsinvalid)
{
containinvalidproducts.add(product);
product.setIsVerified(false);
product.save();
product.saveEx();
return false;
}
else
{
validproducts.add(product);
product.setIsVerified(true);
product.save();
product.saveEx();
return true;
}

View File

@ -79,11 +79,11 @@ public class DepositBatchClose extends SvrProcess
for (int line = 0; line < depositbatchLines.length; line++)
{
depositbatchLines[line].setProcessed(true);
depositbatchLines[line].save();
depositbatchLines[line].saveEx();
}
depositbatch.setProcessed(true);
depositbatch.save();
depositbatch.saveEx();
return "";
} // doIt

View File

@ -2874,13 +2874,13 @@ public final class MPayment extends X_C_Payment
{
MInvoice inv = new MInvoice(getCtx(), getC_Invoice_ID(), get_TrxName());
inv.setC_Payment_ID(0);
inv.save();
inv.saveEx();
}
if (getC_Order_ID() != 0)
{
MOrder ord = new MOrder(getCtx(), getC_Order_ID(), get_TrxName());
ord.setC_Payment_ID(0);
ord.save();
ord.saveEx();
}
return true;

View File

@ -301,14 +301,14 @@ public class PackInHandler extends DefaultHandler {
//Update package history log with package status
X_AD_Package_Imp packageImp = new X_AD_Package_Imp(m_ctx.ctx, AD_Package_Imp_ID, null);
packageImp.setPK_Status(packageStatus);
packageImp.save();
packageImp.saveEx();
throw re;
} catch (SAXException se) {
packageStatus = "Import Failed";
//Update package history log with package status
X_AD_Package_Imp packageImp = new X_AD_Package_Imp(m_ctx.ctx, AD_Package_Imp_ID, null);
packageImp.setPK_Status(packageStatus);
packageImp.save();
packageImp.saveEx();
throw se;
}
}

View File

@ -1022,7 +1022,7 @@ DataStatusListener, IADTabpanel, IdSpace
preference.setAttribute(adTabId+"|DetailPane.IsOpen");
preference.setValue(value ? "Y" : "N");
}
preference.save();
preference.saveEx();
//update current context
Env.getCtx().setProperty("P"+windowId+"|"+adTabId+"|DetailPane.IsOpen", value ? "Y" : "N");
}

View File

@ -122,7 +122,7 @@ public class RunProcess extends TableFixture {
exception(getCell(i, 1), new Exception(errorMsg));
if (recordID > 0)
pInstance.setRecord_ID( recordID);
pInstance.save();
pInstance.saveEx();
if (docAction != null) {
if (docAction != null && docAction.length() > 0) {
// Requirements
@ -139,7 +139,7 @@ public class RunProcess extends TableFixture {
PO po = table.getPO(recordID, null);
if (po != null) {
po.set_ValueOfColumn("DocAction", docAction);
po.save();
po.saveEx();
}
}
}
@ -389,7 +389,7 @@ public class RunProcess extends TableFixture {
}
//
iPara.save();
iPara.saveEx();
}
catch (Exception e)
{

View File

@ -194,7 +194,7 @@ public class Process {
PO po = table.getPO(m_record_id, null);
if (po != null) {
po.set_ValueOfColumn("DocAction", docAction);
po.save();
po.saveEx();
}
}
}
@ -218,7 +218,7 @@ public class Process {
if (m_record_id>0)
{
pInstance.setRecord_ID( m_record_id);
pInstance.save();
pInstance.saveEx();
}
//
ProcessInfo pi = new ProcessInfo (process.getName(), process.getAD_Process_ID());
@ -539,7 +539,7 @@ public class Process {
}
//
iPara.save();
iPara.saveEx();
}
catch (Exception e)
{
@ -551,7 +551,7 @@ public class Process {
} // not null
} // instance parameter loop
pInstance.save(); // kolec - tego chyba brakowalo
pInstance.saveEx(); // kolec - tego chyba brakowalo
return pInstance;
} // fillParameter