IDEMPIERE-37 Make iDempiere safer using saveEx instead of save
This commit is contained in:
parent
1599ac448a
commit
171c5db67d
|
@ -195,21 +195,21 @@ public class BOMVerify extends SvrProcess
|
||||||
{
|
{
|
||||||
invalidproducts.add(product);
|
invalidproducts.add(product);
|
||||||
product.setIsVerified(false);
|
product.setIsVerified(false);
|
||||||
product.save();
|
product.saveEx();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (containsinvalid)
|
else if (containsinvalid)
|
||||||
{
|
{
|
||||||
containinvalidproducts.add(product);
|
containinvalidproducts.add(product);
|
||||||
product.setIsVerified(false);
|
product.setIsVerified(false);
|
||||||
product.save();
|
product.saveEx();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
validproducts.add(product);
|
validproducts.add(product);
|
||||||
product.setIsVerified(true);
|
product.setIsVerified(true);
|
||||||
product.save();
|
product.saveEx();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,11 +79,11 @@ public class DepositBatchClose extends SvrProcess
|
||||||
for (int line = 0; line < depositbatchLines.length; line++)
|
for (int line = 0; line < depositbatchLines.length; line++)
|
||||||
{
|
{
|
||||||
depositbatchLines[line].setProcessed(true);
|
depositbatchLines[line].setProcessed(true);
|
||||||
depositbatchLines[line].save();
|
depositbatchLines[line].saveEx();
|
||||||
}
|
}
|
||||||
|
|
||||||
depositbatch.setProcessed(true);
|
depositbatch.setProcessed(true);
|
||||||
depositbatch.save();
|
depositbatch.saveEx();
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
} // doIt
|
} // doIt
|
||||||
|
|
|
@ -2874,13 +2874,13 @@ public final class MPayment extends X_C_Payment
|
||||||
{
|
{
|
||||||
MInvoice inv = new MInvoice(getCtx(), getC_Invoice_ID(), get_TrxName());
|
MInvoice inv = new MInvoice(getCtx(), getC_Invoice_ID(), get_TrxName());
|
||||||
inv.setC_Payment_ID(0);
|
inv.setC_Payment_ID(0);
|
||||||
inv.save();
|
inv.saveEx();
|
||||||
}
|
}
|
||||||
if (getC_Order_ID() != 0)
|
if (getC_Order_ID() != 0)
|
||||||
{
|
{
|
||||||
MOrder ord = new MOrder(getCtx(), getC_Order_ID(), get_TrxName());
|
MOrder ord = new MOrder(getCtx(), getC_Order_ID(), get_TrxName());
|
||||||
ord.setC_Payment_ID(0);
|
ord.setC_Payment_ID(0);
|
||||||
ord.save();
|
ord.saveEx();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -301,14 +301,14 @@ public class PackInHandler extends DefaultHandler {
|
||||||
//Update package history log with package status
|
//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);
|
X_AD_Package_Imp packageImp = new X_AD_Package_Imp(m_ctx.ctx, AD_Package_Imp_ID, null);
|
||||||
packageImp.setPK_Status(packageStatus);
|
packageImp.setPK_Status(packageStatus);
|
||||||
packageImp.save();
|
packageImp.saveEx();
|
||||||
throw re;
|
throw re;
|
||||||
} catch (SAXException se) {
|
} catch (SAXException se) {
|
||||||
packageStatus = "Import Failed";
|
packageStatus = "Import Failed";
|
||||||
//Update package history log with package status
|
//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);
|
X_AD_Package_Imp packageImp = new X_AD_Package_Imp(m_ctx.ctx, AD_Package_Imp_ID, null);
|
||||||
packageImp.setPK_Status(packageStatus);
|
packageImp.setPK_Status(packageStatus);
|
||||||
packageImp.save();
|
packageImp.saveEx();
|
||||||
throw se;
|
throw se;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1022,7 +1022,7 @@ DataStatusListener, IADTabpanel, IdSpace
|
||||||
preference.setAttribute(adTabId+"|DetailPane.IsOpen");
|
preference.setAttribute(adTabId+"|DetailPane.IsOpen");
|
||||||
preference.setValue(value ? "Y" : "N");
|
preference.setValue(value ? "Y" : "N");
|
||||||
}
|
}
|
||||||
preference.save();
|
preference.saveEx();
|
||||||
//update current context
|
//update current context
|
||||||
Env.getCtx().setProperty("P"+windowId+"|"+adTabId+"|DetailPane.IsOpen", value ? "Y" : "N");
|
Env.getCtx().setProperty("P"+windowId+"|"+adTabId+"|DetailPane.IsOpen", value ? "Y" : "N");
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,7 +122,7 @@ public class RunProcess extends TableFixture {
|
||||||
exception(getCell(i, 1), new Exception(errorMsg));
|
exception(getCell(i, 1), new Exception(errorMsg));
|
||||||
if (recordID > 0)
|
if (recordID > 0)
|
||||||
pInstance.setRecord_ID( recordID);
|
pInstance.setRecord_ID( recordID);
|
||||||
pInstance.save();
|
pInstance.saveEx();
|
||||||
if (docAction != null) {
|
if (docAction != null) {
|
||||||
if (docAction != null && docAction.length() > 0) {
|
if (docAction != null && docAction.length() > 0) {
|
||||||
// Requirements
|
// Requirements
|
||||||
|
@ -139,7 +139,7 @@ public class RunProcess extends TableFixture {
|
||||||
PO po = table.getPO(recordID, null);
|
PO po = table.getPO(recordID, null);
|
||||||
if (po != null) {
|
if (po != null) {
|
||||||
po.set_ValueOfColumn("DocAction", docAction);
|
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)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -194,7 +194,7 @@ public class Process {
|
||||||
PO po = table.getPO(m_record_id, null);
|
PO po = table.getPO(m_record_id, null);
|
||||||
if (po != null) {
|
if (po != null) {
|
||||||
po.set_ValueOfColumn("DocAction", docAction);
|
po.set_ValueOfColumn("DocAction", docAction);
|
||||||
po.save();
|
po.saveEx();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ public class Process {
|
||||||
if (m_record_id>0)
|
if (m_record_id>0)
|
||||||
{
|
{
|
||||||
pInstance.setRecord_ID( m_record_id);
|
pInstance.setRecord_ID( m_record_id);
|
||||||
pInstance.save();
|
pInstance.saveEx();
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
ProcessInfo pi = new ProcessInfo (process.getName(), process.getAD_Process_ID());
|
ProcessInfo pi = new ProcessInfo (process.getName(), process.getAD_Process_ID());
|
||||||
|
@ -539,7 +539,7 @@ public class Process {
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
iPara.save();
|
iPara.saveEx();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -551,7 +551,7 @@ public class Process {
|
||||||
} // not null
|
} // not null
|
||||||
} // instance parameter loop
|
} // instance parameter loop
|
||||||
|
|
||||||
pInstance.save(); // kolec - tego chyba brakowalo
|
pInstance.saveEx(); // kolec - tego chyba brakowalo
|
||||||
|
|
||||||
return pInstance;
|
return pInstance;
|
||||||
} // fillParameter
|
} // fillParameter
|
||||||
|
|
Loading…
Reference in New Issue