From 26337eddb810c63d079f6f0d2b6613c2d0bbff9e Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 14 Jun 2011 15:39:10 -0500 Subject: [PATCH] fixes #37 Make iDempiere safer using saveEx instead of save https://bitbucket.org/idempiere/idempiere/issue/37 --- .../compiere/install/LanguageMaintenance.java | 2 +- .../org/compiere/process/AllocationAuto.java | 6 +- .../org/compiere/process/AssetDelivery.java | 8 +- .../src/org/compiere/process/BOMValidate.java | 6 +- .../compiere/process/BPartnerValidate.java | 4 +- .../process/BankStatementMatcher.java | 4 +- .../process/BankStatementPayment.java | 8 +- .../compiere/process/ColumnEncryption.java | 2 +- .../org/compiere/process/CommissionCalc.java | 6 +- .../src/org/compiere/process/CopyOrder.java | 4 +- .../compiere/process/DistributionCreate.java | 2 +- .../org/compiere/process/DistributionRun.java | 10 +-- .../process/DocTypeCounterValidate.java | 2 +- .../org/compiere/process/DunningPrint.java | 4 +- .../compiere/process/ExpenseAPInvoice.java | 2 +- .../org/compiere/process/ImportAccount.java | 4 +- .../org/compiere/process/ImportBPartner.java | 4 +- .../compiere/process/ImportBankStatement.java | 2 +- .../process/ImportConversionRate.java | 2 +- .../org/compiere/process/ImportGLJournal.java | 4 +- .../compiere/process/ImportInOutConfirm.java | 2 +- .../org/compiere/process/ImportInventory.java | 2 +- .../org/compiere/process/ImportInvoice.java | 8 +- .../src/org/compiere/process/ImportOrder.java | 8 +- .../org/compiere/process/ImportPayment.java | 4 +- .../org/compiere/process/ImportProduct.java | 2 +- .../org/compiere/process/InOutGenerate.java | 2 +- .../process/InventoryCountCreate.java | 4 +- .../compiere/process/InvoiceBatchProcess.java | 6 +- .../src/org/compiere/process/InvoiceNGL.java | 6 +- .../process/InvoicePayScheduleValidate.java | 4 +- .../org/compiere/process/InvoicePrint.java | 2 +- .../org/compiere/process/MatchInvDelete.java | 2 +- .../org/compiere/process/MatchPODelete.java | 2 +- .../compiere/process/OrderBatchProcess.java | 2 +- .../process/OrderPayScheduleValidate.java | 4 +- .../org/compiere/process/OrderRePrice.java | 4 +- .../process/PaySelectionCreateCheck.java | 2 +- .../org/compiere/process/PaymentOnline.java | 2 +- .../compiere/process/PaymentTermValidate.java | 2 +- .../org/compiere/process/ProjectGenPO.java | 4 +- .../org/compiere/process/ProjectIssue.java | 10 +-- .../compiere/process/ProjectLinePricing.java | 2 +- .../org/compiere/process/RegisterSystem.java | 2 +- .../org/compiere/process/ReplenishReport.java | 12 +-- .../compiere/process/ReplicationLocal.java | 10 +-- .../compiere/process/ReplicationRemote.java | 2 +- .../process/ReportColumnSet_Copy.java | 2 +- .../compiere/process/ReportLineSet_Copy.java | 4 +- .../org/compiere/process/RequestInvoice.java | 8 +- .../src/org/compiere/process/RfQClose.java | 4 +- .../org/compiere/process/RfQCopyLines.java | 4 +- .../src/org/compiere/process/RfQCreateSO.java | 6 +- .../process/RfQResponseCComplete.java | 2 +- .../org/compiere/process/RfQResponseRank.java | 14 +-- .../org/compiere/process/SendMailText.java | 4 +- .../org/compiere/process/StorageCleanup.java | 2 +- .../process/SynchronizeTerminology.java | 4 +- .../adempiere/model/PromotionValidator.java | 2 +- .../src/org/compiere/Adempiere.java | 2 +- .../src/org/compiere/FA/AssetDisposed.java | 10 +-- .../src/org/compiere/FA/AssetRevalEntry.java | 24 ++--- .../src/org/compiere/FA/AssetSplit.java | 42 ++++----- .../src/org/compiere/FA/AssetTransfer.java | 16 ++-- .../org/compiere/FA/BuildDepForecastFile.java | 16 ++-- .../src/org/compiere/FA/BuildDepWorkFile.java | 22 ++--- .../src/org/compiere/FA/CreateGLAsset.java | 30 +++---- .../org/compiere/FA/CreateInvoicedAsset.java | 44 ++++----- .../src/org/compiere/FA/ImportFAJournal2.java | 6 +- .../src/org/compiere/acct/Doc.java | 2 +- .../src/org/compiere/acct/FactLine.java | 2 +- .../src/org/compiere/cm/WebProjectDeploy.java | 2 +- .../compiere/model/AdempiereProcessor.java | 8 ++ .../src/org/compiere/model/GridTab.java | 2 +- .../src/org/compiere/model/MAcctSchema.java | 2 +- .../org/compiere/model/MAllocationHdr.java | 2 +- .../org/compiere/model/MAllocationLine.java | 4 +- .../src/org/compiere/model/MAsset.java | 20 ++--- .../src/org/compiere/model/MAssetAcct.java | 6 +- .../org/compiere/model/MAssetAddition.java | 12 +-- .../src/org/compiere/model/MAssetUse.java | 4 +- .../src/org/compiere/model/MAttachment.java | 2 +- .../src/org/compiere/model/MAttribute.java | 6 +- .../src/org/compiere/model/MCStage.java | 2 +- .../src/org/compiere/model/MClick.java | 2 +- .../src/org/compiere/model/MClient.java | 2 +- .../org/compiere/model/MCommissionAmt.java | 2 +- .../org/compiere/model/MCommissionDetail.java | 2 +- .../org/compiere/model/MContactInterest.java | 2 +- .../src/org/compiere/model/MCostDetail.java | 4 +- .../src/org/compiere/model/MCountry.java | 2 +- .../src/org/compiere/model/MCurrency.java | 2 +- .../compiere/model/MDepreciationWorkfile.java | 4 +- .../org/compiere/model/MDistributionLine.java | 2 +- .../src/org/compiere/model/MFactAcct.java | 2 +- .../src/org/compiere/model/MForm.java | 2 +- .../src/org/compiere/model/MInOut.java | 8 +- .../src/org/compiere/model/MIndex.java | 2 +- .../src/org/compiere/model/MInvoice.java | 6 +- .../src/org/compiere/model/MInvoiceLine.java | 2 +- .../compiere/model/MInvoicePaySchedule.java | 2 +- .../src/org/compiere/model/MIssue.java | 2 +- .../src/org/compiere/model/MJournalBatch.java | 20 ++--- .../src/org/compiere/model/MLocator.java | 2 +- .../src/org/compiere/model/MLotCtl.java | 2 +- .../src/org/compiere/model/MMatchInv.java | 2 +- .../src/org/compiere/model/MMatchPO.java | 2 +- .../src/org/compiere/model/MMovement.java | 2 +- .../src/org/compiere/model/MOrderLine.java | 4 +- .../org/compiere/model/MOrderPaySchedule.java | 2 +- .../src/org/compiere/model/MPInstance.java | 4 +- .../src/org/compiere/model/MPOSTerminal.java | 2 +- .../src/org/compiere/model/MPackage.java | 4 +- .../src/org/compiere/model/MPackageExp.java | 2 +- .../src/org/compiere/model/MPaySchedule.java | 4 +- .../compiere/model/MPaySelectionCheck.java | 18 ++-- .../src/org/compiere/model/MPaymentTerm.java | 4 +- .../src/org/compiere/model/MPeriod.java | 2 +- .../src/org/compiere/model/MProduct.java | 2 +- .../src/org/compiere/model/MRegion.java | 90 +++++++++---------- .../src/org/compiere/model/MRegistration.java | 2 +- .../src/org/compiere/model/MRequest.java | 8 +- .../src/org/compiere/model/MRfQLine.java | 2 +- .../org/compiere/model/MRfQResponseLine.java | 4 +- .../src/org/compiere/model/MRole.java | 4 +- .../src/org/compiere/model/MSequence.java | 2 +- .../src/org/compiere/model/MSession.java | 4 +- .../src/org/compiere/model/MSetup.java | 12 +-- .../src/org/compiere/model/MTable.java | 2 +- .../src/org/compiere/model/MTest.java | 6 +- .../org/compiere/model/MTimeExpenseLine.java | 2 +- .../src/org/compiere/model/MTree_Base.java | 8 +- .../src/org/compiere/model/MWindow.java | 6 +- .../src/org/compiere/print/ArchiveEngine.java | 2 +- .../src/org/compiere/print/MPrintColor.java | 2 +- .../src/org/compiere/print/MPrintFont.java | 2 +- .../src/org/compiere/print/MPrintFormat.java | 2 +- .../org/compiere/print/MPrintFormatItem.java | 2 +- .../src/org/compiere/print/MPrintPaper.java | 2 +- .../compiere/print/layout/LayoutEngine.java | 2 +- .../src/org/compiere/process/DocAction.java | 8 ++ .../org/compiere/process/DocumentEngine.java | 16 +++- .../src/org/compiere/process/SvrProcess.java | 2 +- .../src/org/compiere/report/FinReport.java | 6 +- .../org/compiere/report/FinReportJasper.java | 2 +- .../org/compiere/sla/DeliveryAccuracy.java | 2 +- .../src/org/compiere/sla/SLACriteria.java | 2 +- .../src/org/compiere/sla/SLAGoalProcess.java | 2 +- .../org/compiere/sla/SLAMeasureProcess.java | 2 +- .../src/org/compiere/util/DB.java | 2 +- .../src/org/compiere/util/WebInfo.java | 2 +- .../src/org/compiere/util/WebUser.java | 6 +- .../src/org/compiere/util/WebUtil.java | 2 +- .../src/org/compiere/wf/MWFActivity.java | 22 ++--- .../src/org/compiere/wf/MWFProcess.java | 6 +- .../src/org/compiere/wf/MWorkflow.java | 22 ++--- .../src/org/compiere/wf/WFActivityManage.java | 2 +- .../src/org/compiere/wf/WorkflowValidate.java | 2 +- .../org/eevolution/model/MDDOrderLine.java | 4 +- .../org/eevolution/process/BankTransfer.java | 4 +- .../org/eevolution/process/CopyFromBOM.java | 2 +- .../src/org/compiere/test/OrderTest.java | 2 +- .../src/test/functional/MBPGroupTest.java | 2 +- .../functional/MBPartnerLocationTest.java | 6 +- .../src/test/functional/MBPartnerTest.java | 4 +- .../src/test/functional/MProductTest.java | 2 +- .../src/test/functional/MUserTest.java | 4 +- .../src/org/adempiere/pipo/PackOut.java | 2 +- .../org/compiere/ldap/LdapProcessor.java | 2 +- .../org/compiere/server/AcctProcessor.java | 2 +- .../org/compiere/server/AdempiereServer.java | 4 +- .../compiere/server/AdempiereServerMgr.java | 2 +- .../org/compiere/server/AlertProcessor.java | 10 +-- .../org/compiere/server/RequestProcessor.java | 12 +-- .../server/org/compiere/server/Scheduler.java | 10 +-- .../compiere/server/WorkflowProcessor.java | 10 +-- .../src/org/compiere/AdempiereClient.java | 2 +- .../src/org/compiere/apps/AChat.java | 4 +- .../src/org/compiere/apps/APanel.java | 2 +- .../src/org/compiere/apps/Attachment.java | 2 +- .../src/org/compiere/apps/EMailDialog.java | 2 +- .../org/compiere/apps/ProcessParameter.java | 2 +- .../compiere/apps/ProcessParameterPanel.java | 2 +- .../org/compiere/apps/form/ArchiveViewer.java | 2 +- .../src/org/compiere/apps/wf/WFPanel.java | 4 +- .../src/org/compiere/apps/wf/WFPopupItem.java | 2 +- .../src/org/compiere/grid/VPayment.java | 4 +- .../org/compiere/grid/ed/VAccountDialog.java | 4 +- .../compiere/plaf/CompiereThemeEditor.java | 2 +- .../org/compiere/pos/CashSubFunctions.java | 4 +- .../src/org/compiere/pos/SubCheckout.java | 2 +- .../src/org/compiere/pos/SubCurrentLine.java | 8 +- .../webui/apps/ProcessParameterPanel.java | 2 +- .../webui/apps/form/WArchiveViewer.java | 2 +- .../adempiere/webui/apps/form/WPayment.java | 8 +- .../adempiere/webui/apps/wf/WFPopupItem.java | 2 +- .../adempiere/webui/panel/WAttachment.java | 2 +- .../adempiere/webui/process/InvoicePrint.java | 2 +- .../webui/window/WAccountDialog.java | 4 +- .../src/org/adempiere/webui/window/WChat.java | 4 +- .../adempiere/webui/window/WEMailDialog.java | 2 +- .../src/org/compiere/apps/form/Match.java | 4 +- .../src/org/compiere/apps/form/Merge.java | 6 +- .../compiere/apps/form/TreeMaintenance.java | 8 +- .../src/org/compiere/wstore/AssetServlet.java | 6 +- .../org/compiere/wstore/InvoiceServlet.java | 2 +- .../src/org/compiere/wstore/NoteServlet.java | 2 +- .../src/org/compiere/wstore/OrderServlet.java | 2 +- .../org/compiere/wstore/PaymentServlet.java | 4 +- .../org/compiere/wstore/RequestServlet.java | 2 +- .../src/org/compiere/wstore/WebOrder.java | 10 +-- .../org/compiere/wstore/WorkflowServlet.java | 6 +- 212 files changed, 590 insertions(+), 566 deletions(-) diff --git a/org.adempiere.base.process/src/org/compiere/install/LanguageMaintenance.java b/org.adempiere.base.process/src/org/compiere/install/LanguageMaintenance.java index 6c5531c324..2ae5313105 100644 --- a/org.adempiere.base.process/src/org/compiere/install/LanguageMaintenance.java +++ b/org.adempiere.base.process/src/org/compiere/install/LanguageMaintenance.java @@ -105,7 +105,7 @@ public class LanguageMaintenance extends SvrProcess if (m_language.isSystemLanguage()) { m_language.setIsSystemLanguage(false); - m_language.save(); + m_language.saveEx(); } } diff --git a/org.adempiere.base.process/src/org/compiere/process/AllocationAuto.java b/org.adempiere.base.process/src/org/compiere/process/AllocationAuto.java index 49de9a7bc3..638eb8cb07 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AllocationAuto.java +++ b/org.adempiere.base.process/src/org/compiere/process/AllocationAuto.java @@ -280,7 +280,7 @@ public class AllocationAuto extends SvrProcess if (allocated != null && allocated.compareTo(payment.getPayAmt()) == 0) { payment.setIsAllocated(true); - payment.save(); + payment.saveEx(); } else list.add (payment); @@ -328,7 +328,7 @@ public class AllocationAuto extends SvrProcess if (invoice.getOpenAmt(false, null).signum() == 0) { invoice.setIsPaid(true); - invoice.save(); + invoice.saveEx(); } else list.add (invoice); @@ -831,7 +831,7 @@ public class AllocationAuto extends SvrProcess if (success) success = m_allocation.save(); else - m_allocation.save(); + m_allocation.saveEx(); addLog(0, m_allocation.getDateAcct(), null, m_allocation.getDescription()); m_allocation = null; return success; diff --git a/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java b/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java index b5c047dbb5..ef98f1ca85 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java +++ b/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java @@ -217,7 +217,7 @@ public class AssetDelivery extends SvrProcess email.setMessageText (message); } String msg = email.send(); - new MUserMail(m_MailText, asset.getAD_User_ID(), email).save(); + new MUserMail(m_MailText, asset.getAD_User_ID(), email).saveEx(); if (!EMail.SENT_OK.equals(msg)) return "** Not delivered: " + user.getEMail() + " - " + msg; // @@ -284,13 +284,13 @@ public class AssetDelivery extends SvrProcess log.warning("No DowloadURL for A_Asset_ID=" + A_Asset_ID); } String msg = email.send(); - new MUserMail(m_MailText, asset.getAD_User_ID(), email).save(); + new MUserMail(m_MailText, asset.getAD_User_ID(), email).saveEx(); if (!EMail.SENT_OK.equals(msg)) return "** Not delivered: " + user.getEMail() + " - " + msg; MAssetDelivery ad = asset.confirmDelivery(email, user.getAD_User_ID()); - ad.save(); - asset.save(); + ad.saveEx(); + asset.saveEx(); // log.fine((System.currentTimeMillis()-start) + " ms"); // success diff --git a/org.adempiere.base.process/src/org/compiere/process/BOMValidate.java b/org.adempiere.base.process/src/org/compiere/process/BOMValidate.java index e15478da23..a9bfd16fb0 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BOMValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/BOMValidate.java @@ -143,7 +143,7 @@ public class BOMValidate extends SvrProcess if (!validateOldProduct (m_product)) { m_product.setIsVerified(false); - m_product.save(); + m_product.saveEx(); return m_product.getName() + " @NotValid@"; } @@ -155,14 +155,14 @@ public class BOMValidate extends SvrProcess if (!validateBOM(boms[i])) { m_product.setIsVerified(false); - m_product.save(); + m_product.saveEx(); return m_product.getName() + " " + boms[i].getName() + " @NotValid@"; } } // OK m_product.setIsVerified(true); - m_product.save(); + m_product.saveEx(); return m_product.getName() + " @IsValid@"; } // validateProduct diff --git a/org.adempiere.base.process/src/org/compiere/process/BPartnerValidate.java b/org.adempiere.base.process/src/org/compiere/process/BPartnerValidate.java index 5aac8008ab..e8c6fc91b8 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BPartnerValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/BPartnerValidate.java @@ -138,7 +138,7 @@ public class BPartnerValidate extends SvrProcess MPayment payment = payments[i]; if (payment.testAllocation()) { - payment.save(); + payment.saveEx(); changed++; } } @@ -161,7 +161,7 @@ public class BPartnerValidate extends SvrProcess MInvoice invoice = invoices[i]; if (invoice.testAllocation()) { - invoice.save(); + invoice.saveEx(); changed++; } } diff --git a/org.adempiere.base.process/src/org/compiere/process/BankStatementMatcher.java b/org.adempiere.base.process/src/org/compiere/process/BankStatementMatcher.java index 984411ac62..64c13d3888 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BankStatementMatcher.java +++ b/org.adempiere.base.process/src/org/compiere/process/BankStatementMatcher.java @@ -103,7 +103,7 @@ public class BankStatementMatcher extends SvrProcess ibs.setC_Invoice_ID(info.getC_Invoice_ID()); if (info.getC_BPartner_ID() > 0) ibs.setC_BPartner_ID(info.getC_BPartner_ID()); - ibs.save(); + ibs.saveEx(); return "OK"; } } @@ -137,7 +137,7 @@ public class BankStatementMatcher extends SvrProcess bsl.setC_Invoice_ID(info.getC_Invoice_ID()); if (info.getC_BPartner_ID() > 0) bsl.setC_BPartner_ID(info.getC_BPartner_ID()); - bsl.save(); + bsl.saveEx(); return "OK"; } } diff --git a/org.adempiere.base.process/src/org/compiere/process/BankStatementPayment.java b/org.adempiere.base.process/src/org/compiere/process/BankStatementPayment.java index d6deadf000..1c3107ae2e 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BankStatementPayment.java +++ b/org.adempiere.base.process/src/org/compiere/process/BankStatementPayment.java @@ -99,7 +99,7 @@ public class BankStatementPayment extends SvrProcess ibs.setC_Payment_ID(payment.getC_Payment_ID()); ibs.setC_Currency_ID (payment.getC_Currency_ID()); ibs.setTrxAmt(payment.getPayAmt(true)); - ibs.save(); + ibs.saveEx(); // String retString = "@C_Payment_ID@ = " + payment.getDocumentNo(); if (payment.getOverUnderAmt().signum() != 0) @@ -131,7 +131,7 @@ public class BankStatementPayment extends SvrProcess throw new AdempiereSystemError("Could not create Payment"); // update statement bsl.setPayment(payment); - bsl.save(); + bsl.saveEx(); // String retString = "@C_Payment_ID@ = " + payment.getDocumentNo(); if (payment.getOverUnderAmt().signum() != 0) @@ -221,10 +221,10 @@ public class BankStatementPayment extends SvrProcess } else return null; - payment.save(); + payment.saveEx(); // payment.processIt(MPayment.DOCACTION_Complete); - payment.save(); + payment.saveEx(); return payment; } // createPayment diff --git a/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java b/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java index f9cf844dc9..9d8d1fb265 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java +++ b/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java @@ -123,7 +123,7 @@ public class ColumnEncryption extends SvrProcess { || "Name".equalsIgnoreCase(column.getColumnName())) { if (column.isEncrypted()) { column.setIsEncrypted(false); - column.save(); + column.saveEx(); } return columnName + ": cannot be encrypted"; } diff --git a/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java b/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java index d879e8eef4..a08eda4b84 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java +++ b/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java @@ -245,15 +245,15 @@ public class CommissionCalc extends SvrProcess // createDetail(sql.toString(), comAmt); comAmt.calculateCommission(); - comAmt.save(); + comAmt.saveEx(); } // for all commission lines // comRun.updateFromAmt(); - // comRun.save(); + // comRun.saveEx(); // Save Last Run m_com.setDateLastRun (p_StartDate); - m_com.save(); + m_com.saveEx(); return "@C_CommissionRun_ID@ = " + comRun.getDocumentNo() + " - " + comRun.getDescription(); diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java b/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java index 365976e725..aac140b7ab 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java @@ -95,10 +95,10 @@ public class CopyOrder extends SvrProcess MOrder original = new MOrder (getCtx(), p_C_Order_ID, get_TrxName()); original.setDocAction(MOrder.DOCACTION_Complete); original.processIt(MOrder.DOCACTION_Complete); - original.save(); + original.saveEx(); original.setDocAction(MOrder.DOCACTION_Close); original.processIt(MOrder.DOCACTION_Close); - original.save(); + original.saveEx(); } // // Env.setSOTrx(getCtx(), newOrder.isSOTrx()); diff --git a/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java b/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java index a0fc9e3f79..a9afa634b0 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java @@ -152,7 +152,7 @@ public class DistributionCreate extends SvrProcess if (m_singleOrder != null) { m_singleOrder.setDescription("# " + counter + " - " + m_totalQty); - m_singleOrder.save(); + m_singleOrder.saveEx(); } return "@Created@ #" + counter + " - @Qty@=" + m_totalQty; diff --git a/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java b/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java index 56da7565da..5a0a112930 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java +++ b/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java @@ -373,7 +373,7 @@ public class DistributionRun extends SvrProcess && detail.isCanAdjust()) { detail.adjustQty(difference); - detail.save(); + detail.saveEx(); return; } } @@ -411,7 +411,7 @@ public class DistributionRun extends SvrProcess + ", Allocation=" + detail.getActualAllocation() + ", DiffRatio=" + diffRatio); detail.adjustQty(diffRatio); - detail.save(); + detail.saveEx(); } } } @@ -639,7 +639,7 @@ public class DistributionRun extends SvrProcess log.info("Qty Total Demand:" + totalration); BigDecimal factor = ration.divide(totalration, 12 , BigDecimal.ROUND_HALF_UP); record.setQty(drl.getTotalQty().multiply(factor)); - record.save(); + record.saveEx(); } log.fine("inserted #" + no); return no; @@ -739,7 +739,7 @@ public class DistributionRun extends SvrProcess BigDecimal ration = record.getRatio(); BigDecimal factor = ration.divide(total_ration,BigDecimal.ROUND_HALF_UP); record.setQty(factor.multiply(drl.getTotalQty())); - record.save(); + record.saveEx(); } log.fine("inserted #" + no); return no; @@ -798,7 +798,7 @@ public class DistributionRun extends SvrProcess line.setDescription(Msg.translate(getCtx(), "PlannedQty")); else line.setDescription(m_run.getName()); - line.save(); + line.saveEx(); break; //addLog(0,null, detail.getActualAllocation(), order.getDocumentNo() // + ": " + bp.getName() + " - " + product.getName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/DocTypeCounterValidate.java b/org.adempiere.base.process/src/org/compiere/process/DocTypeCounterValidate.java index 66956d34bc..35d6a64f9f 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DocTypeCounterValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/DocTypeCounterValidate.java @@ -51,7 +51,7 @@ public class DocTypeCounterValidate extends SvrProcess throw new IllegalArgumentException("Not found C_DocTypeCounter_ID=" + p_C_DocTypeCounter_ID); // String error = m_counter.validate(); - m_counter.save(); + m_counter.saveEx(); if (error != null) throw new Exception(error); diff --git a/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java b/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java index e923a2c431..bc6e42bdc1 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java +++ b/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java @@ -199,7 +199,7 @@ public class DunningPrint extends SvrProcess // String msg = email.send(); MUserMail um = new MUserMail(mText, entry.getAD_User_ID(), email); - um.save(); + um.saveEx(); if (msg.equals(EMail.SENT_OK)) { addLog (entry.get_ID(), null, null, @@ -231,7 +231,7 @@ public class DunningPrint extends SvrProcess } // for all dunning letters if (errors==0) { run.setProcessed(true); - run.save(); + run.saveEx(); } if (p_EMailPDF) return "@Sent@=" + count + " - @Errors@=" + errors; diff --git a/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java b/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java index 1bf8942e96..b03f0ed242 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java @@ -186,7 +186,7 @@ public class ExpenseAPInvoice extends SvrProcess new IllegalStateException("Cannot save Invoice Line"); // Update TEL line.setC_InvoiceLine_ID(il.getC_InvoiceLine_ID()); - line.save(); + line.saveEx(); } // for all expense lines } // ********* Expense Line Loop } diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java b/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java index d4dadb68c1..ff377ffe29 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java @@ -282,7 +282,7 @@ public class ImportAccount extends SvrProcess noInsert++; impEV.setC_ElementValue_ID(ev.getC_ElementValue_ID()); impEV.setI_IsImported(true); - impEV.save(); + impEV.saveEx(); } else { @@ -304,7 +304,7 @@ public class ImportAccount extends SvrProcess { noUpdate++; impEV.setI_IsImported(true); - impEV.save(); + impEV.saveEx(); } else { diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java b/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java index d4717193c9..55b575e4df 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java @@ -411,7 +411,7 @@ implements ImportProcess if (impBP.getFax() != null) bpl.setFax(impBP.getFax()); ModelValidationEngine.get().fireImportValidate(this, impBP, bpl, ImportValidator.TIMING_AFTER_IMPORT); - bpl.save(); + bpl.saveEx(); } else // New Location if (impBP.getC_Country_ID() != 0 @@ -569,7 +569,7 @@ implements ImportProcess MContactInterest ci = MContactInterest.get(getCtx(), impBP.getR_InterestArea_ID(), user.getAD_User_ID(), true, get_TrxName()); - ci.save(); // don't subscribe or re-activate + ci.saveEx(); // don't subscribe or re-activate } // impBP.setI_IsImported(true); diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java b/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java index 8c51cf5fad..327147eed7 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java @@ -492,7 +492,7 @@ public class ImportBankStatement extends SvrProcess imp.setC_BankStatementLine_ID(line.getC_BankStatementLine_ID()); imp.setI_IsImported(true); imp.setProcessed(true); - imp.save(); + imp.saveEx(); noInsertLine++; lineNo += 10; } diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportConversionRate.java b/org.adempiere.base.process/src/org/compiere/process/ImportConversionRate.java index 2b88c404dd..b52a423dd8 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportConversionRate.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportConversionRate.java @@ -253,7 +253,7 @@ public class ImportConversionRate extends SvrProcess imp.setC_Conversion_Rate_ID(rate.getC_Conversion_Rate_ID()); imp.setI_IsImported(true); imp.setProcessed(true); - imp.save(); + imp.saveEx(); noInsert++; // if (imp.isCreateReciprocalRate()) diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java b/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java index 411f0f0c8d..d15faafa09 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java @@ -726,12 +726,12 @@ public class ImportGLJournal extends SvrProcess imp.getC_Project_ID(), imp.getC_Campaign_ID(), imp.getC_Activity_ID(), imp.getUser1_ID(), imp.getUser2_ID(), 0, 0); if (acct != null && acct.get_ID() == 0) - acct.save(); + acct.saveEx(); if (acct == null || acct.get_ID() == 0) { imp.setI_ErrorMsg("ERROR creating Account"); imp.setI_IsImported(false); - imp.save(); + imp.saveEx(); continue; } else diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportInOutConfirm.java b/org.adempiere.base.process/src/org/compiere/process/ImportInOutConfirm.java index fc503330a2..f95bfda9d5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportInOutConfirm.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportInOutConfirm.java @@ -156,7 +156,7 @@ public class ImportInOutConfirm extends SvrProcess { importLine.setI_IsImported(false); importLine.setI_ErrorMsg("ID Not Found"); - importLine.save(); + importLine.saveEx(); } else { diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java b/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java index c7378bbc11..8a1351bdd8 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java @@ -310,7 +310,7 @@ public class ImportInventory extends SvrProcess if (mas.isSerNo() && imp.getSerNo() != null) masi.setSerNo(imp.getSerNo()); masi.setDescription(); - masi.save(); + masi.saveEx(); M_AttributeSetInstance_ID = masi.getM_AttributeSetInstance_ID(); } } diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportInvoice.java b/org.adempiere.base.process/src/org/compiere/process/ImportInvoice.java index 17eaa385ca..617baad323 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportInvoice.java @@ -645,7 +645,7 @@ public class ImportInvoice extends SvrProcess if (invoice != null) { invoice.processIt(m_docAction); - invoice.save(); + invoice.saveEx(); } // Group Change oldC_BPartner_ID = imp.getC_BPartner_ID(); @@ -690,7 +690,7 @@ public class ImportInvoice extends SvrProcess if (imp.getDateAcct() != null) invoice.setDateAcct(imp.getDateAcct()); // - invoice.save(); + invoice.saveEx(); noInsert++; lineNo = 10; } @@ -729,7 +729,7 @@ public class ImportInvoice extends SvrProcess BigDecimal taxAmt = imp.getTaxAmt(); if (taxAmt != null && Env.ZERO.compareTo(taxAmt) != 0) line.setTaxAmt(taxAmt); - line.save(); + line.saveEx(); // imp.setC_InvoiceLine_ID(line.getC_InvoiceLine_ID()); imp.setI_IsImported(true); @@ -741,7 +741,7 @@ public class ImportInvoice extends SvrProcess if (invoice != null) { invoice.processIt (m_docAction); - invoice.save(); + invoice.saveEx(); } rs.close(); pstmt.close(); diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java b/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java index 997e722c9a..372ace49bc 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java @@ -668,7 +668,7 @@ public class ImportOrder extends SvrProcess order.setDocAction(m_docAction); order.processIt (m_docAction); } - order.save(); + order.saveEx(); } oldC_BPartner_ID = imp.getC_BPartner_ID(); oldC_BPartner_Location_ID = imp.getC_BPartner_Location_ID(); @@ -726,7 +726,7 @@ public class ImportOrder extends SvrProcess if (imp.getC_OrderSource() != null) order.setC_OrderSource_ID(imp.getC_OrderSource_ID()); // - order.save(); + order.saveEx(); noInsert++; lineNo = 10; } @@ -754,7 +754,7 @@ public class ImportOrder extends SvrProcess line.setFreightAmt(imp.getFreightAmt()); if (imp.getLineDescription() != null) line.setDescription(imp.getLineDescription()); - line.save(); + line.saveEx(); imp.setC_OrderLine_ID(line.getC_OrderLine_ID()); imp.setI_IsImported(true); imp.setProcessed(true); @@ -769,7 +769,7 @@ public class ImportOrder extends SvrProcess order.setDocAction(m_docAction); order.processIt (m_docAction); } - order.save(); + order.saveEx(); } rs.close(); pstmt.close(); diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java b/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java index c4aedd2608..59518b9c44 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java @@ -496,14 +496,14 @@ public class ImportPayment extends SvrProcess imp.setC_Payment_ID(payment.getC_Payment_ID()); imp.setI_IsImported(true); imp.setProcessed(true); - imp.save(); + imp.saveEx(); noInsert++; if (payment != null && m_docAction != null && m_docAction.length() > 0) { payment.setDocAction(m_docAction); payment.processIt (m_docAction); - payment.save(); + payment.saveEx(); } } diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportProduct.java b/org.adempiere.base.process/src/org/compiere/process/ImportProduct.java index 2408193d8d..a53510c97b 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportProduct.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportProduct.java @@ -632,7 +632,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess p_M_PriceList_Version_ID, M_Product_ID, get_TrxName()); pp.setPrices(PriceList, PriceStd, PriceLimit); ModelValidationEngine.get().fireImportValidate(this, imp, pp, ImportValidator.TIMING_AFTER_IMPORT); - pp.save(); + pp.saveEx(); } } diff --git a/org.adempiere.base.process/src/org/compiere/process/InOutGenerate.java b/org.adempiere.base.process/src/org/compiere/process/InOutGenerate.java index 7cb007e56e..d4b5090eb4 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InOutGenerate.java +++ b/org.adempiere.base.process/src/org/compiere/process/InOutGenerate.java @@ -577,7 +577,7 @@ public class InOutGenerate extends SvrProcess // Fails if there is a confirmation if (!m_shipment.processIt(p_docAction)) log.warning("Failed: " + m_shipment); - m_shipment.save(); + m_shipment.saveEx(); // addLog(m_shipment.getM_InOut_ID(), m_shipment.getMovementDate(), null, m_shipment.getDocumentNo()); m_created++; diff --git a/org.adempiere.base.process/src/org/compiere/process/InventoryCountCreate.java b/org.adempiere.base.process/src/org/compiere/process/InventoryCountCreate.java index 929728e63d..60982695d1 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InventoryCountCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/InventoryCountCreate.java @@ -307,7 +307,7 @@ public class InventoryCountCreate extends SvrProcess { m_line.setQtyBook(m_line.getQtyBook().add(QtyOnHand)); m_line.setQtyCount(m_line.getQtyCount().add(QtyOnHand)); - m_line.save(); + m_line.saveEx(); return 0; } // Save Old Line info @@ -321,7 +321,7 @@ public class InventoryCountCreate extends SvrProcess m_line.setM_AttributeSetInstance_ID(0); m_line.setQtyBook(m_line.getQtyBook().add(QtyOnHand)); m_line.setQtyCount(m_line.getQtyCount().add(QtyOnHand)); - m_line.save(); + m_line.saveEx(); // MInventoryLineMA ma = new MInventoryLineMA (m_line, M_AttributeSetInstance_ID, QtyOnHand); diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoiceBatchProcess.java b/org.adempiere.base.process/src/org/compiere/process/InvoiceBatchProcess.java index cef33ce0a8..35f4685014 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoiceBatchProcess.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoiceBatchProcess.java @@ -134,13 +134,13 @@ public class InvoiceBatchProcess extends SvrProcess // Update Batch Line line.setC_Invoice_ID(m_invoice.getC_Invoice_ID()); line.setC_InvoiceLine_ID(invoiceLine.getC_InvoiceLine_ID()); - line.save(); + line.saveEx(); } // for all lines completeInvoice(); // batch.setProcessed(true); - batch.save(); + batch.saveEx(); return "#" + m_count; } // doIt @@ -156,7 +156,7 @@ public class InvoiceBatchProcess extends SvrProcess m_invoice.setDocAction(p_DocAction); m_invoice.processIt(p_DocAction); - m_invoice.save(); + m_invoice.saveEx(); addLog(0, m_invoice.getDateInvoiced(), m_invoice.getGrandTotal(), m_invoice.getDocumentNo()); m_count++; diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoiceNGL.java b/org.adempiere.base.process/src/org/compiere/process/InvoiceNGL.java index 5002da56b9..16bdc1e06a 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoiceNGL.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoiceNGL.java @@ -286,7 +286,7 @@ public class InvoiceNGL extends SvrProcess line.setAmtAcctDr (dr); line.setAmtSourceCr (cr); line.setAmtAcctCr (cr); - line.save(); + line.saveEx(); // if (AD_Org_ID == 0) // invoice org id AD_Org_ID = gl.getAD_Org_ID(); @@ -336,7 +336,7 @@ public class InvoiceNGL extends SvrProcess line.setC_ValidCombination_ID(acct.getC_ValidCombination_ID()); line.setAmtSourceCr (drTotal); line.setAmtAcctCr (drTotal); - line.save(); + line.saveEx(); } // DR Entry = Loss if (crTotal.signum() != 0) @@ -354,7 +354,7 @@ public class InvoiceNGL extends SvrProcess line.setC_ValidCombination_ID(acct.getC_ValidCombination_ID()); line.setAmtSourceDr (crTotal); line.setAmtAcctDr (crTotal); - line.save(); + line.saveEx(); } } // createBalancing diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoicePayScheduleValidate.java b/org.adempiere.base.process/src/org/compiere/process/InvoicePayScheduleValidate.java index b8c85f6b30..d169bcd6e2 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoicePayScheduleValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoicePayScheduleValidate.java @@ -74,14 +74,14 @@ public class InvoicePayScheduleValidate extends SvrProcess } boolean valid = invoice.getGrandTotal().compareTo(total) == 0; invoice.setIsPayScheduleValid(valid); - invoice.save(); + invoice.saveEx(); // Schedule for (int i = 0; i < schedule.length; i++) { if (schedule[i].isValid() != valid) { schedule[i].setIsValid(valid); - schedule[i].save(); + schedule[i].saveEx(); } } String msg = "@OK@"; diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoicePrint.java b/org.adempiere.base.process/src/org/compiere/process/InvoicePrint.java index a8f99a0fa8..e5c19a4907 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoicePrint.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoicePrint.java @@ -319,7 +319,7 @@ public class InvoicePrint extends SvrProcess // String msg = email.send(); MUserMail um = new MUserMail(mText, getAD_User_ID(), email); - um.save(); + um.saveEx(); if (msg.equals(EMail.SENT_OK)) { addLog (C_Invoice_ID, null, null, diff --git a/org.adempiere.base.process/src/org/compiere/process/MatchInvDelete.java b/org.adempiere.base.process/src/org/compiere/process/MatchInvDelete.java index 1d5db3e4ee..7a7fa1c242 100644 --- a/org.adempiere.base.process/src/org/compiere/process/MatchInvDelete.java +++ b/org.adempiere.base.process/src/org/compiere/process/MatchInvDelete.java @@ -52,7 +52,7 @@ public class MatchInvDelete extends SvrProcess throw new AdempiereUserError("@NotFound@ @M_MatchInv_ID@ " + p_M_MatchInv_ID); if (inv.delete(true)) return "@OK@"; - inv.save(); + inv.saveEx(); return "@Error@"; } // doIt diff --git a/org.adempiere.base.process/src/org/compiere/process/MatchPODelete.java b/org.adempiere.base.process/src/org/compiere/process/MatchPODelete.java index a53187d4ae..2263721e4e 100644 --- a/org.adempiere.base.process/src/org/compiere/process/MatchPODelete.java +++ b/org.adempiere.base.process/src/org/compiere/process/MatchPODelete.java @@ -72,7 +72,7 @@ public class MatchPODelete extends SvrProcess } return "@OK@"; } - po.save(); + po.saveEx(); return "@Error@"; } // doIt diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderBatchProcess.java b/org.adempiere.base.process/src/org/compiere/process/OrderBatchProcess.java index 1ddf1e18f4..890117e011 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderBatchProcess.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderBatchProcess.java @@ -174,7 +174,7 @@ public class OrderBatchProcess extends SvrProcess order.setDocAction(p_DocAction); if (order.processIt(p_DocAction)) { - order.save(); + order.saveEx(); addLog(0, null, null, order.getDocumentNo() + ": OK"); return true; } diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderPayScheduleValidate.java b/org.adempiere.base.process/src/org/compiere/process/OrderPayScheduleValidate.java index a2f6838bfe..5302aca83d 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderPayScheduleValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderPayScheduleValidate.java @@ -73,14 +73,14 @@ public class OrderPayScheduleValidate extends SvrProcess } boolean valid = order.getGrandTotal().compareTo(total) == 0; order.setIsPayScheduleValid(valid); - order.save(); + order.saveEx(); // Schedule for (int i = 0; i < schedule.length; i++) { if (schedule[i].isValid() != valid) { schedule[i].setIsValid(valid); - schedule[i].save(); + schedule[i].saveEx(); } } String msg = "@OK@"; diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java b/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java index d1f63ffb2d..3e45fc2457 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java @@ -78,7 +78,7 @@ public class OrderRePrice extends SvrProcess for (int i = 0; i < lines.length; i++) { lines[i].setPrice(order.getM_PriceList_ID()); - lines[i].save(); + lines[i].saveEx(); } order = new MOrder (getCtx(), p_C_Order_ID, get_TrxName()); BigDecimal newPrice = order.getGrandTotal(); @@ -92,7 +92,7 @@ public class OrderRePrice extends SvrProcess for (int i = 0; i < lines.length; i++) { lines[i].setPrice(invoice.getM_PriceList_ID(), invoice.getC_BPartner_ID()); - lines[i].save(); + lines[i].saveEx(); } invoice = new MInvoice (getCtx(), p_C_Invoice_ID, null); BigDecimal newPrice = invoice.getGrandTotal(); diff --git a/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateCheck.java b/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateCheck.java index c6b270f0c4..6dce8e28b4 100644 --- a/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateCheck.java +++ b/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateCheck.java @@ -89,7 +89,7 @@ public class PaySelectionCreateCheck extends SvrProcess } // psel.setProcessed(true); - psel.save(); + psel.saveEx(); return "@C_PaySelectionCheck_ID@ - #" + m_list.size(); } // doIt diff --git a/org.adempiere.base.process/src/org/compiere/process/PaymentOnline.java b/org.adempiere.base.process/src/org/compiere/process/PaymentOnline.java index 192e2fe216..fa76de0a8e 100644 --- a/org.adempiere.base.process/src/org/compiere/process/PaymentOnline.java +++ b/org.adempiere.base.process/src/org/compiere/process/PaymentOnline.java @@ -59,7 +59,7 @@ public class PaymentOnline extends SvrProcess // Process it boolean ok = pp.processOnline(); - pp.save(); + pp.saveEx(); if (!ok) throw new Exception(pp.getErrorMessage()); return "OK"; diff --git a/org.adempiere.base.process/src/org/compiere/process/PaymentTermValidate.java b/org.adempiere.base.process/src/org/compiere/process/PaymentTermValidate.java index b5efab3aa2..7b5d156bbe 100644 --- a/org.adempiere.base.process/src/org/compiere/process/PaymentTermValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/PaymentTermValidate.java @@ -55,7 +55,7 @@ public class PaymentTermValidate extends SvrProcess log.info ("C_PaymentTerm_ID=" + getRecord_ID()); MPaymentTerm pt = new MPaymentTerm (getCtx(), getRecord_ID(), get_TrxName()); String msg = pt.validate(); - pt.save(); + pt.saveEx(); // if ("@OK@".equals(msg)) return msg; diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectGenPO.java b/org.adempiere.base.process/src/org/compiere/process/ProjectGenPO.java index b098d37fbc..6892ef425d 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectGenPO.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectGenPO.java @@ -182,11 +182,11 @@ public class ProjectGenPO extends SvrProcess } orderLine.setTax(); - orderLine.save(); + orderLine.saveEx(); // update ProjectLine projectLine.setC_OrderPO_ID(order.getC_Order_ID()); - projectLine.save(); + projectLine.saveEx(); addLog (projectLine.getLine(), null, projectLine.getPlannedQty(), order.getDocumentNo()); } // createPOfromProjectLine diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectIssue.java b/org.adempiere.base.process/src/org/compiere/process/ProjectIssue.java index bc4892950d..2caab1f132 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectIssue.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectIssue.java @@ -142,7 +142,7 @@ public class ProjectIssue extends SvrProcess if (inOut.getC_Project_ID() == 0) { inOut.setC_Project_ID(m_project.getC_Project_ID()); - inOut.save(); + inOut.saveEx(); } else if (inOut.getC_Project_ID() != m_project.getC_Project_ID()) throw new IllegalArgumentException ("Receipt for other Project (" @@ -192,7 +192,7 @@ public class ProjectIssue extends SvrProcess if (pl == null) pl = new MProjectLine(m_project); pl.setMProjectIssue(pi); // setIssue - pl.save(); + pl.saveEx(); addLog(pi.getLine(), pi.getMovementDate(), pi.getMovementQty(), null); counter++; } // all InOutLines @@ -254,7 +254,7 @@ public class ProjectIssue extends SvrProcess // Find/Create Project Line MProjectLine pl = new MProjectLine(m_project); pl.setMProjectIssue(pi); // setIssue - pl.save(); + pl.saveEx(); addLog(pi.getLine(), pi.getMovementDate(), pi.getMovementQty(), null); counter++; } // allExpenseLines @@ -292,7 +292,7 @@ public class ProjectIssue extends SvrProcess // Update Line pl.setMProjectIssue(pi); - pl.save(); + pl.saveEx(); addLog(pi.getLine(), pi.getMovementDate(), pi.getMovementQty(), null); return "@Created@ 1"; } // issueProjectLine @@ -323,7 +323,7 @@ public class ProjectIssue extends SvrProcess // Create Project Line MProjectLine pl = new MProjectLine(m_project); pl.setMProjectIssue(pi); - pl.save(); + pl.saveEx(); addLog(pi.getLine(), pi.getMovementDate(), pi.getMovementQty(), null); return "@Created@ 1"; } // issueInventory diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java b/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java index 8247663f38..65d46ea34b 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java @@ -78,7 +78,7 @@ public class ProjectLinePricing extends SvrProcess // projectLine.setPlannedPrice(pp.getPriceStd()); projectLine.setPlannedMarginAmt(pp.getPriceStd().subtract(pp.getPriceLimit())); - projectLine.save(); + projectLine.saveEx(); // String retValue = Msg.getElement(getCtx(), "PriceList") + pp.getPriceList() + " - " + Msg.getElement(getCtx(), "PriceStd") + pp.getPriceStd() + " - " diff --git a/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java b/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java index c053f83c05..64917ce42f 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java +++ b/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java @@ -158,7 +158,7 @@ public class RegisterSystem extends SvrProcess int Record_ID = Integer.parseInt(sb.substring(index+10)); reg.setRecord_ID(Record_ID); reg.setIsRegistered(true); - reg.save(); + reg.saveEx(); // info = info.substring(0, index); } diff --git a/org.adempiere.base.process/src/org/compiere/process/ReplenishReport.java b/org.adempiere.base.process/src/org/compiere/process/ReplenishReport.java index 7c88fbef6d..d92f406c2f 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReplenishReport.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReplenishReport.java @@ -376,7 +376,7 @@ public class ReplenishReport extends SvrProcess if (qto == null) qto = Env.ZERO; replenish.setQtyToOrder(qto); - replenish.save(); + replenish.saveEx(); } } } @@ -430,7 +430,7 @@ public class ReplenishReport extends SvrProcess line.setM_Product_ID(replenish.getM_Product_ID()); line.setQty(replenish.getQtyToOrder()); line.setPrice(); - line.save(); + line.saveEx(); } m_info = "#" + noOrders + info; log.info(m_info); @@ -475,7 +475,7 @@ public class ReplenishReport extends SvrProcess line.setC_BPartner_ID(replenish.getC_BPartner_ID()); line.setQty(replenish.getQtyToOrder()); line.setPrice(); - line.save(); + line.saveEx(); } m_info = "#" + noReqs + info; log.info(m_info); @@ -554,7 +554,7 @@ public class ReplenishReport extends SvrProcess line.setM_AttributeSetInstance_ID(storage.getM_AttributeSetInstance_ID()); line.setM_LocatorTo_ID(M_LocatorTo_ID); // to line.setM_AttributeSetInstanceTo_ID(storage.getM_AttributeSetInstance_ID()); - line.save(); + line.saveEx(); // target = target.subtract(moveQty); if (target.signum() == 0) @@ -688,7 +688,7 @@ public class ReplenishReport extends SvrProcess line.setM_LocatorTo_ID(M_LocatorTo_ID); // to line.setM_AttributeSetInstanceTo_ID(storage.getM_AttributeSetInstance_ID()); line.setIsInvoiced(false); - line.save(); + line.saveEx(); // target = target.subtract(moveQty); if (target.signum() == 0) @@ -705,7 +705,7 @@ public class ReplenishReport extends SvrProcess line.setM_LocatorTo_ID(M_LocatorTo_ID); // to line.setM_AttributeSetInstanceTo_ID(0); line.setIsInvoiced(false); - line.save(); + line.saveEx(); } if (replenishs.length == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java b/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java index 354ff03e28..f0971721b5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java @@ -112,11 +112,11 @@ public class ReplicationLocal extends SvrProcess double sec = (System.currentTimeMillis() - m_start); sec /= 1000; m_replicationRun.setDescription(sec + " s"); - m_replicationRun.save(); + m_replicationRun.saveEx(); if (m_replicated) { m_replication.setDateLastRun (m_replicationStart); - m_replication.save(); + m_replication.saveEx(); } // exit(); @@ -202,7 +202,7 @@ public class ReplicationLocal extends SvrProcess if (dateRun != null) m_replicationStart = dateRun; m_replicationRun = new MReplicationRun (getCtx(), m_replication.getAD_Replication_ID(), m_replicationStart, get_TrxName()); - m_replicationRun.save(); + m_replicationRun.saveEx(); } // setupRemote /*************************************************************************/ @@ -323,7 +323,7 @@ public class ReplicationLocal extends SvrProcess targetRS.close(); targetRS = null; } - rLog.save(); + rLog.saveEx(); return !pi.isError(); } // mergeDataTable @@ -496,7 +496,7 @@ public class ReplicationLocal extends SvrProcess if (pi.isError()) m_replicated = false; rLog.setIsReplicated(!pi.isError()); - rLog.save(); + rLog.saveEx(); return !pi.isError(); } // sendUpdatesTable diff --git a/org.adempiere.base.process/src/org/compiere/process/ReplicationRemote.java b/org.adempiere.base.process/src/org/compiere/process/ReplicationRemote.java index 0ea2d98a0e..dc4db310ec 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReplicationRemote.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReplicationRemote.java @@ -142,7 +142,7 @@ public class ReplicationRemote extends SvrProcess m_system.setIDRangeStart(IDRangeStart); m_system.setIDRangeEnd(IDRangeEnd); m_system.setReplicationType(MSystem.REPLICATIONTYPE_Merge); - m_system.save(); + m_system.saveEx(); } // setupRemoteAD_System /** diff --git a/org.adempiere.base.process/src/org/compiere/process/ReportColumnSet_Copy.java b/org.adempiere.base.process/src/org/compiere/process/ReportColumnSet_Copy.java index 72c9be75ad..706d8fa9e8 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReportColumnSet_Copy.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReportColumnSet_Copy.java @@ -77,7 +77,7 @@ public class ReportColumnSet_Copy extends SvrProcess for (int i = 0; i < rcs.length; i++) { MReportColumn rc = MReportColumn.copy (getCtx(), to.getAD_Client_ID(), to.getAD_Org_ID(), to_ID, rcs[i], get_TrxName()); - rc.save(); + rc.saveEx(); } // Oper 1/2 were set to Null ! return "@Copied@=" + rcs.length; diff --git a/org.adempiere.base.process/src/org/compiere/process/ReportLineSet_Copy.java b/org.adempiere.base.process/src/org/compiere/process/ReportLineSet_Copy.java index 2d870b95d7..59b3ea804c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReportLineSet_Copy.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReportLineSet_Copy.java @@ -78,14 +78,14 @@ public class ReportLineSet_Copy extends SvrProcess for (int i = 0; i < rls.length; i++) { MReportLine rl = MReportLine.copy (getCtx(), to.getAD_Client_ID(), to.getAD_Org_ID(), to_ID, rls[i], get_TrxName()); - rl.save(); + rl.saveEx(); MReportSource[] rss = rls[i].getSources(); if (rss != null) { for (int ii = 0; ii < rss.length; ii++) { MReportSource rs = MReportSource.copy (getCtx(), to.getAD_Client_ID(), to.getAD_Org_ID(), rl.get_ID(), rss[ii], get_TrxName()); - rs.save(); + rs.saveEx(); } } // Oper 1/2 were set to Null ! diff --git a/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java b/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java index ece0a6161d..0bb6e63765 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java @@ -179,7 +179,7 @@ public class RequestInvoice extends SvrProcess else { m_invoice.processIt(MInvoice.ACTION_Prepare); - m_invoice.save(); + m_invoice.saveEx(); addLog(0, null, m_invoice.getGrandTotal(), m_invoice.getDocumentNo()); } } @@ -198,7 +198,7 @@ public class RequestInvoice extends SvrProcess MBPartner partner = new MBPartner (getCtx(), request.getC_BPartner_ID(), null); m_invoice.setBPartner(partner); - m_invoice.save(); + m_invoice.saveEx(); m_linecount = 0; } // invoiceNew @@ -229,9 +229,9 @@ public class RequestInvoice extends SvrProcess il.setM_Product_ID(M_Product_ID); // il.setPrice(); - il.save(); + il.saveEx(); // updates[i].setC_InvoiceLine_ID(il.getC_InvoiceLine_ID()); - // updates[i].save(); + // updates[i].saveEx(); } } // invoiceLine diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQClose.java b/org.adempiere.base.process/src/org/compiere/process/RfQClose.java index 6058280850..566f9d2e86 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQClose.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQClose.java @@ -67,14 +67,14 @@ public class RfQClose extends SvrProcess log.info("doIt - " + rfq); // rfq.setProcessed(true); - rfq.save(); + rfq.saveEx(); // int counter = 0; MRfQResponse[] responses = rfq.getResponses (false, false); for (int i = 0; i < responses.length; i++) { responses[i].setProcessed(true); - responses[i].save(); + responses[i].saveEx(); counter++; } // diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQCopyLines.java b/org.adempiere.base.process/src/org/compiere/process/RfQCopyLines.java index 35810cd9ab..2f4c7f93f7 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQCopyLines.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQCopyLines.java @@ -86,7 +86,7 @@ public class RfQCopyLines extends SvrProcess // newLine.setDateWorkStart(); // newLine.setDateWorkComplete(); newLine.setDeliveryDays(lines[i].getDeliveryDays()); - newLine.save(); + newLine.saveEx(); // Copy Qtys MRfQLineQty[] qtys = lines[i].getQtys(); for (int j = 0; j < qtys.length; j++) @@ -97,7 +97,7 @@ public class RfQCopyLines extends SvrProcess newQty.setIsOfferQty(qtys[j].isOfferQty()); newQty.setIsPurchaseQty(qtys[j].isPurchaseQty()); newQty.setMargin(qtys[j].getMargin()); - newQty.save(); + newQty.saveEx(); } counter++; } // copy all lines diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQCreateSO.java b/org.adempiere.base.process/src/org/compiere/process/RfQCreateSO.java index 697fe42e14..d8790d2fc2 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQCreateSO.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQCreateSO.java @@ -96,7 +96,7 @@ public class RfQCreateSO extends SvrProcess order.setSalesRep_ID(rfq.getSalesRep_ID()); if (rfq.getDateWorkComplete() != null) order.setDatePromised(rfq.getDateWorkComplete()); - order.save(); + order.saveEx(); MRfQLine[] lines = rfq.getLines(); for (int i = 0; i < lines.length; i++) @@ -137,14 +137,14 @@ public class RfQCreateSO extends SvrProcess } } // price ol.setPrice(price); - ol.save(); + ol.saveEx(); } // Offer Qty } // All Qtys } // All Lines // rfq.setC_Order_ID(order.getC_Order_ID()); - rfq.save(); + rfq.saveEx(); return order.getDocumentNo(); } // doIt } diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQResponseCComplete.java b/org.adempiere.base.process/src/org/compiere/process/RfQResponseCComplete.java index 265775a979..1f96e8cb79 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQResponseCComplete.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQResponseCComplete.java @@ -62,7 +62,7 @@ public class RfQResponseCComplete extends SvrProcess if (error != null && error.length() > 0) throw new Exception (error); // - response.save(); + response.saveEx(); return "OK"; } // doIt diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQResponseRank.java b/org.adempiere.base.process/src/org/compiere/process/RfQResponseRank.java index 3147959332..fda0e93371 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQResponseRank.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQResponseRank.java @@ -137,7 +137,7 @@ public class RfQResponseRank extends SvrProcess if (!respQty.isActive() || !respQty.isValidAmt()) { respQty.setRanking(999); - respQty.save(); + respQty.saveEx(); log.fine(" - ignored: " + respQty); } } // for all respones line qtys @@ -175,12 +175,12 @@ public class RfQResponseRank extends SvrProcess } qty.setRanking(lastRank); log.fine(" - Rank " + lastRank + ": " + qty); - qty.save(); + qty.saveEx(); // if (rank == 0) // Update RfQ { rfqQty.setBestResponseAmt(qty.getNetAmt()); - rfqQty.save(); + rfqQty.saveEx(); } rank++; } @@ -217,13 +217,13 @@ public class RfQResponseRank extends SvrProcess && respQty.getRfQLineQty().isPurchaseQty()) { respLine.setIsSelectedWinner(true); - respLine.save(); + respLine.saveEx(); break; } } } response.setRanking(ranking); - response.save(); + response.saveEx(); log.fine("- Response Ranking " + ranking + ": " + response); if (!rfq.isQuoteSelectedLines()) // no total selected winner if not all lines { @@ -238,7 +238,7 @@ public class RfQResponseRank extends SvrProcess if (winner != null) { winner.setIsSelectedWinner(true); - winner.save(); + winner.saveEx(); log.fine("- Response Winner: " + winner); } } // rankLines @@ -271,7 +271,7 @@ public class RfQResponseRank extends SvrProcess if (response.isSelectedWinner()) response.setIsSelectedWinner(false); } - response.save(); + response.saveEx(); log.fine("rankResponse - " + response); } } // rankResponses diff --git a/org.adempiere.base.process/src/org/compiere/process/SendMailText.java b/org.adempiere.base.process/src/org/compiere/process/SendMailText.java index 1925ecc3ca..a1b7648d4a 100644 --- a/org.adempiere.base.process/src/org/compiere/process/SendMailText.java +++ b/org.adempiere.base.process/src/org/compiere/process/SendMailText.java @@ -286,11 +286,11 @@ public class SendMailText extends SvrProcess log.warning("NOT VALID - " + email); to.setIsActive(false); to.addDescription("Invalid EMail"); - to.save(); + to.saveEx(); return Boolean.FALSE; } boolean OK = EMail.SENT_OK.equals(email.send()); - new MUserMail(m_MailText, AD_User_ID, email).save(); + new MUserMail(m_MailText, AD_User_ID, email).saveEx(); // if (OK) log.fine(to.getEMail()); diff --git a/org.adempiere.base.process/src/org/compiere/process/StorageCleanup.java b/org.adempiere.base.process/src/org/compiere/process/StorageCleanup.java index bf82717e6a..3a09cb1067 100644 --- a/org.adempiere.base.process/src/org/compiere/process/StorageCleanup.java +++ b/org.adempiere.base.process/src/org/compiere/process/StorageCleanup.java @@ -171,7 +171,7 @@ public class StorageCleanup extends SvrProcess // Process mh.processIt(MMovement.ACTION_Complete); - mh.save(); + mh.saveEx(); addLog(0, null, new BigDecimal(lines), "@M_Movement_ID@ " + mh.getDocumentNo() + " (" + MRefList.get(getCtx(), MMovement.DOCSTATUS_AD_Reference_ID, diff --git a/org.adempiere.base.process/src/org/compiere/process/SynchronizeTerminology.java b/org.adempiere.base.process/src/org/compiere/process/SynchronizeTerminology.java index f9af105d4f..a042b4794c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/SynchronizeTerminology.java +++ b/org.adempiere.base.process/src/org/compiere/process/SynchronizeTerminology.java @@ -72,7 +72,7 @@ public class SynchronizeTerminology extends SvrProcess elem.setDescription(desc); elem.setHelp(help); elem.setPrintName(name); - elem.save(); + elem.saveEx(); } pstmt.close(); rs.close(); @@ -98,7 +98,7 @@ public class SynchronizeTerminology extends SvrProcess elem.setDescription(desc); elem.setHelp(help); elem.setPrintName(name); - elem.save(); + elem.saveEx(); } pstmt.close(); rs.close(); diff --git a/org.adempiere.base/src/org/adempiere/model/PromotionValidator.java b/org.adempiere.base/src/org/adempiere/model/PromotionValidator.java index c233bcd502..c8d276a9b3 100644 --- a/org.adempiere.base/src/org/adempiere/model/PromotionValidator.java +++ b/org.adempiere.base/src/org/adempiere/model/PromotionValidator.java @@ -41,7 +41,7 @@ public class PromotionValidator implements ModelValidator { PromotionRule.applyPromotions(order); order.getLines(true, null); order.calculateTaxTotal(); - order.save(); + order.saveEx(); increasePromotionCounter(order); } catch (Exception e) { if (e instanceof RuntimeException) diff --git a/org.adempiere.base/src/org/compiere/Adempiere.java b/org.adempiere.base/src/org/compiere/Adempiere.java index 1973f70baa..7c6d799593 100644 --- a/org.adempiere.base/src/org/compiere/Adempiere.java +++ b/org.adempiere.base/src/org/compiere/Adempiere.java @@ -537,7 +537,7 @@ public final class Adempiere { SecureEngine.init(className); // test it system.setEncryptionKey(className); - system.save(); + system.saveEx(); } } SecureEngine.init(className); diff --git a/org.adempiere.base/src/org/compiere/FA/AssetDisposed.java b/org.adempiere.base/src/org/compiere/FA/AssetDisposed.java index 38a79671a6..bf34a407ef 100644 --- a/org.adempiere.base/src/org/compiere/FA/AssetDisposed.java +++ b/org.adempiere.base/src/org/compiere/FA/AssetDisposed.java @@ -138,7 +138,7 @@ public class AssetDisposed extends SvrProcess depexp0.setIsDepreciated(true); depexp0.setA_Period(AssetDisposed.getC_Period_ID()); depexp0.setA_Entry_Type("DIS"); - depexp0.save(); + depexp0.saveEx(); X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp1.setPostingType(rs.getString("PostingType")); @@ -150,7 +150,7 @@ public class AssetDisposed extends SvrProcess depexp1.setIsDepreciated(false); depexp1.setA_Period(AssetDisposed.getC_Period_ID()); depexp1.setA_Entry_Type("DIS"); - depexp1.save(); + depexp1.saveEx(); v_Balance = v_Balance.add(rs.getBigDecimal("A_Asset_Cost").multiply(rs.getBigDecimal("A_Split_Percent"))); @@ -165,7 +165,7 @@ public class AssetDisposed extends SvrProcess depexp2.setIsDepreciated(true); depexp2.setA_Period(AssetDisposed.getC_Period_ID()); depexp2.setA_Entry_Type("DIS"); - depexp2.save(); + depexp2.saveEx(); X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp3.setPostingType(rs.getString("PostingType")); @@ -177,7 +177,7 @@ public class AssetDisposed extends SvrProcess depexp3.setIsDepreciated(false); depexp3.setA_Period(AssetDisposed.getC_Period_ID()); depexp3.setA_Entry_Type("DIS"); - depexp3.save(); + depexp3.saveEx(); } sql = "UPDATE A_ASSET " @@ -201,7 +201,7 @@ public class AssetDisposed extends SvrProcess change.setAssetAccumDepreciationAmt(v_Balance); change.setIsFullyDepreciated(true); change.setIsDisposed(true); - change.save(); + change.saveEx(); } catch (Exception e) diff --git a/org.adempiere.base/src/org/compiere/FA/AssetRevalEntry.java b/org.adempiere.base/src/org/compiere/FA/AssetRevalEntry.java index a05bb76f77..da7591f1db 100644 --- a/org.adempiere.base/src/org/compiere/FA/AssetRevalEntry.java +++ b/org.adempiere.base/src/org/compiere/FA/AssetRevalEntry.java @@ -195,7 +195,7 @@ public class AssetRevalEntry extends SvrProcess depexp0.setIsDepreciated(false); depexp0.setA_Period(AssetReval.getC_Period_ID()); depexp0.setA_Entry_Type("RVL"); - depexp0.save(); + depexp0.saveEx(); X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp1.setPostingType(AssetReval.getPostingType()); @@ -207,7 +207,7 @@ public class AssetRevalEntry extends SvrProcess depexp1.setIsDepreciated(false); depexp1.setA_Period(AssetReval.getC_Period_ID()); depexp1.setA_Entry_Type("RVL"); - depexp1.save(); + depexp1.saveEx(); // Create JV for the Reval Accum Depr Amounts X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, null); @@ -220,7 +220,7 @@ public class AssetRevalEntry extends SvrProcess depexp2.setIsDepreciated(false); depexp2.setA_Period(AssetReval.getC_Period_ID()); depexp2.setA_Entry_Type("RVL"); - depexp2.save(); + depexp2.saveEx(); X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp3.setPostingType(AssetReval.getPostingType()); @@ -232,7 +232,7 @@ public class AssetRevalEntry extends SvrProcess depexp3.setIsDepreciated(false); depexp3.setA_Period(AssetReval.getC_Period_ID()); depexp3.setA_Entry_Type("RVL"); - depexp3.save(); + depexp3.saveEx(); // Create JV for the Reval Depreciation Expense Amounts X_A_Depreciation_Exp depexp4 = new X_A_Depreciation_Exp (getCtx(), 0, null); @@ -245,7 +245,7 @@ public class AssetRevalEntry extends SvrProcess depexp4.setIsDepreciated(false); depexp4.setA_Period(AssetReval.getC_Period_ID()); depexp4.setA_Entry_Type("RVL"); - depexp4.save(); + depexp4.saveEx(); X_A_Depreciation_Exp depexp5 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp5.setPostingType(AssetReval.getPostingType()); @@ -257,7 +257,7 @@ public class AssetRevalEntry extends SvrProcess depexp5.setIsDepreciated(false); depexp5.setA_Period(AssetReval.getC_Period_ID()); depexp5.setA_Entry_Type("RVL"); - depexp5.save(); + depexp5.saveEx(); } catch (Exception e) @@ -330,7 +330,7 @@ public class AssetRevalEntry extends SvrProcess depexp0.setIsDepreciated(false); depexp0.setA_Period(AssetReval.getC_Period_ID()); depexp0.setA_Entry_Type("RVL"); - depexp0.save(); + depexp0.saveEx(); X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp1.setPostingType(AssetReval.getPostingType()); @@ -342,7 +342,7 @@ public class AssetRevalEntry extends SvrProcess depexp1.setIsDepreciated(false); depexp1.setA_Period(AssetReval.getC_Period_ID()); depexp1.setA_Entry_Type("RVL"); - depexp1.save(); + depexp1.saveEx(); // Create JV for the Reval Accum Depr Amounts X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, null); @@ -355,7 +355,7 @@ public class AssetRevalEntry extends SvrProcess depexp2.setIsDepreciated(false); depexp2.setA_Period(AssetReval.getC_Period_ID()); depexp2.setA_Entry_Type("RVL"); - depexp2.save(); + depexp2.saveEx(); X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp3.setPostingType(AssetReval.getPostingType()); @@ -367,7 +367,7 @@ public class AssetRevalEntry extends SvrProcess depexp3.setIsDepreciated(false); depexp3.setA_Period(AssetReval.getC_Period_ID()); depexp3.setA_Entry_Type("RVL"); - depexp3.save(); + depexp3.saveEx(); // Create JV for the Reval Depreciation Expense Amounts X_A_Depreciation_Exp depexp4 = new X_A_Depreciation_Exp (getCtx(), 0, null); @@ -380,7 +380,7 @@ public class AssetRevalEntry extends SvrProcess depexp4.setIsDepreciated(false); depexp4.setA_Period(AssetReval.getC_Period_ID()); depexp4.setA_Entry_Type("RVL"); - depexp4.save(); + depexp4.saveEx(); X_A_Depreciation_Exp depexp5 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp5.setPostingType(AssetReval.getPostingType()); @@ -392,7 +392,7 @@ public class AssetRevalEntry extends SvrProcess depexp5.setIsDepreciated(false); depexp5.setA_Period(AssetReval.getC_Period_ID()); depexp5.setA_Entry_Type("RVL"); - depexp5.save(); + depexp5.saveEx(); } } catch (Exception e) diff --git a/org.adempiere.base/src/org/compiere/FA/AssetSplit.java b/org.adempiere.base/src/org/compiere/FA/AssetSplit.java index 55ce2e65e9..cd493c155d 100644 --- a/org.adempiere.base/src/org/compiere/FA/AssetSplit.java +++ b/org.adempiere.base/src/org/compiere/FA/AssetSplit.java @@ -161,7 +161,7 @@ public class AssetSplit extends SvrProcess AssetNew.setC_BPartner_Location_ID(Asset.getC_BPartner_Location_ID()); AssetNew.setA_QTY_Current(v_QTY_New); AssetNew.setA_QTY_Original(v_QTY_New); - AssetNew.save(); + AssetNew.saveEx(); v_AssetNumber = AssetNew.getA_Asset_ID(); @@ -176,7 +176,7 @@ public class AssetSplit extends SvrProcess assetadd.setA_QTY_Current(v_QTY_New); assetadd.setPostingType(AssetSplit.getPostingType()); assetadd.setM_InOutLine_ID(1); - assetadd.save(); + assetadd.saveEx(); String sql2 = "SELECT A_Asset_Acct_ID " @@ -212,7 +212,7 @@ public class AssetSplit extends SvrProcess assetacctnew.setA_Depreciation_Manual_Period(" "); else assetacctnew.setA_Depreciation_Manual_Period(assetacct.getA_Depreciation_Manual_Period()); - assetacctnew.save(); + assetacctnew.saveEx(); sql2 = null; @@ -239,7 +239,7 @@ public class AssetSplit extends SvrProcess assetwknew.setIsDepreciated(assetwk.isDepreciated()); assetwknew.setA_Asset_Life_Current_Year(assetwk.getA_Asset_Life_Current_Year()); assetwknew.setA_Curr_Dep_Exp(new BigDecimal (0.0)); - assetwknew.save(); + assetwknew.saveEx(); //Record transaction in Asset History @@ -299,7 +299,7 @@ public class AssetSplit extends SvrProcess change.setC_BPartner_ID(AssetNew.getC_BPartner_ID()); change.setA_QTY_Current(AssetNew.getA_QTY_Current()); change.setA_QTY_Original(AssetNew.getA_QTY_Original()); - change.save(); + change.saveEx(); //Record Account Numbers for JE's @@ -315,7 +315,7 @@ public class AssetSplit extends SvrProcess MAsset AssetNew = new MAsset (getCtx(), v_AssetNumber, null); AssetNew.setA_QTY_Current(AssetNew.getA_QTY_Current().add(v_QTY_New)); AssetNew.setA_QTY_Original(AssetNew.getA_QTY_Original().add(v_QTY_New)); - AssetNew.save(); + AssetNew.saveEx(); //Create Asset Addition Record MAssetAddition assetadd = new MAssetAddition (getCtx(), 0, null); @@ -327,7 +327,7 @@ public class AssetSplit extends SvrProcess assetadd.setA_QTY_Current(v_QTY_New); assetadd.setPostingType(AssetSplit.getPostingType()); assetadd.setM_InOutLine_ID(1); - assetadd.save(); + assetadd.saveEx(); String sql2 = "SELECT A_Asset_Acct_ID " @@ -342,7 +342,7 @@ public class AssetSplit extends SvrProcess MAssetAcct assetacctnew = new MAssetAcct (getCtx(), v_NewAssetAcctID, null); assetacctnew.setA_Salvage_Value(assetacctnew.getA_Salvage_Value().add(v_SalvageValue_New)); assetacctnew.setA_Depreciation_Manual_Amount(assetacctnew.getA_Depreciation_Manual_Amount().add(v_ManDep_New)); - assetacctnew.save(); + assetacctnew.saveEx(); sql2 = null; @@ -361,7 +361,7 @@ public class AssetSplit extends SvrProcess assetwknew.setA_Accumulated_Depr(assetwknew.getA_Accumulated_Depr().add(v_AccumBalance_New)); assetwknew.setA_Salvage_Value(assetwknew.getA_Salvage_Value().add(v_SalvageValue_New)); assetwknew.setA_QTY_Current(assetwknew.getA_QTY_Current().add(v_QTY_New)); - assetwknew.save(); + assetwknew.saveEx(); //Record transaction in Asset History @@ -422,7 +422,7 @@ public class AssetSplit extends SvrProcess change.setC_BPartner_ID(AssetNew.getC_BPartner_ID()); change.setA_QTY_Current(AssetNew.getA_QTY_Current()); change.setA_QTY_Original(AssetNew.getA_QTY_Original()); - change.save(); + change.saveEx(); //Record Account Numbers for JE's @@ -434,7 +434,7 @@ public class AssetSplit extends SvrProcess // Update original Asset Asset.setA_QTY_Current(v_QTY_Org); - Asset.save(); + Asset.saveEx(); // Update original asset for the split MAssetAddition assetaddold = new MAssetAddition (getCtx(), 0, null); @@ -446,19 +446,19 @@ public class AssetSplit extends SvrProcess assetaddold.setA_QTY_Current(v_QTY_New.multiply( new BigDecimal(-1))); assetaddold.setPostingType(AssetSplit.getPostingType()); assetaddold.setM_InOutLine_ID(1); - assetaddold.save(); + assetaddold.saveEx(); //Update the Original Asset in the Account File assetacct.setA_Salvage_Value(v_SalvageValue_Org); assetacct.setA_Depreciation_Manual_Amount(v_ManDep_Org); - assetacct.save(); + assetacct.saveEx(); //Update the Original Asset in the Deprecation Workfile assetwk.setA_Asset_Cost(v_CostBalance_Org); assetwk.setA_Accumulated_Depr(v_AccumBalance_Org); assetwk.setA_Salvage_Value(v_SalvageValue_Org); assetwk.setA_QTY_Current(v_QTY_Org); - assetwk.save(); + assetwk.saveEx(); MAssetChange change1 = new MAssetChange (getCtx(), 0, null); change1.setChangeType("SPL"); @@ -477,7 +477,7 @@ public class AssetSplit extends SvrProcess change1.setAssetAccumDepreciationAmt(v_AccumBalance_New.multiply(new BigDecimal(-1))); change1.setA_Salvage_Value(v_SalvageValue_New.multiply(new BigDecimal(-1))); change1.setA_QTY_Current(v_QTY_New.multiply(new BigDecimal(-1))); - change1.save(); + change1.saveEx(); //Create Journal Entries for the split X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, null); @@ -491,7 +491,7 @@ public class AssetSplit extends SvrProcess depexp2.setIsDepreciated(false); depexp2.setA_Period(AssetSplit.getC_Period_ID()); depexp2.setA_Entry_Type("SPL"); - depexp2.save(); + depexp2.saveEx(); X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null); @@ -504,7 +504,7 @@ public class AssetSplit extends SvrProcess depexp3.setIsDepreciated(false); depexp3.setA_Period(AssetSplit.getC_Period_ID()); depexp3.setA_Entry_Type("SPL"); - depexp3.save(); + depexp3.saveEx(); X_A_Depreciation_Exp depexp4 = new X_A_Depreciation_Exp (getCtx(), 0, null); //Create JV for the Cost of the asset @@ -517,7 +517,7 @@ public class AssetSplit extends SvrProcess depexp4.setIsDepreciated(false); depexp4.setA_Period(AssetSplit.getC_Period_ID()); depexp4.setA_Entry_Type("SPL"); - depexp4.save(); + depexp4.saveEx(); X_A_Depreciation_Exp depexp5 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp5.setPostingType(AssetSplit.getPostingType()); @@ -529,7 +529,7 @@ public class AssetSplit extends SvrProcess depexp5.setIsDepreciated(false); depexp5.setA_Period(AssetSplit.getC_Period_ID()); depexp5.setA_Entry_Type("SPL"); - depexp5.save(); + depexp5.saveEx(); String sql = null; @@ -567,7 +567,7 @@ public class AssetSplit extends SvrProcess depexp0.setIsDepreciated(false); depexp0.setA_Period(AssetSplit.getC_Period_ID()); depexp0.setA_Entry_Type("SPL"); - depexp0.save(); + depexp0.saveEx(); X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp1.setPostingType(AssetSplit.getPostingType()); @@ -579,7 +579,7 @@ public class AssetSplit extends SvrProcess depexp1.setIsDepreciated(false); depexp1.setA_Period(AssetSplit.getC_Period_ID()); depexp1.setA_Entry_Type("SPL"); - depexp1.save(); + depexp1.saveEx(); } rs.close(); diff --git a/org.adempiere.base/src/org/compiere/FA/AssetTransfer.java b/org.adempiere.base/src/org/compiere/FA/AssetTransfer.java index 29ad979d08..df0f2c7d21 100644 --- a/org.adempiere.base/src/org/compiere/FA/AssetTransfer.java +++ b/org.adempiere.base/src/org/compiere/FA/AssetTransfer.java @@ -123,7 +123,7 @@ public class AssetTransfer extends SvrProcess depexp0.setIsDepreciated(false); depexp0.setA_Period(AssetTransfer.getC_Period_ID()); depexp0.setA_Entry_Type("TRN"); - depexp0.save(); + depexp0.saveEx(); X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp1.setPostingType(AssetTransfer.getPostingType()); @@ -135,7 +135,7 @@ public class AssetTransfer extends SvrProcess depexp1.setIsDepreciated(false); depexp1.setA_Period(AssetTransfer.getC_Period_ID()); depexp1.setA_Entry_Type("TRN"); - depexp1.save(); + depexp1.saveEx(); } } catch (Exception e) @@ -176,7 +176,7 @@ public class AssetTransfer extends SvrProcess depexp2.setIsDepreciated(false); depexp2.setA_Period(AssetTransfer.getC_Period_ID()); depexp2.setA_Entry_Type("TRN"); - depexp2.save(); + depexp2.saveEx(); X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp3.setPostingType(AssetTransfer.getPostingType()); @@ -188,7 +188,7 @@ public class AssetTransfer extends SvrProcess depexp3.setIsDepreciated(false); depexp3.setA_Period(AssetTransfer.getC_Period_ID()); depexp3.setA_Entry_Type("TRN"); - depexp3.save(); + depexp3.saveEx(); X_A_Depreciation_Exp depexp4 = new X_A_Depreciation_Exp (getCtx(), 0, null); // Create JV for the Cost of the asset @@ -201,7 +201,7 @@ public class AssetTransfer extends SvrProcess depexp4.setIsDepreciated(false); depexp4.setA_Period(AssetTransfer.getC_Period_ID()); depexp4.setA_Entry_Type("TRN"); - depexp4.save(); + depexp4.saveEx(); X_A_Depreciation_Exp depexp5 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp5.setPostingType(AssetTransfer.getPostingType()); @@ -213,7 +213,7 @@ public class AssetTransfer extends SvrProcess depexp5.setIsDepreciated(false); depexp5.setA_Period(AssetTransfer.getC_Period_ID()); depexp5.setA_Entry_Type("TRN"); - depexp5.save(); + depexp5.saveEx(); // Update Asset Setup for New Accounts @@ -248,12 +248,12 @@ public class AssetTransfer extends SvrProcess change.setAssetAccumDepreciationAmt(rs.getBigDecimal("A_ACCUMULATED_DEPR")); change.setAssetBookValueAmt(rs.getBigDecimal("A_Asset_Cost")); change.setChangeAmt(v_Balance); - change.save(); + change.saveEx(); DB.executeUpdate(sql,null); AssetTransfer.setIsActive(false); - AssetTransfer.save(); + AssetTransfer.saveEx(); // Remove Entry from Processing file diff --git a/org.adempiere.base/src/org/compiere/FA/BuildDepForecastFile.java b/org.adempiere.base/src/org/compiere/FA/BuildDepForecastFile.java index c2111fb2f8..e602b45134 100644 --- a/org.adempiere.base/src/org/compiere/FA/BuildDepForecastFile.java +++ b/org.adempiere.base/src/org/compiere/FA/BuildDepForecastFile.java @@ -184,7 +184,7 @@ public class BuildDepForecastFile extends SvrProcess depexp.setIsDepreciated(true); depexp.setDateAcct(assetwk.getAssetDepreciationDate()); depexp.setA_Entry_Type("FOR"); - depexp.save(); + depexp.saveEx(); } else { @@ -200,7 +200,7 @@ public class BuildDepForecastFile extends SvrProcess cal.setTime(ts); assetwk.setDateAcct(ts); assetwk.setA_Period_Forecast(new BigDecimal(assetwk.getA_Period_Posted())); - assetwk.save(); + assetwk.saveEx(); //Calculate life to date depreciation @@ -224,7 +224,7 @@ public class BuildDepForecastFile extends SvrProcess assetwk.setDateAcct(ts); v_current_adj = v_current_adj.add((v_HalfYearConv_Adj)); assetwk.setA_Period_Forecast(v_current_adj); - assetwk.save(); + assetwk.saveEx(); v_Dep_Exp_Inception = v_Dep_Exp_Inception .add(v_Dep_Exp_Inception2.multiply(v_HalfYearConv_Adj)); v_current = v_current + 1; } @@ -288,7 +288,7 @@ public class BuildDepForecastFile extends SvrProcess depexp1.setA_Period((int)v_current); depexp1.setIsDepreciated(true); depexp1.setDateAcct(ts); - depexp1.save(); + depexp1.saveEx(); v_total_adjustment = v_total_adjustment.setScale(5, BigDecimal.ROUND_HALF_UP).subtract(v_Dep_Exp_Adjustment.setScale(5, BigDecimal.ROUND_HALF_UP)); //Record adjusted expense @@ -302,7 +302,7 @@ public class BuildDepForecastFile extends SvrProcess depexp2.setIsDepreciated(true); depexp2.setDateAcct(ts); depexp2.setA_Entry_Type("FOR"); - depexp2.save(); + depexp2.saveEx(); v_Dep_Exp_Inception = v_Dep_Exp_Inception.add((v_Dep_Exp_Monthly.setScale(2, BigDecimal.ROUND_HALF_UP))).setScale(2, BigDecimal.ROUND_HALF_UP); } else @@ -319,7 +319,7 @@ public class BuildDepForecastFile extends SvrProcess depexp2.setIsDepreciated(true); depexp2.setDateAcct(ts); depexp2.setA_Entry_Type("FOR"); - depexp2.save(); + depexp2.saveEx(); v_Dep_Exp_Inception = v_Dep_Exp_Inception.add(v_Dep_Exp_Monthly).setScale(2, BigDecimal.ROUND_HALF_UP); } lastdepexp2 = depexp2.get_ID(); @@ -332,13 +332,13 @@ public class BuildDepForecastFile extends SvrProcess //record in workfile assetwk.setA_Period_Forecast(v_current_adj); assetwk.setDateAcct(ts); - assetwk.save(); + assetwk.saveEx(); v_current = v_current + 1; } //adjust last entry for rounding errors X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), lastdepexp2, null); depexp2.setExpense(depexp2.getExpense().add(((rs.getBigDecimal("A_ASSET_COST").subtract(rs.getBigDecimal("A_SALVAGE_VALUE").subtract(v_total_adjustment))).subtract(v_Dep_Exp_Inception)).multiply(new BigDecimal(rs2.getFloat("A_Split_Percent"))))); - depexp2.save(); + depexp2.saveEx(); asset_id_current = rs2.getInt("A_ASSET_ID"); log.info("Asset #"+asset_id_current); } diff --git a/org.adempiere.base/src/org/compiere/FA/BuildDepWorkFile.java b/org.adempiere.base/src/org/compiere/FA/BuildDepWorkFile.java index 4cb045e28c..1ef52a3bda 100644 --- a/org.adempiere.base/src/org/compiere/FA/BuildDepWorkFile.java +++ b/org.adempiere.base/src/org/compiere/FA/BuildDepWorkFile.java @@ -188,7 +188,7 @@ public class BuildDepWorkFile extends SvrProcess //depexp.setIsDepreciated(true); //depexp.setDateAcct(assetwk.getAssetDepreciationDate()); //depexp.setA_Entry_Type("DEP"); - //depexp.save(); + //depexp.saveEx(); } else { @@ -205,7 +205,7 @@ public class BuildDepWorkFile extends SvrProcess cal.setTime(ts); assetwk.setDateAcct(ts); assetwk.setA_Period_Forecast(new BigDecimal(assetwk.getA_Period_Posted())); - assetwk.save(); + assetwk.saveEx(); //Calculate life to date depreciation @@ -229,7 +229,7 @@ public class BuildDepWorkFile extends SvrProcess assetwk.setDateAcct(ts); v_current_adj = v_current_adj.add((v_HalfYearConv_Adj)); assetwk.setA_Period_Forecast(v_current_adj); - assetwk.save(); + assetwk.saveEx(); v_Dep_Exp_Inception = v_Dep_Exp_Inception .add(v_Dep_Exp_Inception2.multiply(v_HalfYearConv_Adj)); v_current = v_current + 1; } @@ -266,7 +266,7 @@ public class BuildDepWorkFile extends SvrProcess depexp1.setA_Period(rs.getInt("C_Period_ID")); depexp1.setIsDepreciated(true); depexp1.setDateAcct(rs.getTimestamp("DateAcct")); - depexp1.save(); + depexp1.saveEx(); X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp2.setA_Asset_ID(rs.getInt("A_ASSET_ID")); @@ -278,7 +278,7 @@ public class BuildDepWorkFile extends SvrProcess depexp2.setIsDepreciated(false); depexp2.setDateAcct(rs.getTimestamp("DateAcct")); depexp2.setA_Entry_Type("DEP"); - depexp2.save(); + depexp2.saveEx(); v_total_adjustment = v_total_adjustment.setScale(5, BigDecimal.ROUND_HALF_UP).subtract(v_Dep_Exp_Adjustment.setScale(5, BigDecimal.ROUND_HALF_UP)); } @@ -323,7 +323,7 @@ public class BuildDepWorkFile extends SvrProcess //depexp1.setA_Period((int)v_current); //depexp1.setIsDepreciated(true); //depexp1.setDateAcct(ts); - //depexp1.save(); + //depexp1.saveEx(); v_total_adjustment = v_total_adjustment.setScale(5, BigDecimal.ROUND_HALF_UP).subtract(v_Dep_Exp_Adjustment.setScale(5, BigDecimal.ROUND_HALF_UP)); @@ -339,7 +339,7 @@ public class BuildDepWorkFile extends SvrProcess depexp2.setIsDepreciated(true); depexp2.setDateAcct(rs.getTimestamp("DateAcct")); depexp2.setA_Entry_Type("DEP"); - depexp2.save(); + depexp2.saveEx(); X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp3.setA_Asset_ID(rs.getInt("A_ASSET_ID")); @@ -351,7 +351,7 @@ public class BuildDepWorkFile extends SvrProcess depexp3.setIsDepreciated(false); depexp3.setDateAcct(rs.getTimestamp("DateAcct")); depexp3.setA_Entry_Type("DEP"); - depexp3.save(); + depexp3.saveEx(); v_Dep_Exp_Inception = v_Dep_Exp_Inception.add((v_Dep_Exp_Monthly.setScale(2, BigDecimal.ROUND_HALF_UP))).setScale(2, BigDecimal.ROUND_HALF_UP); } @@ -367,7 +367,7 @@ public class BuildDepWorkFile extends SvrProcess depexp2.setIsDepreciated(true); depexp2.setDateAcct(rs.getTimestamp("DateAcct")); depexp2.setA_Entry_Type("DEP"); - depexp2.save(); + depexp2.saveEx(); X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null); depexp3.setA_Asset_ID(rs.getInt("A_ASSET_ID")); @@ -379,7 +379,7 @@ public class BuildDepWorkFile extends SvrProcess depexp3.setIsDepreciated(false); depexp3.setDateAcct(rs.getTimestamp("DateAcct")); depexp3.setA_Entry_Type("DEP"); - depexp3.save(); + depexp3.saveEx(); v_Dep_Exp_Inception = v_Dep_Exp_Inception.add(v_Dep_Exp_Monthly).setScale(2, BigDecimal.ROUND_HALF_UP); @@ -397,7 +397,7 @@ public class BuildDepWorkFile extends SvrProcess assetwk.setA_Period_Forecast(v_current_adj); assetwk.setDateAcct(ts); assetwk.setA_Current_Period((int)v_current); - assetwk.save(); + assetwk.saveEx(); asset_id_current = rs2.getInt("A_ASSET_ID"); log.info(""+asset_id_current); diff --git a/org.adempiere.base/src/org/compiere/FA/CreateGLAsset.java b/org.adempiere.base/src/org/compiere/FA/CreateGLAsset.java index 0e5196ded3..30891abfcf 100644 --- a/org.adempiere.base/src/org/compiere/FA/CreateGLAsset.java +++ b/org.adempiere.base/src/org/compiere/FA/CreateGLAsset.java @@ -124,9 +124,9 @@ public class CreateGLAsset extends SvrProcess asset.setA_Asset_Group_ID(assetgrpacct.getA_Asset_Group_ID()); asset.setA_QTY_Current(JVLine.getQty()); asset.setA_QTY_Original(JVLine.getQty()); - asset.save(); + asset.saveEx(); asset.setA_Parent_Asset_ID(asset.getA_Asset_ID()); - asset.save(); + asset.saveEx(); boolean isdepreciate = assetgrpacct.isProcessing(); @@ -146,7 +146,7 @@ public class CreateGLAsset extends SvrProcess asset.setUseLifeMonths(assetgrpacct.getUseLifeMonths()); asset.setIsDepreciated(true); asset.setIsOwned(true); - asset.save(); + asset.saveEx(); // uselifemonths = assetgrpacct.getUseLifeMonths(); // uselifeyears = assetgrpacct.getUseLifeYears(); @@ -156,7 +156,7 @@ public class CreateGLAsset extends SvrProcess asset.setUseLifeMonths(asset.getUseLifeYears()*12); asset.setIsDepreciated(true); asset.setIsOwned(true); - asset.save(); + asset.saveEx(); // uselifemonths = asset.getUseLifeYears()*12; // uselifeyears = asset.getUseLifeYears(); } @@ -185,7 +185,7 @@ public class CreateGLAsset extends SvrProcess assetacct.setA_Depreciation_Table_Header_ID(assetgrpacct.getA_Depreciation_Table_Header_ID()); assetacct.setA_Depreciation_Variable_Perc(assetgrpacct.getA_Depreciation_Variable_Perc()); assetacct.setProcessing(false); - assetacct.save(); + assetacct.saveEx(); MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName()); change.setPostingType(assetacct.getPostingType()); @@ -238,7 +238,7 @@ public class CreateGLAsset extends SvrProcess change.setA_Asset_CreateDate(asset.getA_Asset_CreateDate()); change.setAD_User_ID(asset.getAD_User_ID()); change.setC_Location_ID(asset.getC_Location_ID()); - change.save(); + change.saveEx(); } @@ -256,7 +256,7 @@ public class CreateGLAsset extends SvrProcess assetwk.setA_QTY_Current(JVLine.getQty()); assetwk.setIsDepreciated(assetgrpacct.isProcessing()); assetwk.setPostingType(assetgrpacct.getPostingType()); - assetwk.save(); + assetwk.saveEx(); X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, get_TrxName()); assetadd.setA_Asset_ID(asset.getA_Asset_ID()); @@ -269,7 +269,7 @@ public class CreateGLAsset extends SvrProcess assetadd.setLine(JVLine.getLine()); assetadd.setDescription(JVLine.getDescription()); assetadd.setPostingType(assetwk.getPostingType()); - assetadd.save(); + assetadd.saveEx(); } else @@ -291,7 +291,7 @@ public class CreateGLAsset extends SvrProcess assetwk.setA_Asset_Cost(assetwk.getA_Asset_Cost().add(JVLine.getAmtAcctDr().subtract(JVLine.getAmtAcctCr()))); assetwk.setA_QTY_Current(assetwk.getA_QTY_Current().add(JVLine.getQty())); assetwk.setIsDepreciated(assetgrpacct.isProcessing()); - assetwk.save(); + assetwk.saveEx(); X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, get_TrxName()); assetadd.setA_Asset_ID(asset.getA_Asset_ID()); @@ -304,12 +304,12 @@ public class CreateGLAsset extends SvrProcess assetadd.setLine(JVLine.getLine()); assetadd.setDescription(JVLine.getDescription()); assetadd.setPostingType(assetwk.getPostingType()); - assetadd.save(); + assetadd.saveEx(); asset.setA_QTY_Original(assetadd.getA_QTY_Current().add(asset.getA_QTY_Original())); asset.setA_QTY_Current(assetadd.getA_QTY_Current().add(asset.getA_QTY_Current())); - asset.save(); + asset.saveEx(); MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName()); change.setA_Asset_ID(asset.getA_Asset_ID()); @@ -318,7 +318,7 @@ public class CreateGLAsset extends SvrProcess change.setPostingType(assetwk.getPostingType()); change.setAssetValueAmt(assetadd.getAssetValueAmt()); change.setA_QTY_Current(assetadd.getA_QTY_Current()); - change.save(); + change.saveEx(); } } @@ -349,7 +349,7 @@ public class CreateGLAsset extends SvrProcess assetadd.setLine(JVLine.getLine()); assetadd.setDescription(JVLine.getDescription()); assetadd.setPostingType("A"); - assetadd.save(); + assetadd.saveEx(); MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName()); change.setA_Asset_ID(asset.getA_Asset_ID()); @@ -359,10 +359,10 @@ public class CreateGLAsset extends SvrProcess assetadd.setPostingType("A"); change.setAssetValueAmt(assetadd.getAssetValueAmt()); change.setA_QTY_Current(assetadd.getA_QTY_Current()); - change.save(); + change.saveEx(); } JVLine.set_ValueOfColumn(I_CustomColumn.A_Processed, Boolean.TRUE); - JVLine.save(); + JVLine.saveEx(); } rs.close(); pstmt.close(); diff --git a/org.adempiere.base/src/org/compiere/FA/CreateInvoicedAsset.java b/org.adempiere.base/src/org/compiere/FA/CreateInvoicedAsset.java index 31dbae6cc7..b9bca2721c 100644 --- a/org.adempiere.base/src/org/compiere/FA/CreateInvoicedAsset.java +++ b/org.adempiere.base/src/org/compiere/FA/CreateInvoicedAsset.java @@ -144,9 +144,9 @@ public class CreateInvoicedAsset extends SvrProcess asset.setA_Asset_Group_ID(assetgrpacct.getA_Asset_Group_ID()); asset.setA_QTY_Current(InvoiceLine.getQtyEntered()); asset.setA_QTY_Original(InvoiceLine.getQtyEntered()); - asset.save(); + asset.saveEx(); asset.setA_Parent_Asset_ID(asset.getA_Asset_ID()); - asset.save(); + asset.saveEx(); boolean isdepreciate = assetgrpacct.isProcessing(); @@ -166,7 +166,7 @@ public class CreateInvoicedAsset extends SvrProcess asset.setUseLifeMonths(assetgrpacct.getUseLifeMonths()); asset.setIsDepreciated(true); asset.setIsOwned(true); - asset.save(); + asset.saveEx(); uselifemonths = assetgrpacct.getUseLifeMonths(); uselifeyears = assetgrpacct.getUseLifeYears(); @@ -176,7 +176,7 @@ public class CreateInvoicedAsset extends SvrProcess asset.setUseLifeMonths(asset.getUseLifeYears()*12); asset.setIsDepreciated(true); asset.setIsOwned(true); - asset.save(); + asset.saveEx(); uselifemonths = asset.getUseLifeYears()*12; uselifeyears = asset.getUseLifeYears(); } @@ -205,7 +205,7 @@ public class CreateInvoicedAsset extends SvrProcess assetacct.setA_Depreciation_Variable_Perc(assetgrpacct.getA_Depreciation_Variable_Perc()); assetacct.setProcessing(false); assetacct.getAD_Client_ID(); - assetacct.save(); + assetacct.saveEx(); MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName()); change.setPostingType(assetacct.getPostingType()); @@ -260,7 +260,7 @@ public class CreateInvoicedAsset extends SvrProcess change.setA_Asset_CreateDate(asset.getA_Asset_CreateDate()); change.setAD_User_ID(asset.getAD_User_ID()); change.setC_Location_ID(asset.getC_Location_ID()); - change.save(); + change.saveEx(); } @@ -277,7 +277,7 @@ public class CreateInvoicedAsset extends SvrProcess assetwk.setA_Period_Posted(0); assetwk.setA_Asset_Life_Current_Year(new BigDecimal (0.0)); assetwk.setA_Curr_Dep_Exp(new BigDecimal (0.0)); - assetwk.save(); + assetwk.saveEx(); X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, get_TrxName()); assetadd.setA_Asset_ID(asset.getA_Asset_ID()); @@ -291,7 +291,7 @@ public class CreateInvoicedAsset extends SvrProcess assetadd.setDescription(InvoiceLine.getDescription()); assetadd.setA_QTY_Current(InvoiceLine.getQtyEntered()); assetadd.setPostingType(assetwk.getPostingType()); - assetadd.save(); + assetadd.saveEx(); String sql1 = "SELECT C_Period_ID " + "FROM C_Period " @@ -348,7 +348,7 @@ public class CreateInvoicedAsset extends SvrProcess mInOut.setPosted (false); mInOut.setProcessed (false); mInOut.setSendEMail (false); - mInOut.save(); + mInOut.saveEx(); X_M_InOutLine mInOutLine = new X_M_InOutLine (getCtx(), 0, get_TrxName()); mInOutLine.setC_UOM_ID (InvoiceLine.getC_UOM_ID()); // @#C_UOM_ID@ @@ -378,7 +378,7 @@ public class CreateInvoicedAsset extends SvrProcess depexp2.setIsDepreciated(false); depexp2.setA_Period(C_Period_ID); depexp2.setA_Entry_Type("NEW"); - depexp2.save(); + depexp2.saveEx(); recordInsertedCount++; X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, get_TrxName()); @@ -391,7 +391,7 @@ public class CreateInvoicedAsset extends SvrProcess depexp3.setIsDepreciated(false); depexp3.setA_Period(C_Period_ID); depexp3.setA_Entry_Type("NEW"); - depexp3.save(); + depexp3.saveEx(); recordInsertedCount++; //Determine if tax adjustment is necessary @@ -409,7 +409,7 @@ public class CreateInvoicedAsset extends SvrProcess depexp4.setIsDepreciated(false); depexp4.setA_Period(C_Period_ID); depexp4.setA_Entry_Type("NEW"); - depexp4.save(); + depexp4.saveEx(); recordInsertedCount++; } @@ -432,7 +432,7 @@ public class CreateInvoicedAsset extends SvrProcess assetwk.setA_Asset_Cost(assetwk.getA_Asset_Cost().add(InvoiceLine.getLineTotalAmt())); assetwk.setIsDepreciated(assetgrpacct.isProcessing()); assetwk.setA_QTY_Current(InvoiceLine.getQtyEntered()); - assetwk.save(); + assetwk.saveEx(); X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, get_TrxName()); assetadd.setA_Asset_ID(asset.getA_Asset_ID()); @@ -446,12 +446,12 @@ public class CreateInvoicedAsset extends SvrProcess assetadd.setDescription(InvoiceLine.getDescription()); assetadd.setA_QTY_Current(InvoiceLine.getQtyEntered()); assetadd.setPostingType(assetwk.getPostingType()); - assetadd.save(); + assetadd.saveEx(); asset.setA_QTY_Original(assetadd.getA_QTY_Current().add(asset.getA_QTY_Original())); asset.setA_QTY_Current(assetadd.getA_QTY_Current().add(asset.getA_QTY_Current())); - asset.save(); + asset.saveEx(); MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName()); change.setA_Asset_ID(asset.getA_Asset_ID()); @@ -461,7 +461,7 @@ public class CreateInvoicedAsset extends SvrProcess change.setPostingType(assetwk.getPostingType()); change.setAssetValueAmt(assetadd.getAssetValueAmt()); change.setA_QTY_Current(assetadd.getA_QTY_Current()); - change.save(); + change.saveEx(); @@ -480,7 +480,7 @@ public class CreateInvoicedAsset extends SvrProcess depexp2.setIsDepreciated(false); depexp2.setA_Period(C_Period_ID); depexp2.setA_Entry_Type("NEW"); - depexp2.save(); + depexp2.saveEx(); recordInsertedCount++; X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, get_TrxName()); @@ -493,7 +493,7 @@ public class CreateInvoicedAsset extends SvrProcess depexp3.setIsDepreciated(false); depexp3.setA_Period(C_Period_ID); depexp3.setA_Entry_Type("NEW"); - depexp3.save(); + depexp3.saveEx(); recordInsertedCount++; //Determine if tax adjustment is necessary @@ -511,7 +511,7 @@ public class CreateInvoicedAsset extends SvrProcess depexp4.setIsDepreciated(false); depexp4.setA_Period(C_Period_ID); depexp4.setA_Entry_Type("NEW"); - depexp4.save(); + depexp4.saveEx(); recordInsertedCount++; } @@ -547,7 +547,7 @@ public class CreateInvoicedAsset extends SvrProcess assetadd.setDescription(InvoiceLine.getDescription()); assetadd.setA_QTY_Current(InvoiceLine.getQtyEntered()); assetadd.setPostingType("A"); - assetadd.save(); + assetadd.saveEx(); MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName()); change.setA_Asset_ID(asset.getA_Asset_ID()); @@ -557,10 +557,10 @@ public class CreateInvoicedAsset extends SvrProcess assetadd.setPostingType("A"); change.setAssetValueAmt(assetadd.getAssetValueAmt()); change.setA_QTY_Current(assetadd.getA_QTY_Current()); - change.save(); + change.saveEx(); } InvoiceLine.set_ValueOfColumn(I_CustomColumn.A_Processed, Boolean.TRUE); - InvoiceLine.save(); + InvoiceLine.saveEx(); } } diff --git a/org.adempiere.base/src/org/compiere/FA/ImportFAJournal2.java b/org.adempiere.base/src/org/compiere/FA/ImportFAJournal2.java index 4edadc8729..2aa2d5e51e 100644 --- a/org.adempiere.base/src/org/compiere/FA/ImportFAJournal2.java +++ b/org.adempiere.base/src/org/compiere/FA/ImportFAJournal2.java @@ -219,7 +219,7 @@ public class ImportFAJournal2 extends SvrProcess FAInsert.setIsDepreciated ( rs.getString("ISDEPRECIATED")); v_ID_START = v_ID_START+10; - FAInsert.save(); + FAInsert.saveEx(); String sql4 = "UPDATE A_DEPRECIATION_EXP SET PROCESSED = 'Y' " + " WHERE A_DEPRECIATION_EXP_ID = " + rs.getInt("A_DEPRECIATION_EXP_ID"); @@ -818,12 +818,12 @@ public class ImportFAJournal2 extends SvrProcess imp.getUser1_ID(), imp.getUser2_ID(),imp.getUserElement1_ID(),imp.getUserElement2_ID()); //imp.getUser1_ID(), imp.getUser2_ID()); if (acct != null && acct.get_ID() == 0) - acct.save(); + acct.saveEx(); if (acct == null || acct.get_ID() == 0) { imp.setI_ErrorMsg("ERROR creating Account"); imp.setI_IsImported(false); - imp.save(); + imp.saveEx(); continue; } else diff --git a/org.adempiere.base/src/org/compiere/acct/Doc.java b/org.adempiere.base/src/org/compiere/acct/Doc.java index 43feb2f8b3..e463585776 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc.java @@ -570,7 +570,7 @@ public abstract class Doc .append(", Balanced=").append(isBalanced()) .append(", Schema=").append(m_as.getName()); note.setTextMsg(Text.toString()); - note.save(); + note.saveEx(); p_Error = Text.toString(); } diff --git a/org.adempiere.base/src/org/compiere/acct/FactLine.java b/org.adempiere.base/src/org/compiere/acct/FactLine.java index 0141d7827b..3db1ea45b0 100644 --- a/org.adempiere.base/src/org/compiere/acct/FactLine.java +++ b/org.adempiere.base/src/org/compiere/acct/FactLine.java @@ -968,7 +968,7 @@ public final class FactLine extends X_Fact_Acct C_Project_ID, C_Campaign_ID, C_Activity_ID, User1_ID, User2_ID, UserElement1_ID, UserElement2_ID); if (revenue != null && revenue.get_ID() == 0) - revenue.save(); + revenue.saveEx(); if (revenue == null || revenue.get_ID() == 0) { log.severe ("Revenue_Acct not found"); diff --git a/org.adempiere.base/src/org/compiere/cm/WebProjectDeploy.java b/org.adempiere.base/src/org/compiere/cm/WebProjectDeploy.java index 2870c356cd..10facdb1bc 100644 --- a/org.adempiere.base/src/org/compiere/cm/WebProjectDeploy.java +++ b/org.adempiere.base/src/org/compiere/cm/WebProjectDeploy.java @@ -136,7 +136,7 @@ public class WebProjectDeploy extends SvrProcess //if (nodeCMS.getParent_ID()!=0) nodeCMC.setParent_ID(nodeCMS.getParent_ID()); nodeCMC.setSeqNo(nodeCMS.getSeqNo()); - nodeCMC.save(); + nodeCMC.saveEx(); break; } } diff --git a/org.adempiere.base/src/org/compiere/model/AdempiereProcessor.java b/org.adempiere.base/src/org/compiere/model/AdempiereProcessor.java index 046851ba88..0716817304 100644 --- a/org.adempiere.base/src/org/compiere/model/AdempiereProcessor.java +++ b/org.adempiere.base/src/org/compiere/model/AdempiereProcessor.java @@ -19,6 +19,8 @@ package org.compiere.model; import java.sql.Timestamp; import java.util.Properties; +import org.adempiere.exceptions.AdempiereException; + /** * Processor Interface * @@ -101,6 +103,12 @@ public interface AdempiereProcessor */ public boolean save(); + /** + * Save throwing exception + * @throws AdempiereException + * @see #save() + */ + public void saveEx() throws AdempiereException; /** * Get Processor Logs diff --git a/org.adempiere.base/src/org/compiere/model/GridTab.java b/org.adempiere.base/src/org/compiere/model/GridTab.java index 583b50cf08..99f5c2e241 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTab.java +++ b/org.adempiere.base/src/org/compiere/model/GridTab.java @@ -2246,7 +2246,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (access == null) access = new MPrivateAccess (ctx, AD_User_ID, m_vo.AD_Table_ID, Record_ID); access.setIsActive(lock); - access.save(); + access.saveEx(); // loadLocks(); } // lock diff --git a/org.adempiere.base/src/org/compiere/model/MAcctSchema.java b/org.adempiere.base/src/org/compiere/model/MAcctSchema.java index 3d0ee9b452..dca3bd7ba1 100644 --- a/org.adempiere.base/src/org/compiere/model/MAcctSchema.java +++ b/org.adempiere.base/src/org/compiere/model/MAcctSchema.java @@ -479,7 +479,7 @@ public class MAcctSchema extends X_C_AcctSchema MCostType ct = new MCostType (getCtx(), 0, get_TrxName()); ct.setClientOrg(getAD_Client_ID(), 0); ct.setName(getName()); - ct.save(); + ct.saveEx(); setM_CostType_ID(ct.getM_CostType_ID()); } diff --git a/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java b/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java index e78ecf8514..a861aa9cec 100644 --- a/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java +++ b/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java @@ -752,7 +752,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction { MAllocationLine line = m_lines[i]; line.setIsActive(false); - line.save(); + line.saveEx(); bps.add(new Integer(line.processIt(true))); // reverse } updateBP(bps); diff --git a/org.adempiere.base/src/org/compiere/model/MAllocationLine.java b/org.adempiere.base/src/org/compiere/model/MAllocationLine.java index 349df3836c..c4fee6740a 100644 --- a/org.adempiere.base/src/org/compiere/model/MAllocationLine.java +++ b/org.adempiere.base/src/org/compiere/model/MAllocationLine.java @@ -268,13 +268,13 @@ public class MAllocationLine extends X_C_AllocationLine if (!payment.isCashTrx()) { payment.setIsAllocated(false); - payment.save(); + payment.saveEx(); } } else { if (payment.testAllocation()) - payment.save(); + payment.saveEx(); } } diff --git a/org.adempiere.base/src/org/compiere/model/MAsset.java b/org.adempiere.base/src/org/compiere/model/MAsset.java index 68bbcea7ba..372bae8cda 100644 --- a/org.adempiere.base/src/org/compiere/model/MAsset.java +++ b/org.adempiere.base/src/org/compiere/model/MAsset.java @@ -431,7 +431,7 @@ public class MAsset extends X_A_Asset if (getA_Parent_Asset_ID() < 1 ) { asset.setA_Parent_Asset_ID(getA_Asset_ID()); - asset.save(); + asset.saveEx(); } @@ -457,7 +457,7 @@ public class MAsset extends X_A_Asset asset.setUseLifeMonths(assetgrpacct.getUseLifeMonths()); asset.setIsDepreciated(true); asset.setIsOwned(true); - asset.save(); + asset.saveEx(); uselifemonths = assetgrpacct.getUseLifeMonths(); uselifeyears = assetgrpacct.getUseLifeYears(); @@ -467,7 +467,7 @@ public class MAsset extends X_A_Asset asset.setUseLifeMonths(getUseLifeYears()*12); asset.setIsDepreciated(true); asset.setIsOwned(true); - asset.save(); + asset.saveEx(); uselifemonths = getUseLifeYears()*12; uselifeyears = getUseLifeYears(); } @@ -497,7 +497,7 @@ public class MAsset extends X_A_Asset assetacct.setA_Depreciation_Table_Header_ID(assetgrpacct.getA_Depreciation_Table_Header_ID()); assetacct.setA_Depreciation_Variable_Perc(assetgrpacct.getA_Depreciation_Variable_Perc()); assetacct.setProcessing(false); - assetacct.save(); + assetacct.saveEx(); change.setPostingType(assetacct.getPostingType()); change.setA_Split_Percent(assetacct.getA_Split_Percent()); @@ -550,7 +550,7 @@ public class MAsset extends X_A_Asset assetwk.setA_QTY_Current(new BigDecimal(0.0)); assetwk.setA_Asset_Cost(new BigDecimal(0.0)); assetwk.setA_Period_Posted(0); - assetwk.save(); + assetwk.saveEx(); } } } @@ -578,7 +578,7 @@ public class MAsset extends X_A_Asset change.setA_Asset_CreateDate(getA_Asset_CreateDate()); change.setAD_User_ID(getAD_User_ID()); change.setC_Location_ID(getC_Location_ID()); - change.save(); + change.saveEx(); rs.close(); pstmt.close(); @@ -631,7 +631,7 @@ public class MAsset extends X_A_Asset uselifemonths = getUseLifeMonths(); uselifeyears = getUseLifeYears(); } - assetacct.save(); + assetacct.saveEx(); } rs.close(); pstmt.close(); @@ -669,7 +669,7 @@ public class MAsset extends X_A_Asset assetwk.setA_Asset_Life_Years(uselifeyears); assetwk.setIsDepreciated(isDepreciated()); //assetwk.setA_QTY_Current(getA_QTY_Current()); - assetwk.save(); + assetwk.saveEx(); if (isProcessing()== true){ MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName()); @@ -698,13 +698,13 @@ public class MAsset extends X_A_Asset change.setA_Asset_CreateDate(getA_Asset_CreateDate()); change.setAD_User_ID(getAD_User_ID()); change.setC_Location_ID(getC_Location_ID()); - change.save(); + change.saveEx(); } else { X_A_Asset asset = new X_A_Asset (getCtx(), p_A_Asset_ID, get_TrxName()); asset.setProcessing(true); - asset.save(); + asset.saveEx(); } } rs.close(); diff --git a/org.adempiere.base/src/org/compiere/model/MAssetAcct.java b/org.adempiere.base/src/org/compiere/model/MAssetAcct.java index d93b85e330..259e882827 100644 --- a/org.adempiere.base/src/org/compiere/model/MAssetAcct.java +++ b/org.adempiere.base/src/org/compiere/model/MAssetAcct.java @@ -99,7 +99,7 @@ public class MAssetAcct extends X_A_Asset_Acct { change.setA_Depreciation_Manual_Period(getA_Depreciation_Manual_Period()); change.setA_Depreciation_Table_Header_ID(getA_Depreciation_Table_Header_ID()); change.setA_Depreciation_Variable_Perc(getA_Depreciation_Variable_Perc()); - change.save(); + change.saveEx(); String sql = "SELECT * FROM A_Depreciation_Workfile WHERE A_Asset_ID=? AND IsActive='Y'"; PreparedStatement pstmt = null; @@ -114,7 +114,7 @@ public class MAssetAcct extends X_A_Asset_Acct { X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile( getCtx(), rs, null); assetwk.setA_Salvage_Value(getA_Salvage_Value()); - assetwk.save(); + assetwk.saveEx(); } rs.close(); pstmt.close(); @@ -159,7 +159,7 @@ public class MAssetAcct extends X_A_Asset_Acct { assetacct.setA_Depreciation_Table_Header_ID(getA_Depreciation_Table_Header_ID()); assetacct.setA_Depreciation_Variable_Perc(getA_Depreciation_Variable_Perc()); assetacct.setProcessing(true); - assetacct.save(); + assetacct.saveEx(); } return true; diff --git a/org.adempiere.base/src/org/compiere/model/MAssetAddition.java b/org.adempiere.base/src/org/compiere/model/MAssetAddition.java index 6bca562e73..62cc3a5af5 100644 --- a/org.adempiere.base/src/org/compiere/model/MAssetAddition.java +++ b/org.adempiere.base/src/org/compiere/model/MAssetAddition.java @@ -76,12 +76,12 @@ public class MAssetAddition extends X_A_Asset_Addition assetwk.setPostingType("A"); assetwk.setA_QTY_Current(getA_QTY_Current()); assetwk.setA_Asset_Cost(getAssetValueAmt()); - assetwk.save(); + assetwk.saveEx(); MAsset asset = new MAsset (getCtx(), p_A_Asset_ID, null); asset.setA_QTY_Original(getA_QTY_Current().add(asset.getA_QTY_Original())); asset.setA_QTY_Current(getA_QTY_Current().add(asset.getA_QTY_Current())); - asset.save(); + asset.saveEx(); MAssetChange change = new MAssetChange (getCtx(), 0,null); change.setA_Asset_ID(p_A_Asset_ID); @@ -91,7 +91,7 @@ public class MAssetAddition extends X_A_Asset_Addition change.setPostingType("A"); change.setAssetValueAmt(getAssetValueAmt()); change.setA_QTY_Current(getA_QTY_Current()); - change.save(); + change.saveEx(); } @@ -110,7 +110,7 @@ public class MAssetAddition extends X_A_Asset_Addition X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), rs, null); assetwk.setA_Asset_Cost(getAssetValueAmt().add(assetwk.getA_Asset_Cost())); assetwk.setA_QTY_Current(getA_QTY_Current().add(assetwk.getA_QTY_Current())); - assetwk.save(); + assetwk.saveEx(); MAssetChange change = new MAssetChange (getCtx(), 0, null); change.setA_Asset_ID(p_A_Asset_ID); @@ -120,13 +120,13 @@ public class MAssetAddition extends X_A_Asset_Addition change.setPostingType(rs.getString("PostingType")); change.setAssetValueAmt(getAssetValueAmt()); change.setA_QTY_Current(getA_QTY_Current()); - change.save(); + change.saveEx(); MAsset asset = new MAsset (getCtx(), p_A_Asset_ID, null); asset.setA_QTY_Original(getA_QTY_Current().add(asset.getA_QTY_Original())); asset.setA_QTY_Current(getA_QTY_Current().add(asset.getA_QTY_Current())); asset.setProcessing(false); - asset.save(); + asset.saveEx(); } rs.close(); pstmt.close(); diff --git a/org.adempiere.base/src/org/compiere/model/MAssetUse.java b/org.adempiere.base/src/org/compiere/model/MAssetUse.java index 6d80434da8..1cd4aa19bb 100644 --- a/org.adempiere.base/src/org/compiere/model/MAssetUse.java +++ b/org.adempiere.base/src/org/compiere/model/MAssetUse.java @@ -70,7 +70,7 @@ protected boolean afterSave (boolean newRecord,boolean success) MAsset asset = new MAsset (getCtx(), p_A_Asset_ID, null); asset.setUseUnits(total_unitsused); asset.setProcessing(false); - asset.save(); + asset.saveEx(); MAssetChange change = new MAssetChange (getCtx(), 0,null); @@ -79,7 +79,7 @@ protected boolean afterSave (boolean newRecord,boolean success) change.setChangeType("USE"); change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "USE")); change.setUseUnits(getUseUnits()); - change.save(); + change.saveEx(); return true; diff --git a/org.adempiere.base/src/org/compiere/model/MAttachment.java b/org.adempiere.base/src/org/compiere/model/MAttachment.java index 1cee4a4da0..9e384c076a 100644 --- a/org.adempiere.base/src/org/compiere/model/MAttachment.java +++ b/org.adempiere.base/src/org/compiere/model/MAttachment.java @@ -885,7 +885,7 @@ public class MAttachment extends X_AD_Attachment MAttachment att = new MAttachment(Env.getCtx(), 100, 0, null); att.addEntry(new File ("C:\\Adempiere\\Dev.properties")); att.addEntry(new File ("C:\\Adempiere\\index.html")); - att.save(); + att.saveEx(); System.out.println (att); att.dumpEntryNames(); int AD_Attachment_ID = att.getAD_Attachment_ID(); diff --git a/org.adempiere.base/src/org/compiere/model/MAttribute.java b/org.adempiere.base/src/org/compiere/model/MAttribute.java index 45a700acb7..ab2f9d0f2f 100644 --- a/org.adempiere.base/src/org/compiere/model/MAttribute.java +++ b/org.adempiere.base/src/org/compiere/model/MAttribute.java @@ -182,7 +182,7 @@ public class MAttribute extends X_M_Attribute instance.setValue (null); } } - instance.save(); + instance.saveEx(); } // setAttributeInstance /** @@ -198,7 +198,7 @@ public class MAttribute extends X_M_Attribute M_AttributeSetInstance_ID, value, get_TrxName()); else instance.setValue(value); - instance.save(); + instance.saveEx(); } // setAttributeInstance /** @@ -214,7 +214,7 @@ public class MAttribute extends X_M_Attribute M_AttributeSetInstance_ID, value, get_TrxName()); else instance.setValueNumber(value); - instance.save(); + instance.saveEx(); } // setAttributeInstance diff --git a/org.adempiere.base/src/org/compiere/model/MCStage.java b/org.adempiere.base/src/org/compiere/model/MCStage.java index 24ff9019b9..1d429b0b5c 100644 --- a/org.adempiere.base/src/org/compiere/model/MCStage.java +++ b/org.adempiere.base/src/org/compiere/model/MCStage.java @@ -311,7 +311,7 @@ public class MCStage extends X_CM_CStage newCStageTTable.setName(thisTemplateTable.getName()); newCStageTTable.setOtherClause(thisTemplateTable.getOtherClause()); newCStageTTable.setWhereClause(thisTemplateTable.getWhereClause()); - newCStageTTable.save(); + newCStageTTable.saveEx(); } } } diff --git a/org.adempiere.base/src/org/compiere/model/MClick.java b/org.adempiere.base/src/org/compiere/model/MClick.java index fbeba4a255..8c43271fb3 100644 --- a/org.adempiere.base/src/org/compiere/model/MClick.java +++ b/org.adempiere.base/src/org/compiere/model/MClick.java @@ -266,7 +266,7 @@ public class MClick extends X_W_Click click.setW_ClickCount_ID(); if (click.getW_ClickCount_ID() != 0) { - click.save(); + click.saveEx(); counter++; } } diff --git a/org.adempiere.base/src/org/compiere/model/MClient.java b/org.adempiere.base/src/org/compiere/model/MClient.java index 0333bb3f99..351bf86496 100644 --- a/org.adempiere.base/src/org/compiere/model/MClient.java +++ b/org.adempiere.base/src/org/compiere/model/MClient.java @@ -713,7 +713,7 @@ public class MClient extends X_AD_Client um.setMessageID(email.getSentMsg()); um.setIsDelivered(X_AD_UserMail.ISDELIVERED_No); } - um.save(); + um.saveEx(); // if (email.isSentOK()) diff --git a/org.adempiere.base/src/org/compiere/model/MCommissionAmt.java b/org.adempiere.base/src/org/compiere/model/MCommissionAmt.java index 0de0ae2589..b9d2d54240 100644 --- a/org.adempiere.base/src/org/compiere/model/MCommissionAmt.java +++ b/org.adempiere.base/src/org/compiere/model/MCommissionAmt.java @@ -163,7 +163,7 @@ public class MCommissionAmt extends X_C_CommissionAmt { MCommissionRun run = new MCommissionRun(getCtx(), getC_CommissionRun_ID(),get_TrxName()); run.updateFromAmt(); - run.save(); + run.saveEx(); } // updateRunHeader } // MCommissionAmt diff --git a/org.adempiere.base/src/org/compiere/model/MCommissionDetail.java b/org.adempiere.base/src/org/compiere/model/MCommissionDetail.java index bd70195d1d..43780c54fd 100644 --- a/org.adempiere.base/src/org/compiere/model/MCommissionDetail.java +++ b/org.adempiere.base/src/org/compiere/model/MCommissionDetail.java @@ -139,7 +139,7 @@ public class MCommissionDetail extends X_C_CommissionDetail { MCommissionAmt amt = new MCommissionAmt(getCtx(), getC_CommissionAmt_ID(), get_TrxName()); amt.calculateCommission(); - amt.save(); + amt.saveEx(); } // updateAmtHeader } // MCommissionDetail diff --git a/org.adempiere.base/src/org/compiere/model/MContactInterest.java b/org.adempiere.base/src/org/compiere/model/MContactInterest.java index dbfa541a82..677cc4101b 100644 --- a/org.adempiere.base/src/org/compiere/model/MContactInterest.java +++ b/org.adempiere.base/src/org/compiere/model/MContactInterest.java @@ -222,7 +222,7 @@ public class MContactInterest extends X_R_ContactInterest int AD_User_ID = 1000002; MContactInterest ci = MContactInterest.get(Env.getCtx(), R_InterestArea_ID, AD_User_ID, false, null); ci.subscribe(); - ci.save(); + ci.saveEx(); // ci = MContactInterest.get(Env.getCtx(), R_InterestArea_ID, AD_User_ID, false, null); } // main diff --git a/org.adempiere.base/src/org/compiere/model/MCostDetail.java b/org.adempiere.base/src/org/compiere/model/MCostDetail.java index 01f8b8fb51..d0a42731c1 100644 --- a/org.adempiere.base/src/org/compiere/model/MCostDetail.java +++ b/org.adempiere.base/src/org/compiere/model/MCostDetail.java @@ -918,7 +918,7 @@ public class MCostDetail extends X_M_CostDetail MCostQueue cq = MCostQueue.get(product, getM_AttributeSetInstance_ID(), as, Org_ID, ce.getM_CostElement_ID(), get_TrxName()); cq.setCosts(amt, qty, precision); - cq.save(); + cq.saveEx(); // Get Costs - costing level Org/ASI MCostQueue[] cQueue = MCostQueue.getQueue(product, M_ASI_ID, as, Org_ID, ce, get_TrxName()); @@ -1051,7 +1051,7 @@ public class MCostDetail extends X_M_CostDetail MCostQueue cq = MCostQueue.get(product, getM_AttributeSetInstance_ID(), as, Org_ID, ce.getM_CostElement_ID(), get_TrxName()); cq.setCosts(amt, qty, precision); - cq.save(); + cq.saveEx(); } else { diff --git a/org.adempiere.base/src/org/compiere/model/MCountry.java b/org.adempiere.base/src/org/compiere/model/MCountry.java index 65d186dd3c..f207650968 100644 --- a/org.adempiere.base/src/org/compiere/model/MCountry.java +++ b/org.adempiere.base/src/org/compiere/model/MCountry.java @@ -371,7 +371,7 @@ public final class MCountry extends X_C_Country mc.setCountryCode(cc); mc.setName(name); mc.setDescription(name); - mc.save(); + mc.saveEx(); } **/ } // main diff --git a/org.adempiere.base/src/org/compiere/model/MCurrency.java b/org.adempiere.base/src/org/compiere/model/MCurrency.java index 493af59a88..d4021884d0 100644 --- a/org.adempiere.base/src/org/compiere/model/MCurrency.java +++ b/org.adempiere.base/src/org/compiere/model/MCurrency.java @@ -201,7 +201,7 @@ public class MCurrency extends X_C_Currency int prec = Integer.parseInt(s_table[i][I_Precision]); MCurrency cur = new MCurrency(Env.getCtx(), s_table[i][I_Currency], s_table[i][I_Name], s_table[i][I_Symbol], prec, prec+2); - cur.save(); + cur.saveEx(); System.out.println(cur); ** String ISO = s_table[i][I_Currency]; diff --git a/org.adempiere.base/src/org/compiere/model/MDepreciationWorkfile.java b/org.adempiere.base/src/org/compiere/model/MDepreciationWorkfile.java index d10f233965..8fd509f314 100644 --- a/org.adempiere.base/src/org/compiere/model/MDepreciationWorkfile.java +++ b/org.adempiere.base/src/org/compiere/model/MDepreciationWorkfile.java @@ -91,7 +91,7 @@ public class MDepreciationWorkfile extends X_A_Depreciation_Workfile X_A_Asset asset = new X_A_Asset (getCtx(), p_A_Asset_ID, null); asset.setA_QTY_Current(getA_QTY_Current()); asset.setA_QTY_Original(getA_QTY_Current()); - asset.save(); + asset.saveEx(); if (getA_Accumulated_Depr().equals(null)) setA_Accumulated_Depr(new BigDecimal(0.0)); @@ -113,7 +113,7 @@ public class MDepreciationWorkfile extends X_A_Depreciation_Workfile change.setA_QTY_Current(getA_QTY_Current()); change.setA_QTY_Original(getA_QTY_Current()); change.setAssetAccumDepreciationAmt(getA_Accumulated_Depr()); - change.save(); + change.saveEx(); } return true; } // beforeSave diff --git a/org.adempiere.base/src/org/compiere/model/MDistributionLine.java b/org.adempiere.base/src/org/compiere/model/MDistributionLine.java index b957343fde..5013a8a9e6 100644 --- a/org.adempiere.base/src/org/compiere/model/MDistributionLine.java +++ b/org.adempiere.base/src/org/compiere/model/MDistributionLine.java @@ -272,7 +272,7 @@ public class MDistributionLine extends X_GL_DistributionLine { getParent(); m_parent.validate(); - m_parent.save(); + m_parent.saveEx(); return success; } // afterSave diff --git a/org.adempiere.base/src/org/compiere/model/MFactAcct.java b/org.adempiere.base/src/org/compiere/model/MFactAcct.java index 0dfed656cb..91629d3ba3 100644 --- a/org.adempiere.base/src/org/compiere/model/MFactAcct.java +++ b/org.adempiere.base/src/org/compiere/model/MFactAcct.java @@ -131,7 +131,7 @@ public class MFactAcct extends X_Fact_Acct getC_Project_ID(), getC_Campaign_ID(), getC_Activity_ID(), getUser1_ID(), getUser2_ID(), getUserElement1_ID(), getUserElement2_ID()); if (acct != null && acct.get_ID() == 0) - acct.save(); + acct.saveEx(); return acct; } // getMAccount diff --git a/org.adempiere.base/src/org/compiere/model/MForm.java b/org.adempiere.base/src/org/compiere/model/MForm.java index c4e86389b9..c685b7489b 100644 --- a/org.adempiere.base/src/org/compiere/model/MForm.java +++ b/org.adempiere.base/src/org/compiere/model/MForm.java @@ -70,7 +70,7 @@ public class MForm extends X_AD_Form { int AD_Role_ID = Env.getAD_Role_ID(getCtx()); MFormAccess pa = new MFormAccess(this, AD_Role_ID); - pa.save(); + pa.saveEx(); } return success; } // afterSave diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index 53a535316d..5c0d5c6412 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -1507,7 +1507,7 @@ public class MInOut extends X_M_InOut implements DocAction if (sLine.getM_AttributeSetInstance_ID() != iLine.getM_AttributeSetInstance_ID()) { iLine.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); - iLine.save(); // update matched invoice with ASI + iLine.saveEx(); // update matched invoice with ASI inv.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); } boolean isNewMatchInv = false; @@ -1677,7 +1677,7 @@ public class MInOut extends X_M_InOut implements DocAction MOrderLine ol = new MOrderLine(getCtx(), dropLine.getC_OrderLine_ID(), null); if ( ol.getC_OrderLine_ID() != 0 ) { dropLine.setC_OrderLine_ID(ol.getLink_OrderLine_ID()); - dropLine.save(); + dropLine.saveEx(); } } @@ -1685,7 +1685,7 @@ public class MInOut extends X_M_InOut implements DocAction dropShipment.setDocAction(DocAction.ACTION_Complete); dropShipment.processIt(DocAction.ACTION_Complete); - dropShipment.save(); + dropShipment.saveEx(); return dropShipment; } @@ -2077,7 +2077,7 @@ public class MInOut extends X_M_InOut implements DocAction { asset.setIsActive(false); asset.addDescription("(" + reversal.getDocumentNo() + " #" + rLine.getLine() + "<-)"); - asset.save(); + asset.saveEx(); } } reversal.setC_Order_ID(getC_Order_ID()); diff --git a/org.adempiere.base/src/org/compiere/model/MIndex.java b/org.adempiere.base/src/org/compiere/model/MIndex.java index ba561d6e84..a6778f068e 100644 --- a/org.adempiere.base/src/org/compiere/model/MIndex.java +++ b/org.adempiere.base/src/org/compiere/model/MIndex.java @@ -191,7 +191,7 @@ public class MIndex extends X_K_Index thisIndex.setKeyword(name); thisIndex.setRecord_ID(recordID); thisIndex.setSourceUpdated(sourceUpdated); - thisIndex.save(); + thisIndex.saveEx(); } return true; } else { diff --git a/org.adempiere.base/src/org/compiere/model/MInvoice.java b/org.adempiere.base/src/org/compiere/model/MInvoice.java index 110a8435bd..51be09aaa1 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoice.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoice.java @@ -2229,15 +2229,15 @@ public class MInvoice extends X_C_Invoice implements DocAction MAllocationLine aLine = new MAllocationLine (alloc, gt, Env.ZERO, Env.ZERO, Env.ZERO); aLine.setC_Invoice_ID(getC_Invoice_ID()); - aLine.save(); + aLine.saveEx(); // Reversal Line MAllocationLine rLine = new MAllocationLine (alloc, gt.negate(), Env.ZERO, Env.ZERO, Env.ZERO); rLine.setC_Invoice_ID(reversal.getC_Invoice_ID()); - rLine.save(); + rLine.saveEx(); // Process It if (alloc.processIt(DocAction.ACTION_Complete)) - alloc.save(); + alloc.saveEx(); } // After reverseCorrect diff --git a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java index d6ce972b4e..fc9e730b8d 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java @@ -1190,7 +1190,7 @@ public class MInvoiceLine extends X_C_InvoiceLine if (difference.signum() != 0) { largestAmtAllocation.setAmt(largestAmtAllocation.getAmt().add(difference)); - largestAmtAllocation.save(); + largestAmtAllocation.saveEx(); log.config("Difference=" + difference + ", C_LandedCostAllocation_ID=" + largestAmtAllocation.getC_LandedCostAllocation_ID() + ", Amt" + largestAmtAllocation.getAmt()); diff --git a/org.adempiere.base/src/org/compiere/model/MInvoicePaySchedule.java b/org.adempiere.base/src/org/compiere/model/MInvoicePaySchedule.java index 506c3bd0b4..9d21b55640 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoicePaySchedule.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoicePaySchedule.java @@ -242,7 +242,7 @@ public class MInvoicePaySchedule extends X_C_InvoicePaySchedule log.fine("afterSave"); getParent(); m_parent.validatePaySchedule(); - m_parent.save(); + m_parent.saveEx(); } return success; } // afterSave diff --git a/org.adempiere.base/src/org/compiere/model/MIssue.java b/org.adempiere.base/src/org/compiere/model/MIssue.java index 0841765e86..fa51d35183 100644 --- a/org.adempiere.base/src/org/compiere/model/MIssue.java +++ b/org.adempiere.base/src/org/compiere/model/MIssue.java @@ -73,7 +73,7 @@ public class MIssue extends X_AD_Issue // MIssue issue = new MIssue(record); String error = issue.report(); - issue.save(); + issue.saveEx(); if (error != null) return null; return issue; diff --git a/org.adempiere.base/src/org/compiere/model/MJournalBatch.java b/org.adempiere.base/src/org/compiere/model/MJournalBatch.java index 05b42770a9..5eee91b09f 100644 --- a/org.adempiere.base/src/org/compiere/model/MJournalBatch.java +++ b/org.adempiere.base/src/org/compiere/model/MJournalBatch.java @@ -351,12 +351,12 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction if (!DocAction.STATUS_InProgress.equals(status)) { journal.setDocStatus(status); - journal.save(); + journal.saveEx(); m_processMsg = journal.getProcessMsg(); return status; } journal.setDocStatus(DOCSTATUS_InProgress); - journal.save(); + journal.saveEx(); } // TotalDr = TotalDr.add(journal.getTotalDr()); @@ -384,7 +384,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction { MJournalLine line = lines[j]; line.setCurrencyRate(journal.getCurrencyRate()); - line.save(); + line.saveEx(); } } if (journal.getC_ConversionType_ID() > 0) @@ -393,7 +393,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction { MJournalLine line = lines[j]; line.setC_ConversionType_ID(journal.getC_ConversionType_ID()); - line.save(); + line.saveEx(); } } } @@ -463,7 +463,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction journal.setProcessed(true); journal.setDocStatus(DOCSTATUS_Voided); journal.setDocAction(DOCACTION_None); - journal.save(); + journal.saveEx(); continue; } // Complete if not closed @@ -560,7 +560,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction journal.setProcessed(true); journal.setDocStatus(DOCSTATUS_Voided); journal.setDocAction(DOCACTION_None); - journal.save(); + journal.saveEx(); continue; } if (DOCSTATUS_Drafted.equals(journal.getDocStatus()) @@ -583,7 +583,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction m_processMsg = "Cannot close: " + journal.getSummary(); return false; } - journal.save(); + journal.saveEx(); } } // After Close @@ -652,7 +652,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction m_processMsg = "Could not reverse " + journal; return false; } - journal.save(); + journal.saveEx(); } //[ 1948157 ] @@ -707,7 +707,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction else description += " ** " + getDocumentNo() + " **"; reverse.setDescription(description); - reverse.save(); + reverse.saveEx(); // Reverse Journals for (int i = 0; i < journals.length; i++) @@ -720,7 +720,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction m_processMsg = "Could not reverse " + journal; return false; } - journal.save(); + journal.saveEx(); } // After reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL); diff --git a/org.adempiere.base/src/org/compiere/model/MLocator.java b/org.adempiere.base/src/org/compiere/model/MLocator.java index a5f595c48b..c9c7d6ee7d 100644 --- a/org.adempiere.base/src/org/compiere/model/MLocator.java +++ b/org.adempiere.base/src/org/compiere/model/MLocator.java @@ -160,7 +160,7 @@ public class MLocator extends X_M_Locator MWarehouse wh = MWarehouse.get (ctx, M_Warehouse_ID); retValue = new MLocator (wh, Value); retValue.setXYZ(X, Y, Z); - retValue.save(); + retValue.saveEx(); } return retValue; } // get diff --git a/org.adempiere.base/src/org/compiere/model/MLotCtl.java b/org.adempiere.base/src/org/compiere/model/MLotCtl.java index 20cbfef2b0..c75435723d 100644 --- a/org.adempiere.base/src/org/compiere/model/MLotCtl.java +++ b/org.adempiere.base/src/org/compiere/model/MLotCtl.java @@ -83,7 +83,7 @@ public class MLotCtl extends X_M_LotCtl save(); // MLot retValue = new MLot (this, M_Product_ID, name.toString()); - retValue.save(); + retValue.saveEx(); return retValue; } // createLot diff --git a/org.adempiere.base/src/org/compiere/model/MMatchInv.java b/org.adempiere.base/src/org/compiere/model/MMatchInv.java index fec69d6f2b..b4c31a805a 100644 --- a/org.adempiere.base/src/org/compiere/model/MMatchInv.java +++ b/org.adempiere.base/src/org/compiere/model/MMatchInv.java @@ -322,7 +322,7 @@ public class MMatchInv extends X_M_MatchInv else { mPO[i].setC_InvoiceLine_ID(null); - mPO[i].save(); + mPO[i].saveEx(); } } } diff --git a/org.adempiere.base/src/org/compiere/model/MMatchPO.java b/org.adempiere.base/src/org/compiere/model/MMatchPO.java index dd60b6165e..0faedbd0fe 100644 --- a/org.adempiere.base/src/org/compiere/model/MMatchPO.java +++ b/org.adempiere.base/src/org/compiere/model/MMatchPO.java @@ -577,7 +577,7 @@ public class MMatchPO extends X_M_MatchPO if (il != null) { il.setC_OrderLine_ID(iol.getC_OrderLine_ID()); - il.save(); + il.saveEx(); } } } // get from shipment diff --git a/org.adempiere.base/src/org/compiere/model/MMovement.java b/org.adempiere.base/src/org/compiere/model/MMovement.java index 67dacdc5ad..a866507bd3 100644 --- a/org.adempiere.base/src/org/compiere/model/MMovement.java +++ b/org.adempiere.base/src/org/compiere/model/MMovement.java @@ -759,7 +759,7 @@ public class MMovement extends X_M_Movement implements DocAction reversal.closeIt(); reversal.setDocStatus(DOCSTATUS_Reversed); reversal.setDocAction(DOCACTION_None); - reversal.save(); + reversal.saveEx(); m_processMsg = reversal.getDocumentNo(); // After reverseCorrect diff --git a/org.adempiere.base/src/org/compiere/model/MOrderLine.java b/org.adempiere.base/src/org/compiere/model/MOrderLine.java index 38179ee506..36dcf9770b 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrderLine.java +++ b/org.adempiere.base/src/org/compiere/model/MOrderLine.java @@ -37,7 +37,7 @@ import org.compiere.util.Msg; ol.setPrice(); ol.setPriceActual(wbl.getPrice()); ol.setTax(); - ol.save(); + ol.saveEx(); * * @author Jorg Janke @@ -172,7 +172,7 @@ public class MOrderLine extends X_C_OrderLine ol.setPrice(); ol.setPriceActual(wbl.getPrice()); ol.setTax(); - ol.save(); + ol.saveEx(); * @param order parent order */ public MOrderLine (MOrder order) diff --git a/org.adempiere.base/src/org/compiere/model/MOrderPaySchedule.java b/org.adempiere.base/src/org/compiere/model/MOrderPaySchedule.java index 9d48ba4138..993f869ed9 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrderPaySchedule.java +++ b/org.adempiere.base/src/org/compiere/model/MOrderPaySchedule.java @@ -242,7 +242,7 @@ public class MOrderPaySchedule extends X_C_OrderPaySchedule log.fine("afterSave"); getParent(); m_parent.validatePaySchedule(); - m_parent.save(); + m_parent.saveEx(); } return success; } // afterSave diff --git a/org.adempiere.base/src/org/compiere/model/MPInstance.java b/org.adempiere.base/src/org/compiere/model/MPInstance.java index 8b6160a3d5..6e71a0514e 100644 --- a/org.adempiere.base/src/org/compiere/model/MPInstance.java +++ b/org.adempiere.base/src/org/compiere/model/MPInstance.java @@ -95,7 +95,7 @@ public class MPInstance extends X_AD_PInstance MPInstancePara pip = new MPInstancePara (this, para[i].getSeqNo()); pip.setParameterName(para[i].getColumnName()); pip.setInfo(para[i].getName()); - pip.save(); + pip.saveEx(); } } // MPInstance @@ -198,7 +198,7 @@ public class MPInstance extends X_AD_PInstance P_Date, P_ID, P_Number, P_Msg); m_log.add(logEntry); // save it to DB ? - // log.save(); + // log.saveEx(); } // addLog diff --git a/org.adempiere.base/src/org/compiere/model/MPOSTerminal.java b/org.adempiere.base/src/org/compiere/model/MPOSTerminal.java index 2bdece18e2..33f2e07c38 100644 --- a/org.adempiere.base/src/org/compiere/model/MPOSTerminal.java +++ b/org.adempiere.base/src/org/compiere/model/MPOSTerminal.java @@ -107,7 +107,7 @@ public class MPOSTerminal extends X_U_POSTerminal terminal.setLocked(false); } } - terminal.save(); + terminal.saveEx(); } } diff --git a/org.adempiere.base/src/org/compiere/model/MPackage.java b/org.adempiere.base/src/org/compiere/model/MPackage.java index de3d3ccffd..8928a033c6 100644 --- a/org.adempiere.base/src/org/compiere/model/MPackage.java +++ b/org.adempiere.base/src/org/compiere/model/MPackage.java @@ -46,7 +46,7 @@ public class MPackage extends X_M_Package MPackage retValue = new MPackage (shipment, shipper); if (shipDate != null) retValue.setShipDate(shipDate); - retValue.save(); + retValue.saveEx(); // Lines MInOutLine[] lines = shipment.getLines(false); for (int i = 0; i < lines.length; i++) @@ -54,7 +54,7 @@ public class MPackage extends X_M_Package MInOutLine sLine = lines[i]; MPackageLine pLine = new MPackageLine (retValue); pLine.setInOutLine(sLine); - pLine.save(); + pLine.saveEx(); } // lines return retValue; } // create diff --git a/org.adempiere.base/src/org/compiere/model/MPackageExp.java b/org.adempiere.base/src/org/compiere/model/MPackageExp.java index ce72410028..31e4d4d491 100644 --- a/org.adempiere.base/src/org/compiere/model/MPackageExp.java +++ b/org.adempiere.base/src/org/compiere/model/MPackageExp.java @@ -113,7 +113,7 @@ public class MPackageExp extends X_AD_Package_Exp PackDetail.setAD_Form_ID(rs.getInt("AD_FORM_ID")); PackDetail.setAD_ReportView_ID(rs.getInt("AD_REPORTVIEW_ID")); PackDetail.setLine(i*10); - PackDetail.save(); + PackDetail.saveEx(); i++; } } diff --git a/org.adempiere.base/src/org/compiere/model/MPaySchedule.java b/org.adempiere.base/src/org/compiere/model/MPaySchedule.java index 6143e90cc8..6cbf767a97 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaySchedule.java +++ b/org.adempiere.base/src/org/compiere/model/MPaySchedule.java @@ -115,7 +115,7 @@ public class MPaySchedule extends X_C_PaySchedule log.fine("afterSave"); getParent(); m_parent.validate(); - m_parent.save(); + m_parent.saveEx(); } return success; } // afterSave @@ -126,7 +126,7 @@ public class MPaySchedule extends X_C_PaySchedule return false; getParent(); m_parent.validate(); - m_parent.save(); + m_parent.saveEx(); return true; } diff --git a/org.adempiere.base/src/org/compiere/model/MPaySelectionCheck.java b/org.adempiere.base/src/org/compiere/model/MPaySelectionCheck.java index f807c9c00a..03d4e1a606 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaySelectionCheck.java +++ b/org.adempiere.base/src/org/compiere/model/MPaySelectionCheck.java @@ -125,7 +125,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck ps.setPayDate (payment.getDateTrx()); ps.setTotalAmt (payment.getPayAmt()); ps.setIsApproved (true); - ps.save(); + ps.saveEx(); // Create new PaySelection Check MPaySelectionCheck psc = new MPaySelectionCheck(ps, PaymentRule); @@ -140,7 +140,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck // afalcone - [ 1871567 ] Wrong value in Payment document psc.setIsGeneratedDraft( ! payment.isProcessed() ); // - psc.save(); + psc.saveEx(); // Create new PaySelection Line MPaySelectionLine psl = null; @@ -155,7 +155,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck psl.setDifferenceAmt (Env.ZERO); psl.setC_PaySelectionCheck_ID(psc.getC_PaySelectionCheck_ID()); psl.setProcessed(true); - psl.save(); + psl.saveEx(); } else { // globalqss - CarlosRuiz - fix bug [ 1803054 ] Empty Remittance lines on payments // look for existance of C_PaymentAllocate records @@ -177,20 +177,20 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck psla.setDifferenceAmt (Env.ZERO); psla.setC_PaySelectionCheck_ID(psc.getC_PaySelectionCheck_ID()); psla.setProcessed(true); - psla.save(); + psla.saveEx(); numInv++; } } if (numInv > 0) { psc.setQty (numInv); - psc.save(); + psc.saveEx(); } } } // Indicate Done ps.setProcessed(true); - ps.save(); + ps.saveEx(); return psc; } // createForPayment @@ -225,7 +225,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck MPaySelectionCheck check = new MPaySelectionCheck (Env.getCtx(), rs, trxName); // Set new Check Document No check.setDocumentNo(String.valueOf(docNo++)); - check.save(); + check.saveEx(); list.add(check); } rs.close(); @@ -295,7 +295,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck if (batch != null) { if (batch.getC_PaymentBatch_ID() == 0) - batch.save(); // new + batch.saveEx(); // new payment.setC_PaymentBatch_ID(batch.getC_PaymentBatch_ID()); } // Link to Invoice @@ -325,7 +325,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck else { check.setC_Payment_ID (C_Payment_ID); - check.save(); // Payment process needs it + check.saveEx(); // Payment process needs it // Should start WF payment.processIt(DocAction.ACTION_Complete); if (!payment.save()) diff --git a/org.adempiere.base/src/org/compiere/model/MPaymentTerm.java b/org.adempiere.base/src/org/compiere/model/MPaymentTerm.java index 29fe72ff7c..fd6b296668 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaymentTerm.java +++ b/org.adempiere.base/src/org/compiere/model/MPaymentTerm.java @@ -151,7 +151,7 @@ public class MPaymentTerm extends X_C_PaymentTerm // if (m_schedule[0].isValid()) // { // m_schedule[0].setIsValid(false); - // m_schedule[0].save(); + // m_schedule[0].saveEx(); // } // return "@Invalid@ @Count@ # = 1 (@C_PaySchedule_ID@)"; // } @@ -172,7 +172,7 @@ public class MPaymentTerm extends X_C_PaymentTerm if (m_schedule[i].isValid() != valid) { m_schedule[i].setIsValid(valid); - m_schedule[i].save(); + m_schedule[i].saveEx(); } } String msg = "@OK@"; diff --git a/org.adempiere.base/src/org/compiere/model/MPeriod.java b/org.adempiere.base/src/org/compiere/model/MPeriod.java index 28bf9fc054..782de2bf33 100644 --- a/org.adempiere.base/src/org/compiere/model/MPeriod.java +++ b/org.adempiere.base/src/org/compiere/model/MPeriod.java @@ -520,7 +520,7 @@ public class MPeriod extends X_C_Period if (isInPeriod(today)) { as.setC_Period_ID(getC_Period_ID()); - as.save(); + as.saveEx(); } return true; } diff --git a/org.adempiere.base/src/org/compiere/model/MProduct.java b/org.adempiere.base/src/org/compiere/model/MProduct.java index 72134f20d1..9c2a65ea30 100644 --- a/org.adempiere.base/src/org/compiere/model/MProduct.java +++ b/org.adempiere.base/src/org/compiere/model/MProduct.java @@ -695,7 +695,7 @@ public class MProduct extends X_M_Product { // Old MProductCosting pcOld = new MProductCosting(this, mass[i].getC_AcctSchema_ID()); - pcOld.save(); + pcOld.saveEx(); } } diff --git a/org.adempiere.base/src/org/compiere/model/MRegion.java b/org.adempiere.base/src/org/compiere/model/MRegion.java index 8e4127de6f..d8769182ef 100644 --- a/org.adempiere.base/src/org/compiere/model/MRegion.java +++ b/org.adempiere.base/src/org/compiere/model/MRegion.java @@ -241,183 +241,183 @@ public final class MRegion extends X_C_Region // Hokkaido MRegion temp = new MRegion (country, "\u5317\u6d77\u9053"); temp.setDescription( "\u5317\u6d77\u9053(Hokkaido)" ); - temp.save(); + temp.saveEx(); // Aomori temp = new MRegion (country, "\u9752\u68ee\u770c"); temp.setDescription( "\u9752\u68ee\u770c(Aomori)" ); - temp.save(); + temp.saveEx(); // Iwate temp = new MRegion (country, "\u5ca9\u624b\u770c"); temp.setDescription( "\u5ca9\u624b\u770c(Iwate)" ); - temp.save(); + temp.saveEx(); // Miyagi temp = new MRegion (country, "\u5bae\u57ce\u770c"); temp.setDescription( "\u5bae\u57ce\u770c(Miyagi)" ); - temp.save(); + temp.saveEx(); // Akita temp = new MRegion (country, "\u79cb\u7530\u770c"); temp.setDescription( "\u79cb\u7530\u770c(Akita)" ); - temp.save(); + temp.saveEx(); // Yamagata temp = new MRegion (country, "\u5c71\u5f62\u770c"); temp.setDescription( "\u5c71\u5f62\u770c(Yamagata)" ); - temp.save(); + temp.saveEx(); // Fukushima temp = new MRegion (country, "\u798f\u5cf6\u770c"); temp.setDescription( "\u798f\u5cf6\u770c(Fukushima)" ); - temp.save(); + temp.saveEx(); // Ibaraki temp = new MRegion (country, "\u8328\u57ce\u770c"); temp.setDescription( "\u8328\u57ce\u770c(Ibaraki)" ); - temp.save(); + temp.saveEx(); // Gunma temp = new MRegion (country, "\u7fa4\u99ac\u770c"); temp.setDescription( "\u7fa4\u99ac\u770c(Gunma)" ); - temp.save(); + temp.saveEx(); // Saitama temp = new MRegion (country, "\u57fc\u7389\u770c"); temp.setDescription( "\u57fc\u7389\u770c(Saitama)" ); - temp.save(); + temp.saveEx(); // Chiba temp = new MRegion (country, "\u5343\u8449\u770c"); temp.setDescription( "\u5343\u8449\u770c(Chiba)" ); - temp.save(); + temp.saveEx(); // Tokyo temp = new MRegion (country, "\u6771\u4eac\u90fd"); temp.setDescription( "\u6771\u4eac\u90fd(Tokyo)" ); - temp.save(); + temp.saveEx(); // Kanagawa temp = new MRegion (country, "\u795e\u5948\u5ddd\u770c"); temp.setDescription( "\u795e\u5948\u5ddd\u770c(Kanagawa)" ); - temp.save(); + temp.saveEx(); // Niigata temp = new MRegion (country, "\u65b0\u6f5f\u770c"); temp.setDescription( "\u65b0\u6f5f\u770c(Niigata)" ); - temp.save(); + temp.saveEx(); // Toyama temp = new MRegion (country, "\u5bcc\u5c71\u770c"); temp.setDescription( "\u5bcc\u5c71\u770c(Toyama)" ); - temp.save(); + temp.saveEx(); // Ishikawa temp = new MRegion (country, "\u77f3\u5ddd\u770c"); temp.setDescription( "\u77f3\u5ddd\u770c(Ishikawa)" ); - temp.save(); + temp.saveEx(); // Fukui temp = new MRegion (country, "\u798f\u4e95\u770c"); temp.setDescription( "\u798f\u4e95\u770c(Fukui)" ); - temp.save(); + temp.saveEx(); // Yamanashi temp = new MRegion (country, "\u5c71\u68a8\u770c"); temp.setDescription( "\u5c71\u68a8\u770c(Yamanashi)" ); - temp.save(); + temp.saveEx(); // Gifu temp = new MRegion (country, "\u5c90\u961c\u770c"); temp.setDescription( "\u5c90\u961c\u770c(Gifu)" ); - temp.save(); + temp.saveEx(); // Shizuoka temp = new MRegion (country, "\u9759\u5ca1\u770c"); temp.setDescription( "\u9759\u5ca1\u770c(Shizuoka)" ); - temp.save(); + temp.saveEx(); // Aichi temp = new MRegion (country, "\u611b\u77e5\u770c"); temp.setDescription( "\u611b\u77e5\u770c(Aichi)" ); - temp.save(); + temp.saveEx(); // Mie temp = new MRegion (country, "\u4e09\u91cd\u770c"); temp.setDescription( "\u4e09\u91cd\u770c(Mie)" ); - temp.save(); + temp.saveEx(); // Siga temp = new MRegion (country, "\u6ecb\u8cc0\u770c"); temp.setDescription( "\u6ecb\u8cc0\u770c(Siga)" ); - temp.save(); + temp.saveEx(); // Kyoto temp = new MRegion (country, "\u4eac\u90fd\u5e9c"); temp.setDescription( "\u4eac\u90fd\u5e9c(Kyoto)" ); - temp.save(); + temp.saveEx(); // Osaka temp = new MRegion (country, "\u5927\u962a\u5e9c"); temp.setDescription( "\u5927\u962a\u5e9c(Osaka)" ); - temp.save(); + temp.saveEx(); // Hyogo temp = new MRegion (country, "\u5175\u5eab\u770c"); temp.setDescription( "\u5175\u5eab\u770c(Hyogo)" ); - temp.save(); + temp.saveEx(); // Nara temp = new MRegion (country, "\u5948\u826f\u770c"); temp.setDescription( "\u5948\u826f\u770c(Nara)" ); - temp.save(); + temp.saveEx(); // Wakayama temp = new MRegion (country, "\u548c\u6b4c\u5c71\u770c"); temp.setDescription( "\u548c\u6b4c\u5c71\u770c(Wakayama)" ); - temp.save(); + temp.saveEx(); // Tottori temp = new MRegion (country, "\u9ce5\u53d6\u770c"); temp.setDescription( "\u9ce5\u53d6\u770c(Tottori)" ); - temp.save(); + temp.saveEx(); // Shimane temp = new MRegion (country, "\u5cf6\u6839\u770c"); temp.setDescription( "\u5cf6\u6839\u770c(Shimane)" ); - temp.save(); + temp.saveEx(); // Okayama temp = new MRegion (country, "\u5ca1\u5c71\u770c"); temp.setDescription( "\u5ca1\u5c71\u770c(Okayama)" ); - temp.save(); + temp.saveEx(); // Hiroshima temp = new MRegion (country, "\u5e83\u5cf6\u770c"); temp.setDescription( "\u5e83\u5cf6\u770c(Hiroshima)" ); - temp.save(); + temp.saveEx(); // Yamaguchi temp = new MRegion (country, "\u5c71\u53e3\u770c"); temp.setDescription( "\u5c71\u53e3\u770c(Yamaguchi)" ); - temp.save(); + temp.saveEx(); // Tokushima temp = new MRegion (country, "\u5fb3\u5cf6\u770c"); temp.setDescription( "\u5fb3\u5cf6\u770c(Tokushima)" ); - temp.save(); + temp.saveEx(); // Kagawa temp = new MRegion (country, "\u9999\u5ddd\u770c"); temp.setDescription( "\u9999\u5ddd\u770c(Kagawa)" ); - temp.save(); + temp.saveEx(); // Ehime temp = new MRegion (country, "\u611b\u5a9b\u770c"); temp.setDescription( "\u611b\u5a9b\u770c(Ehime)" ); - temp.save(); + temp.saveEx(); // Kouchi temp = new MRegion (country, "\u9ad8\u77e5\u770c"); temp.setDescription( "\u9ad8\u77e5\u770c(Kouchi)" ); - temp.save(); + temp.saveEx(); // Fukuoka temp = new MRegion (country, "\u798f\u5ca1\u770c"); temp.setDescription( "\u798f\u5ca1\u770c(Fukuoka)" ); - temp.save(); + temp.saveEx(); // Saga temp = new MRegion (country, "\u4f50\u8cc0\u770c"); temp.setDescription( "\u4f50\u8cc0\u770c(Saga)" ); - temp.save(); + temp.saveEx(); // Nagasaki temp = new MRegion (country, "\u9577\u5d0e\u770c"); temp.setDescription( "\u9577\u5d0e\u770c(Nagasaki)" ); - temp.save(); + temp.saveEx(); // Kumamoto temp = new MRegion (country, "\u718a\u672c\u770c"); temp.setDescription( "\u718a\u672c\u770c(Kumamoto)" ); - temp.save(); + temp.saveEx(); // Ohita temp = new MRegion (country, "\u5927\u5206\u770c"); temp.setDescription( "\u5927\u5206\u770c(Ohita)" ); - temp.save(); + temp.saveEx(); // Miyasaki temp = new MRegion (country, "\u5bae\u5d0e\u770c"); temp.setDescription( "\u5bae\u5d0e\u770c(Miyasaki)" ); - temp.save(); + temp.saveEx(); // Kagoshima temp = new MRegion (country, "\u9e7f\u5150\u5cf6\u770c"); temp.setDescription( "\u9e7f\u5150\u5cf6\u770c(Kagoshima)" ); - temp.save(); + temp.saveEx(); // Okinawa temp = new MRegion (country, "\u6c96\u7e04\u770c"); temp.setDescription( "\u6c96\u7e04\u770c(Okinawa)" ); - temp.save(); + temp.saveEx(); } // main diff --git a/org.adempiere.base/src/org/compiere/model/MRegistration.java b/org.adempiere.base/src/org/compiere/model/MRegistration.java index 0bae915060..73fcceb25c 100644 --- a/org.adempiere.base/src/org/compiere/model/MRegistration.java +++ b/org.adempiere.base/src/org/compiere/model/MRegistration.java @@ -179,7 +179,7 @@ public class MRegistration extends X_A_Registration while (rs.next()) { MRegistrationValue v = new MRegistrationValue (this, rs.getInt(1), "?"); - v.save(); + v.saveEx(); } rs.close(); pstmt.close(); diff --git a/org.adempiere.base/src/org/compiere/model/MRequest.java b/org.adempiere.base/src/org/compiere/model/MRequest.java index 258be57869..8b2d5858de 100644 --- a/org.adempiere.base/src/org/compiere/model/MRequest.java +++ b/org.adempiere.base/src/org/compiere/model/MRequest.java @@ -868,12 +868,12 @@ public class MRequest extends X_R_Request checkChange(ra, "DateCompletePlan"); // if (m_changed) - ra.save(); + ra.saveEx(); // Current Info MRequestUpdate update = new MRequestUpdate(this); if (update.isNewInfo()) - update.save(); + update.saveEx(); else update = null; // @@ -996,7 +996,7 @@ public class MRequest extends X_R_Request if (newRecord && getResult() != null) { MRequestUpdate update = new MRequestUpdate(this); - update.save(); + update.saveEx(); } // Initial Mail if (newRecord) @@ -1024,7 +1024,7 @@ public class MRequest extends X_R_Request { ecr.setPP_Product_BOM_ID(newG.getPP_Product_BOM_ID()); ecr.setM_ChangeNotice_ID(newG.getM_ChangeNotice_ID()); - ecr.save(); + ecr.saveEx(); } } } diff --git a/org.adempiere.base/src/org/compiere/model/MRfQLine.java b/org.adempiere.base/src/org/compiere/model/MRfQLine.java index 96fae06d83..d0ef06ae8a 100644 --- a/org.adempiere.base/src/org/compiere/model/MRfQLine.java +++ b/org.adempiere.base/src/org/compiere/model/MRfQLine.java @@ -155,7 +155,7 @@ public class MRfQLine extends X_C_RfQLine if (list.size() == 0) { MRfQLineQty qty = new MRfQLineQty(this); - qty.save(); + qty.saveEx(); list.add(qty); } diff --git a/org.adempiere.base/src/org/compiere/model/MRfQResponseLine.java b/org.adempiere.base/src/org/compiere/model/MRfQResponseLine.java index 2480b204b8..278f4f3bf6 100644 --- a/org.adempiere.base/src/org/compiere/model/MRfQResponseLine.java +++ b/org.adempiere.base/src/org/compiere/model/MRfQResponseLine.java @@ -92,7 +92,7 @@ public class MRfQResponseLine extends X_C_RfQResponseLine if (get_ID() == 0) // save this line save(); MRfQResponseLineQty qty = new MRfQResponseLineQty (this, qtys[i]); - qty.save(); + qty.saveEx(); } } } // MRfQResponseLine @@ -220,7 +220,7 @@ public class MRfQResponseLine extends X_C_RfQResponseLine if (qty.isActive()) { qty.setIsActive(false); - qty.save(); + qty.saveEx(); } } } diff --git a/org.adempiere.base/src/org/compiere/model/MRole.java b/org.adempiere.base/src/org/compiere/model/MRole.java index df2a3073cf..48bc0a4392 100644 --- a/org.adempiere.base/src/org/compiere/model/MRole.java +++ b/org.adempiere.base/src/org/compiere/model/MRole.java @@ -365,12 +365,12 @@ public final class MRole extends X_AD_Role { // Add Role to SuperUser MUserRoles su = new MUserRoles(getCtx(), SUPERUSER_USER_ID, getAD_Role_ID(), get_TrxName()); - su.save(); + su.saveEx(); // Add Role to User if (getCreatedBy() != SUPERUSER_USER_ID) { MUserRoles ur = new MUserRoles(getCtx(), getCreatedBy(), getAD_Role_ID(), get_TrxName()); - ur.save(); + ur.saveEx(); } updateAccessRecords(); } diff --git a/org.adempiere.base/src/org/compiere/model/MSequence.java b/org.adempiere.base/src/org/compiere/model/MSequence.java index 91a01816e1..5f4b2bb1ea 100644 --- a/org.adempiere.base/src/org/compiere/model/MSequence.java +++ b/org.adempiere.base/src/org/compiere/model/MSequence.java @@ -589,7 +589,7 @@ public class MSequence extends X_AD_Sequence s_log.warning ("(Table) - no record found - " + TableName); MSequence seq = new MSequence (Env.getCtx(), AD_Client_ID, TableName, null); next = seq.getNextID(); - seq.save(); + seq.saveEx(); } // Commit if (trx == null) diff --git a/org.adempiere.base/src/org/compiere/model/MSession.java b/org.adempiere.base/src/org/compiere/model/MSession.java index 88cbd7fb8c..132d98fb4f 100644 --- a/org.adempiere.base/src/org/compiere/model/MSession.java +++ b/org.adempiere.base/src/org/compiere/model/MSession.java @@ -72,7 +72,7 @@ public class MSession extends X_AD_Session if (session == null && createNew) { session = new MSession (ctx, null); // local session - session.save(); + session.saveEx(); AD_Session_ID = session.getAD_Session_ID(); Env.setContext (ctx, "#AD_Session_ID", AD_Session_ID); s_sessions.put (new Integer(AD_Session_ID), session); @@ -97,7 +97,7 @@ public class MSession extends X_AD_Session if (session == null) { session = new MSession (ctx, Remote_Addr, Remote_Host, WebSession, null); // remote session - session.save(); + session.saveEx(); AD_Session_ID = session.getAD_Session_ID(); Env.setContext(ctx, "#AD_Session_ID", AD_Session_ID); s_sessions.put(new Integer(AD_Session_ID), session); diff --git a/org.adempiere.base/src/org/compiere/model/MSetup.java b/org.adempiere.base/src/org/compiere/model/MSetup.java index aec405d360..3af577ef4f 100644 --- a/org.adempiere.base/src/org/compiere/model/MSetup.java +++ b/org.adempiere.base/src/org/compiere/model/MSetup.java @@ -339,10 +339,10 @@ public final class MSetup // Processors MAcctProcessor ap = new MAcctProcessor(m_client, AD_User_ID); - ap.save(); + ap.saveEx(); MRequestProcessor rp = new MRequestProcessor (m_client, AD_User_ID); - rp.save(); + rp.saveEx(); log.info("fini"); return true; @@ -1021,7 +1021,7 @@ public final class MSetup log.log(Level.SEVERE, "BPartner NOT inserted"); // Location for Standard BP MLocation bpLoc = new MLocation(m_ctx, C_Country_ID, C_Region_ID, City, m_trx.getTrxName()); - bpLoc.save(); + bpLoc.saveEx(); MBPartnerLocation bpl = new MBPartnerLocation(bp); bpl.setC_Location_ID(bpLoc.getC_Location_ID()); if (!bpl.save()) @@ -1110,7 +1110,7 @@ public final class MSetup MLocation loc = new MLocation(m_ctx, C_Country_ID, C_Region_ID, City, m_trx.getTrxName()); loc.setAddress1(address1); loc.setPostal(postal); - loc.save(); + loc.saveEx(); sqlCmd = new StringBuffer ("UPDATE AD_OrgInfo SET C_Location_ID="); sqlCmd.append(loc.getC_Location_ID()).append(" WHERE AD_Org_ID=").append(getAD_Org_ID()); no = DB.executeUpdate(sqlCmd.toString(), m_trx.getTrxName()); @@ -1192,7 +1192,7 @@ public final class MSetup log.log(Level.SEVERE, "SalesRep (User) NOT inserted"); // Location for Client-User MLocation bpLocCU = new MLocation(m_ctx, C_Country_ID, C_Region_ID, City, m_trx.getTrxName()); - bpLocCU.save(); + bpLocCU.saveEx(); MBPartnerLocation bplCU = new MBPartnerLocation(bpCU); bplCU.setC_Location_ID(bpLocCU.getC_Location_ID()); if (!bplCU.save()) @@ -1218,7 +1218,7 @@ public final class MSetup log.log(Level.SEVERE, "SalesRep (Admin) NOT inserted"); // Location for Client-Admin MLocation bpLocCA = new MLocation(m_ctx, C_Country_ID, C_Region_ID, City, m_trx.getTrxName()); - bpLocCA.save(); + bpLocCA.saveEx(); MBPartnerLocation bplCA = new MBPartnerLocation(bpCA); bplCA.setC_Location_ID(bpLocCA.getC_Location_ID()); if (!bplCA.save()) diff --git a/org.adempiere.base/src/org/compiere/model/MTable.java b/org.adempiere.base/src/org/compiere/model/MTable.java index 140a885f01..502748637a 100644 --- a/org.adempiere.base/src/org/compiere/model/MTable.java +++ b/org.adempiere.base/src/org/compiere/model/MTable.java @@ -474,7 +474,7 @@ public class MTable extends X_AD_Table else if (!seq.getName().equals(getTableName())) { seq.setName(getTableName()); - seq.save(); + seq.saveEx(); } } diff --git a/org.adempiere.base/src/org/compiere/model/MTest.java b/org.adempiere.base/src/org/compiere/model/MTest.java index df6af1c52a..8a94f208a8 100644 --- a/org.adempiere.base/src/org/compiere/model/MTest.java +++ b/org.adempiere.base/src/org/compiere/model/MTest.java @@ -147,9 +147,9 @@ public class MTest extends X_Test MTest t1 = new MTest (ctx, 0, null); t1.setName("Test1"); System.out.println("->" + t1.getCharacterData() + "<-"); - t1.save(); + t1.saveEx(); t1.setCharacterData("Long Text JJ"); - t1.save(); + t1.saveEx(); int Test_ID = t1.getTest_ID(); // MTest t2 = new MTest (Env.getCtx(), Test_ID, null); @@ -161,7 +161,7 @@ public class MTest extends X_Test /** Volume Test for (int i = 1; i < 20000; i++) { - new MTest (ctx, "test", i).save(); + new MTest (ctx, "test", i).saveEx(); } /** */ } // main diff --git a/org.adempiere.base/src/org/compiere/model/MTimeExpenseLine.java b/org.adempiere.base/src/org/compiere/model/MTimeExpenseLine.java index 38a36cc7a0..b4f7a1b264 100644 --- a/org.adempiere.base/src/org/compiere/model/MTimeExpenseLine.java +++ b/org.adempiere.base/src/org/compiere/model/MTimeExpenseLine.java @@ -255,7 +255,7 @@ public class MTimeExpenseLine extends X_S_TimeExpenseLine ra.setQty(getQty()); if (getDescription() != null && getDescription().length() > 0) ra.setDescription(getDescription()); - ra.save(); + ra.saveEx(); } } } diff --git a/org.adempiere.base/src/org/compiere/model/MTree_Base.java b/org.adempiere.base/src/org/compiere/model/MTree_Base.java index 9611660937..5a53434c91 100644 --- a/org.adempiere.base/src/org/compiere/model/MTree_Base.java +++ b/org.adempiere.base/src/org/compiere/model/MTree_Base.java @@ -358,22 +358,22 @@ public class MTree_Base extends X_AD_Tree if (TREETYPE_BPartner.equals(getTreeType())) { MTree_NodeBP ndBP = new MTree_NodeBP(this, 0); - ndBP.save(); + ndBP.saveEx(); } else if (TREETYPE_Menu.equals(getTreeType())) { MTree_NodeMM ndMM = new MTree_NodeMM(this, 0); - ndMM.save(); + ndMM.saveEx(); } else if (TREETYPE_Product.equals(getTreeType())) { MTree_NodePR ndPR = new MTree_NodePR(this, 0); - ndPR.save(); + ndPR.saveEx(); } else { MTree_Node nd = new MTree_Node(this, 0); - nd.save(); + nd.saveEx(); } } diff --git a/org.adempiere.base/src/org/compiere/model/MWindow.java b/org.adempiere.base/src/org/compiere/model/MWindow.java index 4bc5c9ed02..c59ab2cc82 100644 --- a/org.adempiere.base/src/org/compiere/model/MWindow.java +++ b/org.adempiere.base/src/org/compiere/model/MWindow.java @@ -124,7 +124,7 @@ public class MWindow extends X_AD_Window for (int i = 0; i < roles.length; i++) { MWindowAccess wa = new MWindowAccess(this, roles[i].getAD_Role_ID()); - wa.save(); + wa.saveEx(); } } // Menu/Workflow @@ -137,7 +137,7 @@ public class MWindow extends X_AD_Window menues[i].setName(getName()); menues[i].setDescription(getDescription()); menues[i].setIsActive(isActive()); - menues[i].save(); + menues[i].saveEx(); } // MWFNode[] nodes = getWFNodes(getCtx(), "AD_Window_ID=" + getAD_Window_ID(), get_TrxName()); @@ -157,7 +157,7 @@ public class MWindow extends X_AD_Window changed = true; } if (changed) - nodes[i].save(); + nodes[i].saveEx(); } } return success; diff --git a/org.adempiere.base/src/org/compiere/print/ArchiveEngine.java b/org.adempiere.base/src/org/compiere/print/ArchiveEngine.java index 43d3ed77a4..49d97bc97c 100644 --- a/org.adempiere.base/src/org/compiere/print/ArchiveEngine.java +++ b/org.adempiere.base/src/org/compiere/print/ArchiveEngine.java @@ -86,7 +86,7 @@ public class ArchiveEngine // TODO to be done async MArchive archive = new MArchive (layout.getCtx(),info, null); archive.setBinaryData(data); - archive.save(); + archive.saveEx(); return data; } // archive diff --git a/org.adempiere.base/src/org/compiere/print/MPrintColor.java b/org.adempiere.base/src/org/compiere/print/MPrintColor.java index 092f560fee..b9016df7bf 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintColor.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintColor.java @@ -53,7 +53,7 @@ public class MPrintColor extends X_AD_PrintColor MPrintColor pc = new MPrintColor (Env.getCtx(), 0, null); pc.setName(name); pc.setColor(color); - pc.save(); + pc.saveEx(); return pc; } // create diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFont.java b/org.adempiere.base/src/org/compiere/print/MPrintFont.java index 89b82631b8..9fb48aef53 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFont.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFont.java @@ -126,7 +126,7 @@ public class MPrintFont extends X_AD_PrintFont name.append(" ").append(font.getSize()); pf.setName(name.toString()); pf.setFont(font); - pf.save(); + pf.saveEx(); return pf; } // create diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java index e126f7ab6e..79f27acbfd 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java @@ -791,7 +791,7 @@ public class MPrintFormat extends X_AD_PrintFormat + " " + Msg.getMsg(ctx, "Copy") + " " + to.hashCode()); // unique name // - to.save(); + to.saveEx(); // Copy Items to.setItems(copyItems(from,to)); diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFormatItem.java b/org.adempiere.base/src/org/compiere/print/MPrintFormatItem.java index 933f7f4fc1..8f0bec0378 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFormatItem.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFormatItem.java @@ -526,7 +526,7 @@ public class MPrintFormatItem extends X_AD_PrintFormatItem MPrintFormatItem.copyValues(this, to); to.setClientOrg(To_Client_ID, 0); to.setAD_PrintFormat_ID(AD_PrintFormat_ID); - to.save(); + to.saveEx(); return to; } // copyToClient diff --git a/org.adempiere.base/src/org/compiere/print/MPrintPaper.java b/org.adempiere.base/src/org/compiere/print/MPrintPaper.java index ea0ba995a1..aa19aa39d9 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintPaper.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintPaper.java @@ -85,7 +85,7 @@ public class MPrintPaper extends X_AD_PrintPaper MPrintPaper pp = new MPrintPaper (Env.getCtx(), 0, null); pp.setName(name); pp.setIsLandscape(landscape); - pp.save(); + pp.saveEx(); return pp; } // create diff --git a/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java b/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java index b3ad646a3e..54924afd5a 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java +++ b/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java @@ -1587,7 +1587,7 @@ public class LayoutEngine implements Pageable, Printable, Doc if (!item.isSuppressNull()) { item.setIsSuppressNull(true); // display size will be set to 0 in TableElement - item.save(); + item.saveEx(); } } columnHeader[col] = new ValueNamePair(item.getColumnName(), diff --git a/org.adempiere.base/src/org/compiere/process/DocAction.java b/org.adempiere.base/src/org/compiere/process/DocAction.java index 868cc1a5e3..679d9578fa 100644 --- a/org.adempiere.base/src/org/compiere/process/DocAction.java +++ b/org.adempiere.base/src/org/compiere/process/DocAction.java @@ -20,6 +20,7 @@ import java.io.File; import java.math.BigDecimal; import java.util.Properties; +import org.adempiere.exceptions.AdempiereException; import org.compiere.util.CLogger; /** @@ -238,6 +239,13 @@ public interface DocAction */ public boolean save(); + /** + * Save throwing exception + * @throws AdempiereException + * @see #save() + */ + public void saveEx() throws AdempiereException; + /** * Get Context * @return context diff --git a/org.adempiere.base/src/org/compiere/process/DocumentEngine.java b/org.adempiere.base/src/org/compiere/process/DocumentEngine.java index a47b2b3b57..e721b93974 100644 --- a/org.adempiere.base/src/org/compiere/process/DocumentEngine.java +++ b/org.adempiere.base/src/org/compiere/process/DocumentEngine.java @@ -25,9 +25,8 @@ import java.util.ArrayList; import java.util.Properties; import java.util.logging.Level; +import org.adempiere.exceptions.AdempiereException; import org.compiere.acct.Doc; -import org.compiere.db.CConnection; -import org.compiere.interfaces.Server; import org.compiere.model.MAcctSchema; import org.compiere.model.MAllocationHdr; import org.compiere.model.MBankStatement; @@ -309,13 +308,13 @@ public class DocumentEngine implements DocAction // Process (this is to update the ProcessedOn flag with a timestamp after the original document) for (PO docafter : docsPostProcess) { docafter.setProcessedOn("Processed", true, false); - docafter.save(); + docafter.saveEx(); } } if (STATUS_Completed.equals(status) && MClient.isClientAccountingImmediate()) { - m_document.save(); + m_document.saveEx(); postIt(); if (m_document instanceof PO && docsPostProcess.size() > 0) { @@ -795,6 +794,15 @@ public class DocumentEngine implements DocAction throw new IllegalStateException(EXCEPTION_MSG); } + /** + * Save Document + * @return throw exception + */ + public void saveEx() throws AdempiereException + { + throw new IllegalStateException(EXCEPTION_MSG); + } + /** * Get Context * @return context diff --git a/org.adempiere.base/src/org/compiere/process/SvrProcess.java b/org.adempiere.base/src/org/compiere/process/SvrProcess.java index e4a418fd82..eafcc99f81 100644 --- a/org.adempiere.base/src/org/compiere/process/SvrProcess.java +++ b/org.adempiere.base/src/org/compiere/process/SvrProcess.java @@ -497,7 +497,7 @@ public abstract class SvrProcess implements ProcessCall mpi.setIsProcessing(false); mpi.setResult(!m_pi.isError()); mpi.setErrorMsg(m_pi.getSummary()); - mpi.save(); + mpi.saveEx(); log.fine(mpi.toString()); ProcessInfoUtil.saveLogToDB(m_pi); diff --git a/org.adempiere.base/src/org/compiere/report/FinReport.java b/org.adempiere.base/src/org/compiere/report/FinReport.java index 8ea1d09288..5fb5a9d2c8 100644 --- a/org.adempiere.base/src/org/compiere/report/FinReport.java +++ b/org.adempiere.base/src/org/compiere/report/FinReport.java @@ -1181,7 +1181,7 @@ public class FinReport extends SvrProcess pf = MPrintFormat.createFromTable(Env.getCtx(), AD_Table_ID); AD_PrintFormat_ID = pf.getAD_PrintFormat_ID(); m_report.setAD_PrintFormat_ID(AD_PrintFormat_ID); - m_report.save(); + m_report.saveEx(); } else pf = MPrintFormat.get (getCtx(), AD_PrintFormat_ID, false); // use Cache @@ -1196,7 +1196,7 @@ public class FinReport extends SvrProcess } else if (!m_report.getDescription().equals(pf.getDescription())) pf.setDescription(m_report.getDescription()); - pf.save(); + pf.saveEx(); log.fine(pf + " - #" + pf.getItemCount()); // Print Format Item Sync @@ -1305,7 +1305,7 @@ public class FinReport extends SvrProcess if (pfi.getSortNo() != 0) pfi.setSortNo(0); } - pfi.save(); + pfi.saveEx(); log.fine(pfi.toString()); } // set translated to original diff --git a/org.adempiere.base/src/org/compiere/report/FinReportJasper.java b/org.adempiere.base/src/org/compiere/report/FinReportJasper.java index dcae1baffb..32f47dbc5c 100644 --- a/org.adempiere.base/src/org/compiere/report/FinReportJasper.java +++ b/org.adempiere.base/src/org/compiere/report/FinReportJasper.java @@ -70,7 +70,7 @@ public class FinReportJasper extends FinReport MProcess proc = new MProcess(getCtx(), m_report.getJasperProcess_ID(), get_TrxName()); MPInstance instance = new MPInstance(proc, getRecord_ID()); - instance.save(); + instance.saveEx(); ProcessInfo poInfo = new ProcessInfo(proc.getName(), proc.getAD_Process_ID()); poInfo.setParameter(pars); poInfo.setRecord_ID(getRecord_ID()); diff --git a/org.adempiere.base/src/org/compiere/sla/DeliveryAccuracy.java b/org.adempiere.base/src/org/compiere/sla/DeliveryAccuracy.java index 284f797cf3..c4bbfee1f8 100644 --- a/org.adempiere.base/src/org/compiere/sla/DeliveryAccuracy.java +++ b/org.adempiere.base/src/org/compiere/sla/DeliveryAccuracy.java @@ -136,7 +136,7 @@ public class DeliveryAccuracy extends SLACriteria if (!measure.isProcessed()) { measure.setProcessed(true); - measure.save(); + measure.saveEx(); } } // Goal Expired diff --git a/org.adempiere.base/src/org/compiere/sla/SLACriteria.java b/org.adempiere.base/src/org/compiere/sla/SLACriteria.java index f5132a5c05..85358a9ee7 100644 --- a/org.adempiere.base/src/org/compiere/sla/SLACriteria.java +++ b/org.adempiere.base/src/org/compiere/sla/SLACriteria.java @@ -77,7 +77,7 @@ public abstract class SLACriteria { goal.setMeasureActual(calculateMeasure(goal)); goal.setDateLastRun(new Timestamp(System.currentTimeMillis())); - goal.save(); + goal.saveEx(); } } } // calculateMeasures diff --git a/org.adempiere.base/src/org/compiere/sla/SLAGoalProcess.java b/org.adempiere.base/src/org/compiere/sla/SLAGoalProcess.java index 6d3659df1a..3ffa02826f 100644 --- a/org.adempiere.base/src/org/compiere/sla/SLAGoalProcess.java +++ b/org.adempiere.base/src/org/compiere/sla/SLAGoalProcess.java @@ -76,7 +76,7 @@ public class SLAGoalProcess extends SvrProcess // goal.setMeasureActual(pgm.calculateMeasure(goal)); goal.setDateLastRun(new Timestamp(System.currentTimeMillis())); - goal.save(); + goal.saveEx(); // return "@Created@ " + no + " - @MeasureActual@=" + goal.getMeasureActual(); } // doIt diff --git a/org.adempiere.base/src/org/compiere/sla/SLAMeasureProcess.java b/org.adempiere.base/src/org/compiere/sla/SLAMeasureProcess.java index eccf560bf6..b9022a4a9f 100644 --- a/org.adempiere.base/src/org/compiere/sla/SLAMeasureProcess.java +++ b/org.adempiere.base/src/org/compiere/sla/SLAMeasureProcess.java @@ -80,7 +80,7 @@ public class SLAMeasureProcess extends SvrProcess // goal.setMeasureActual(pgm.calculateMeasure(goal)); goal.setDateLastRun(new Timestamp(System.currentTimeMillis())); - goal.save(); + goal.saveEx(); // return "@MeasureActual@=" + goal.getMeasureActual(); } // doIt diff --git a/org.adempiere.base/src/org/compiere/util/DB.java b/org.adempiere.base/src/org/compiere/util/DB.java index a9cf5a093c..ddbe5049dd 100644 --- a/org.adempiere.base/src/org/compiere/util/DB.java +++ b/org.adempiere.base/src/org/compiere/util/DB.java @@ -169,7 +169,7 @@ public final class DB for (int i = 0; i < ass.length; i++) { ass[i].checkCosting(); - ass[i].save(); + ass[i].saveEx(); } // Reset Flag diff --git a/org.adempiere.base/src/org/compiere/util/WebInfo.java b/org.adempiere.base/src/org/compiere/util/WebInfo.java index 2baaf7289f..bd53415e1f 100644 --- a/org.adempiere.base/src/org/compiere/util/WebInfo.java +++ b/org.adempiere.base/src/org/compiere/util/WebInfo.java @@ -1244,7 +1244,7 @@ public class WebInfo MBPartner bp = new MBPartner (m_ctx, getC_BPartner_ID(), null); bp.setPrimaryAD_User_ID(getAD_User_ID()); retValue = new MRfQResponse (rfq, bp); // may have no lines - retValue.save(); + retValue.saveEx(); } } // diff --git a/org.adempiere.base/src/org/compiere/util/WebUser.java b/org.adempiere.base/src/org/compiere/util/WebUser.java index 3a6aaa6a20..80fa106f3e 100644 --- a/org.adempiere.base/src/org/compiere/util/WebUser.java +++ b/org.adempiere.base/src/org/compiere/util/WebUser.java @@ -601,7 +601,7 @@ public class WebUser { pwd = String.valueOf (System.currentTimeMillis ()); m_bpc.setPassword (pwd); - m_bpc.save(); + m_bpc.saveEx(); } } // setPassword @@ -1057,7 +1057,7 @@ public class WebUser { retValue = new MBPBankAccount (m_ctx, m_bp, m_bpc, m_loc); retValue.setAD_User_ID(getAD_User_ID()); - retValue.save(); + retValue.saveEx(); } return retValue; @@ -1083,7 +1083,7 @@ public class WebUser setPasswordMessage(null); else setPasswordMessage("Invalid Code"); - m_bpc.save(); + m_bpc.saveEx(); } // setEMailVerifyCode } // WebUser diff --git a/org.adempiere.base/src/org/compiere/util/WebUtil.java b/org.adempiere.base/src/org/compiere/util/WebUtil.java index 823b1cea0b..b4600ef1a8 100644 --- a/org.adempiere.base/src/org/compiere/util/WebUtil.java +++ b/org.adempiere.base/src/org/compiere/util/WebUtil.java @@ -1105,7 +1105,7 @@ public final class WebUtil String retValue = email.send(); // Log MUserMail um = new MUserMail(mailMsg, to.getAD_User_ID(), email); - um.save(); + um.saveEx(); // return retValue; } // sendEMail diff --git a/org.adempiere.base/src/org/compiere/wf/MWFActivity.java b/org.adempiere.base/src/org/compiere/wf/MWFActivity.java index 4235442f49..e84b9262eb 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFActivity.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFActivity.java @@ -195,7 +195,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable save(); // m_audit = new MWFEventAudit(this); - m_audit.save(); + m_audit.saveEx(); // m_process = process; } // MWFActivity @@ -316,7 +316,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable } else m_audit.setEventType(MWFEventAudit.EVENTTYPE_StateChanged); - m_audit.save(); + m_audit.saveEx(); } // updateEventAudit /** @@ -921,12 +921,12 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable m_po.load(get_TrxName()); DocAction doc = (DocAction)m_po; doc.setDocStatus(m_docStatus); - m_po.save(); + m_po.saveEx(); } if (m_process != null) { m_process.setProcessMsg(this.getTextMsg()); - m_process.save(); + m_process.saveEx(); } } finally @@ -1053,12 +1053,12 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable note.setTextMsg(m_node.getName(true)); note.setDescription(m_node.getDescription(true)); note.setRecord(getAD_Table_ID(), getRecord_ID()); - note.save(); + note.saveEx(); // Attachment MAttachment attachment = new MAttachment (getCtx(), MNote.Table_ID, note.getAD_Note_ID(), get_TrxName()); attachment.addEntry(report); attachment.setTextMsg(m_node.getName(true)); - attachment.save(); + attachment.saveEx(); return true; } @@ -1245,7 +1245,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable else dbValue = value; m_po.set_ValueOfColumn(getNode().getAD_Column_ID(), dbValue); - m_po.save(); + m_po.saveEx(); if (dbValue != null && !dbValue.equals(m_po.get_ValueOfColumn(getNode().getAD_Column_ID()))) throw new Exception("Persistent Object not updated - AD_Table_ID=" + getAD_Table_ID() + ", Record_ID=" + getRecord_ID() @@ -1368,7 +1368,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable setTextMsg ("Cannot Approve - Document Status: " + doc.getDocStatus()); } } - doc.save(); + doc.saveEx(); } catch (Exception e) { @@ -1401,7 +1401,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable // Add record information to the note, so that the user receiving the // note can jump to the doc easily note.setRecord(m_po.get_Table_ID(), m_po.get_ID()); - note.save(); + note.saveEx(); } } } @@ -1446,10 +1446,10 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable m_audit.setEventType(MWFEventAudit.EVENTTYPE_StateChanged); long ms = System.currentTimeMillis() - m_audit.getCreated().getTime(); m_audit.setElapsedTimeMS(new BigDecimal(ms)); - m_audit.save(); + m_audit.saveEx(); // Create new one m_audit = new MWFEventAudit(this); - m_audit.save(); + m_audit.saveEx(); return true; } // forwardTo diff --git a/org.adempiere.base/src/org/compiere/wf/MWFProcess.java b/org.adempiere.base/src/org/compiere/wf/MWFProcess.java index f867f8cf28..85297c347b 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFProcess.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFProcess.java @@ -238,7 +238,7 @@ public class MWFProcess extends X_AD_WF_Process } if (!activities[i].isProcessed()) activities[i].setProcessed(true); - activities[i].save(); + activities[i].saveEx(); } } // closed } @@ -286,7 +286,7 @@ public class MWFProcess extends X_AD_WF_Process { // eliminate from active processed activity.setProcessed(true); - activity.save(); + activity.saveEx(); // if (closedState == null) closedState = activityWFState; @@ -354,7 +354,7 @@ public class MWFProcess extends X_AD_WF_Process } // eliminate from active processed last.setProcessed(true); - last.save(); + last.saveEx(); // Start next activity String split = last.getNode().getSplitElement(); diff --git a/org.adempiere.base/src/org/compiere/wf/MWorkflow.java b/org.adempiere.base/src/org/compiere/wf/MWorkflow.java index 329a670da8..608769384d 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWorkflow.java +++ b/org.adempiere.base/src/org/compiere/wf/MWorkflow.java @@ -691,7 +691,7 @@ public class MWorkflow extends X_AD_Workflow try { retValue = new MWFProcess (this, pi, trxName != null ? trxName : localTrx.getTrxName()); - retValue.save(); + retValue.saveEx(); pi.setSummary(Msg.getMsg(getCtx(), "Processing")); retValue.startWork(); if (localTrx != null) @@ -855,7 +855,7 @@ public class MWorkflow extends X_AD_Workflow wf.setName (wf.getValue()); wf.setDescription("(Standard " + wf.getValue()); wf.setEntityType (ENTITYTYPE_Dictionary); - wf.save(); + wf.saveEx(); // MWFNode node10 = new MWFNode (wf, "10", "(Start)"); node10.setDescription("(Standard Node)"); @@ -863,9 +863,9 @@ public class MWorkflow extends X_AD_Workflow node10.setAction(MWFNode.ACTION_WaitSleep); node10.setWaitTime(0); node10.setPosition(5, 5); - node10.save(); + node10.saveEx(); wf.setAD_WF_Node_ID(node10.getAD_WF_Node_ID()); - wf.save(); + wf.saveEx(); MWFNode node20 = new MWFNode (wf, "20", "(DocAuto)"); node20.setDescription("(Standard Node)"); @@ -873,12 +873,12 @@ public class MWorkflow extends X_AD_Workflow node20.setAction(MWFNode.ACTION_DocumentAction); node20.setDocAction(MWFNode.DOCACTION_None); node20.setPosition(5, 120); - node20.save(); + node20.saveEx(); MWFNodeNext tr10_20 = new MWFNodeNext(node10, node20.getAD_WF_Node_ID()); tr10_20.setEntityType (ENTITYTYPE_Dictionary); tr10_20.setDescription("(Standard Transition)"); tr10_20.setSeqNo(100); - tr10_20.save(); + tr10_20.saveEx(); MWFNode node100 = new MWFNode (wf, "100", "(DocPrepare)"); node100.setDescription("(Standard Node)"); @@ -886,13 +886,13 @@ public class MWorkflow extends X_AD_Workflow node100.setAction(MWFNode.ACTION_DocumentAction); node100.setDocAction(MWFNode.DOCACTION_Prepare); node100.setPosition(170, 5); - node100.save(); + node100.saveEx(); MWFNodeNext tr10_100 = new MWFNodeNext(node10, node100.getAD_WF_Node_ID()); tr10_100.setEntityType (ENTITYTYPE_Dictionary); tr10_100.setDescription("(Standard Approval)"); tr10_100.setIsStdUserWorkflow(true); tr10_100.setSeqNo(10); - tr10_100.save(); + tr10_100.saveEx(); MWFNode node200 = new MWFNode (wf, "200", "(DocComplete)"); node200.setDescription("(Standard Node)"); @@ -900,12 +900,12 @@ public class MWorkflow extends X_AD_Workflow node200.setAction(MWFNode.ACTION_DocumentAction); node200.setDocAction(MWFNode.DOCACTION_Complete); node200.setPosition(170, 120); - node200.save(); + node200.saveEx(); MWFNodeNext tr100_200 = new MWFNodeNext(node100, node200.getAD_WF_Node_ID()); tr100_200.setEntityType (ENTITYTYPE_Dictionary); tr100_200.setDescription("(Standard Transition)"); tr100_200.setSeqNo(100); - tr100_200.save(); + tr100_200.saveEx(); /** @@ -917,7 +917,7 @@ public class MWorkflow extends X_AD_Workflow int M_Requsition_ID = 100; MRequisition req = new MRequisition (Env.getCtx(), M_Requsition_ID); req.setDocStatus(DocAction.DOCSTATUS_Drafted); - req.save(); + req.saveEx(); Log.setTraceLevel(8); System.out.println("---------------------------------------------------"); MWorkflow wf = MWorkflow.get (Env.getCtx(), AD_Workflow_ID); diff --git a/org.adempiere.base/src/org/compiere/wf/WFActivityManage.java b/org.adempiere.base/src/org/compiere/wf/WFActivityManage.java index 2c31003208..61d3922d23 100644 --- a/org.adempiere.base/src/org/compiere/wf/WFActivityManage.java +++ b/org.adempiere.base/src/org/compiere/wf/WFActivityManage.java @@ -111,7 +111,7 @@ public class WFActivityManage extends SvrProcess msg += " - " + msg1; } // - activity.save(); + activity.saveEx(); return msg; } // doIt diff --git a/org.adempiere.base/src/org/compiere/wf/WorkflowValidate.java b/org.adempiere.base/src/org/compiere/wf/WorkflowValidate.java index d13034f35d..c3fc813e77 100644 --- a/org.adempiere.base/src/org/compiere/wf/WorkflowValidate.java +++ b/org.adempiere.base/src/org/compiere/wf/WorkflowValidate.java @@ -50,7 +50,7 @@ public class WorkflowValidate extends SvrProcess log.info("WF=" + wf); String msg = wf.validate(); - wf.save(); + wf.saveEx(); if (msg.length() > 0) throw new AdempiereUserError(Msg.getMsg(getCtx(), "WorflowNotValid") + " - " + msg); diff --git a/org.adempiere.base/src/org/eevolution/model/MDDOrderLine.java b/org.adempiere.base/src/org/eevolution/model/MDDOrderLine.java index 66bd7ed960..2a354d0f41 100644 --- a/org.adempiere.base/src/org/eevolution/model/MDDOrderLine.java +++ b/org.adempiere.base/src/org/eevolution/model/MDDOrderLine.java @@ -40,7 +40,7 @@ import org.compiere.util.Msg; ol.setQtyOrdered(wbl.getQuantity()); ol.setPriceActual(wbl.getPrice()); ol.setTax(); - ol.save(); + ol.saveEx(); * * @author Jorg Janke @@ -140,7 +140,7 @@ public class MDDOrderLine extends X_DD_OrderLine ol.setPrice(); ol.setPriceActual(wbl.getPrice()); ol.setTax(); - ol.save(); + ol.saveEx(); * @param order parent order */ public MDDOrderLine (MDDOrder order) diff --git a/org.adempiere.base/src/org/eevolution/process/BankTransfer.java b/org.adempiere.base/src/org/eevolution/process/BankTransfer.java index d7374c28be..a5e30b02fa 100644 --- a/org.adempiere.base/src/org/eevolution/process/BankTransfer.java +++ b/org.adempiere.base/src/org/eevolution/process/BankTransfer.java @@ -158,7 +158,7 @@ public class BankTransfer extends SvrProcess paymentBankFrom.setOverUnderAmt(Env.ZERO); paymentBankFrom.setC_DocType_ID(false); paymentBankFrom.setC_Charge_ID(p_C_Charge_ID); - paymentBankFrom.save(); + paymentBankFrom.saveEx(); paymentBankFrom.processIt(MPayment.DOCACTION_Complete); paymentBankFrom.saveEx(); @@ -177,7 +177,7 @@ public class BankTransfer extends SvrProcess paymentBankTo.setOverUnderAmt(Env.ZERO); paymentBankTo.setC_DocType_ID(true); paymentBankTo.setC_Charge_ID(p_C_Charge_ID); - paymentBankTo.save(); + paymentBankTo.saveEx(); paymentBankTo.processIt(MPayment.DOCACTION_Complete); paymentBankTo.saveEx(); m_created++; diff --git a/org.adempiere.base/src/org/eevolution/process/CopyFromBOM.java b/org.adempiere.base/src/org/eevolution/process/CopyFromBOM.java index be411265df..b19fd24f0e 100644 --- a/org.adempiere.base/src/org/eevolution/process/CopyFromBOM.java +++ b/org.adempiere.base/src/org/eevolution/process/CopyFromBOM.java @@ -83,7 +83,7 @@ public class CopyFromBOM extends SvrProcess { MPPProductBOMLine tobomline = new MPPProductBOMLine(ctx, 0, get_TrxName()); MPPProductBOMLine.copyValues(frombomline, tobomline); tobomline.setPP_Product_BOM_ID(toBOM.getPP_Product_BOM_ID()); - tobomline.save(); + tobomline.saveEx(); ++no; } return "OK"; diff --git a/org.adempiere.extend/src/org/compiere/test/OrderTest.java b/org.adempiere.extend/src/org/compiere/test/OrderTest.java index fe663d5fc2..5e39f58c3e 100644 --- a/org.adempiere.extend/src/org/compiere/test/OrderTest.java +++ b/org.adempiere.extend/src/org/compiere/test/OrderTest.java @@ -71,7 +71,7 @@ public class OrderTest implements Runnable int count = 0; MBPartner bp = new MBPartner(Env.getCtx(), 117, null); bp.setSOCreditStatus(MBPartner.SOCREDITSTATUS_NoCreditCheck); - bp.save(); + bp.saveEx(); // for (int i = 0; i < m_numberOrders; i++) diff --git a/org.adempiere.extend/src/test/functional/MBPGroupTest.java b/org.adempiere.extend/src/test/functional/MBPGroupTest.java index 532d665243..2a67d1b7e0 100644 --- a/org.adempiere.extend/src/test/functional/MBPGroupTest.java +++ b/org.adempiere.extend/src/test/functional/MBPGroupTest.java @@ -515,7 +515,7 @@ public class MBPGroupTest extends AdempiereTestCase { m_group.setIsDefault (false); m_group.setPriorityBase(MBPGroup.PRIORITYBASE_Same); - m_group.save(); + m_group.saveEx(); commit(); } catch(Exception e) { diff --git a/org.adempiere.extend/src/test/functional/MBPartnerLocationTest.java b/org.adempiere.extend/src/test/functional/MBPartnerLocationTest.java index 0a2e9facb8..c663d2adec 100644 --- a/org.adempiere.extend/src/test/functional/MBPartnerLocationTest.java +++ b/org.adempiere.extend/src/test/functional/MBPartnerLocationTest.java @@ -528,7 +528,7 @@ public class MBPartnerLocationTest extends AdempiereTestCase { location.setPostal(zipcode); location.setPostal_Add(zipcode); location.setAD_Org_ID(0); - location.save(); + location.saveEx(); m_group = new MBPGroup (getCtx(), 0, getTrxName()); m_group.setName ("Test Group Name"); // N @@ -536,7 +536,7 @@ public class MBPartnerLocationTest extends AdempiereTestCase { m_group.setIsDefault (false); m_group.setPriorityBase(MBPGroup.PRIORITYBASE_Same); - m_group.save(); + m_group.saveEx(); m_partner = new MBPartner (getCtx(), 0, getTrxName()); m_partner.setValue (""); @@ -563,7 +563,7 @@ public class MBPartnerLocationTest extends AdempiereTestCase { bpl.setName("Test Business Partner Location"); bpl.setC_BPartner_ID(m_partner.get_ID()); bpl.setC_Location_ID(location.get_ID()); - bpl.save(); + bpl.saveEx(); } commit(); diff --git a/org.adempiere.extend/src/test/functional/MBPartnerTest.java b/org.adempiere.extend/src/test/functional/MBPartnerTest.java index b75c0b879c..06d7efc8f9 100644 --- a/org.adempiere.extend/src/test/functional/MBPartnerTest.java +++ b/org.adempiere.extend/src/test/functional/MBPartnerTest.java @@ -539,11 +539,11 @@ public class MBPartnerTest extends AdempiereTestCase { m_group.setPriorityBase(MBPGroup.PRIORITYBASE_Same); - m_group.save(); + m_group.saveEx(); m_partner.setBPGroup(m_group); // Reset Created, Updated to current system time ( teo_sarca ) - m_partner.save(); + m_partner.saveEx(); commit(); } catch(Exception e) { diff --git a/org.adempiere.extend/src/test/functional/MProductTest.java b/org.adempiere.extend/src/test/functional/MProductTest.java index e6e49b1c30..af2b077689 100644 --- a/org.adempiere.extend/src/test/functional/MProductTest.java +++ b/org.adempiere.extend/src/test/functional/MProductTest.java @@ -92,7 +92,7 @@ public class MProductTest extends AdempiereTestCase { m_product.setName("Test Product"); // N m_product.setC_UOM_ID(getUOM_ID("Each")); - boolean saveResult = m_product.save(); + boolean saveResult = m_product.saveEx(); assertEquals("Create new product.", true, saveResult); } diff --git a/org.adempiere.extend/src/test/functional/MUserTest.java b/org.adempiere.extend/src/test/functional/MUserTest.java index debf6fcacf..97349a600c 100644 --- a/org.adempiere.extend/src/test/functional/MUserTest.java +++ b/org.adempiere.extend/src/test/functional/MUserTest.java @@ -540,7 +540,7 @@ public class MUserTest extends AdempiereTestCase { m_group.setPriorityBase(MBPGroup.PRIORITYBASE_Same); - m_group.save(); + m_group.saveEx(); m_partner.setBPGroup(m_group); // Reset Created, Updated to current system time ( teo_sarca ) @@ -549,7 +549,7 @@ public class MUserTest extends AdempiereTestCase { m_contact.setName("Test Contact Name"); m_contact.setIsActive(true); m_contact.setC_BPartner_ID(m_partner.get_ID()); - m_contact.save(); + m_contact.saveEx(); } commit(); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackOut.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackOut.java index c1e8067eee..300075db7f 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackOut.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackOut.java @@ -416,7 +416,7 @@ public class PackOut extends SvrProcess packOutDocument.endDocument();packageDocument.endElement("","","adempiereDocument"); packageDocument.endDocument(); //m_Exp.setProcessed(true); - //m_Exp.save(); + //m_Exp.saveEx(); } rs1.close(); pstmt1.close(); diff --git a/org.adempiere.server/src/main/server/org/compiere/ldap/LdapProcessor.java b/org.adempiere.server/src/main/server/org/compiere/ldap/LdapProcessor.java index 86a99f6d8b..2be7be5154 100644 --- a/org.adempiere.server/src/main/server/org/compiere/ldap/LdapProcessor.java +++ b/org.adempiere.server/src/main/server/org/compiere/ldap/LdapProcessor.java @@ -106,7 +106,7 @@ public class LdapProcessor extends AdempiereServer MLdapProcessorLog pLog = new MLdapProcessorLog(m_model, m_summary.toString()); pLog.setReference("#" + String.valueOf(p_runCount) + " - " + TimeUtil.formatElapsed(new Timestamp(p_startWork))); - pLog.save(); + pLog.saveEx(); } // doWork diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AcctProcessor.java b/org.adempiere.server/src/main/server/org/compiere/server/AcctProcessor.java index 772157507e..5db435d894 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AcctProcessor.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AcctProcessor.java @@ -85,7 +85,7 @@ public class AcctProcessor extends AdempiereServer MAcctProcessorLog pLog = new MAcctProcessorLog(m_model, m_summary.toString()); pLog.setReference("#" + String.valueOf(p_runCount) + " - " + TimeUtil.formatElapsed(new Timestamp(p_startWork))); - pLog.save(); + pLog.saveEx(); } // doWork /** diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java index 5d8bfa534b..0e887ea4d6 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java @@ -181,7 +181,7 @@ public abstract class AdempiereServer extends Thread m_runTotalMS += m_runLastMS; // p_model.setDateLastRun(new Timestamp(now)); - p_model.save(); + p_model.saveEx(); // log.fine(getName() + ": " + getStatistics()); } // runNow @@ -262,7 +262,7 @@ public abstract class AdempiereServer extends Thread // p_model.setDateLastRun(lastRun); p_model.setDateNextRun(new Timestamp(m_nextWork)); - p_model.save(); + p_model.saveEx(); // log.fine(getName() + ": " + getStatistics()); if (!sleep()) diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java index 1dfd409f85..2768ef0428 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java @@ -94,7 +94,7 @@ public class AdempiereServerMgr MSession session = MSession.get(getCtx(), true); session.setWebStoreSession(false); session.setWebSession("Server"); - session.save(); + session.saveEx(); // return true; } // startEnvironment diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java b/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java index 015ee897c7..e466515aec 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java @@ -111,7 +111,7 @@ public class AlertProcessor extends AdempiereServer pLog.setReference("#" + String.valueOf(p_runCount) + " - " + TimeUtil.formatElapsed(new Timestamp(p_startWork))); pLog.setTextMsg(m_errors.toString()); - pLog.save(); + pLog.saveEx(); } // doWork /** @@ -154,7 +154,7 @@ public class AlertProcessor extends AdempiereServer rule.setErrorMsg("Pre=" + error.getName()); m_errors.append("Pre=" + error.getName()); rule.setIsValid(false); - rule.save(); + rule.saveEx(); valid = false; break; } @@ -180,7 +180,7 @@ public class AlertProcessor extends AdempiereServer rule.setErrorMsg("Select=" + e.getLocalizedMessage()); m_errors.append("Select=" + e.getLocalizedMessage()); rule.setIsValid(false); - rule.save(); + rule.saveEx(); valid = false; break; } @@ -196,7 +196,7 @@ public class AlertProcessor extends AdempiereServer rule.setErrorMsg("Post=" + error.getName()); m_errors.append("Post=" + error.getName()); rule.setIsValid(false); - rule.save(); + rule.saveEx(); valid = false; break; } @@ -218,7 +218,7 @@ public class AlertProcessor extends AdempiereServer if (!valid) { alert.setIsValid(false); - alert.save(); + alert.saveEx(); return false; } diff --git a/org.adempiere.server/src/main/server/org/compiere/server/RequestProcessor.java b/org.adempiere.server/src/main/server/org/compiere/server/RequestProcessor.java index 888ec74dbe..f634dae8e7 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/RequestProcessor.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/RequestProcessor.java @@ -82,7 +82,7 @@ public class RequestProcessor extends AdempiereServer MRequestProcessorLog pLog = new MRequestProcessorLog(m_model, m_summary.toString()); pLog.setReference("#" + String.valueOf(p_runCount) + " - " + TimeUtil.formatElapsed(new Timestamp(p_startWork))); - pLog.save(); + pLog.saveEx(); } // doWork @@ -125,7 +125,7 @@ public class RequestProcessor extends AdempiereServer countEMails++; } } - request.save(); + request.saveEx(); count++; } } @@ -180,7 +180,7 @@ public class RequestProcessor extends AdempiereServer countEMails++; } } - request.save(); + request.saveEx(); count++; } } @@ -238,7 +238,7 @@ public class RequestProcessor extends AdempiereServer countEMails++; } } - request.save(); + request.saveEx(); count++; } rs.close(); @@ -335,7 +335,7 @@ public class RequestProcessor extends AdempiereServer request.setDateLastAlert(); countEMails++; } - request.save(); + request.saveEx(); count++; } } @@ -571,7 +571,7 @@ public class RequestProcessor extends AdempiereServer if (SalesRep_ID != 0) { request.setSalesRep_ID(SalesRep_ID); - request.save(); + request.saveEx(); changed++; } else diff --git a/org.adempiere.server/src/main/server/org/compiere/server/Scheduler.java b/org.adempiere.server/src/main/server/org/compiere/server/Scheduler.java index db19d11eff..1dd9b86db5 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/Scheduler.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/Scheduler.java @@ -144,7 +144,7 @@ public class Scheduler extends AdempiereServer MSchedulerLog pLog = new MSchedulerLog(m_model, m_summary.toString()); pLog.setReference("#" + String.valueOf(p_runCount) + " - " + TimeUtil.formatElapsed(new Timestamp(p_startWork))); - pLog.save(); + pLog.saveEx(); } // doWork /** @@ -197,7 +197,7 @@ public class Scheduler extends AdempiereServer note.setTextMsg(pi.getSummary()); //note.setDescription(); note.setRecord(MPInstance.Table_ID, pi.getAD_PInstance_ID()); - note.save(); + note.saveEx(); } } } @@ -247,7 +247,7 @@ public class Scheduler extends AdempiereServer attachment.setClientOrg(m_model.getAD_Client_ID(), m_model.getAD_Org_ID()); attachment.addEntry(report); attachment.setTextMsg(m_model.getName()); - attachment.save(); + attachment.saveEx(); } } } @@ -414,13 +414,13 @@ public class Scheduler extends AdempiereServer runNow(); long next = predictor.nextMatchingTime(); p_model.setDateNextRun(new Timestamp(next)); - p_model.save(); + p_model.saveEx(); } }); predictor = new Predictor(cronPattern); long next = predictor.nextMatchingTime(); p_model.setDateNextRun(new Timestamp(next)); - p_model.save(); + p_model.saveEx(); cronScheduler.start(); while (true) { if (!sleep()) { diff --git a/org.adempiere.server/src/main/server/org/compiere/server/WorkflowProcessor.java b/org.adempiere.server/src/main/server/org/compiere/server/WorkflowProcessor.java index 30db7ebc3c..605e5dd03a 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/WorkflowProcessor.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/WorkflowProcessor.java @@ -84,7 +84,7 @@ public class WorkflowProcessor extends AdempiereServer MWorkflowProcessorLog pLog = new MWorkflowProcessorLog(m_model, m_summary.toString()); pLog.setReference("#" + String.valueOf(p_runCount) + " - " + TimeUtil.formatElapsed(new Timestamp(p_startWork))); - pLog.save(); + pLog.saveEx(); } // doWork /** @@ -161,7 +161,7 @@ public class WorkflowProcessor extends AdempiereServer MWFNode node = activity.getNode(); int prioDiff = node.calculateDynamicPriority ((int)(ms / 1000)); activity.setPriority(activity.getDynPriorityStart() + prioDiff); - activity.save(); + activity.saveEx(); count++; } rs.close (); @@ -215,7 +215,7 @@ public class WorkflowProcessor extends AdempiereServer countEMails += sendEmail (activity, "ActivityOverPriority", escalate, true); activity.setDateLastAlert(new Timestamp(System.currentTimeMillis())); - activity.save(); + activity.saveEx(); count++; } rs.close(); @@ -266,7 +266,7 @@ public class WorkflowProcessor extends AdempiereServer countEMails += sendEmail (activity, "ActivityEndWaitTime", escalate, false); activity.setDateLastAlert(new Timestamp(System.currentTimeMillis())); - activity.save(); + activity.saveEx(); count++; } rs.close (); @@ -316,7 +316,7 @@ public class WorkflowProcessor extends AdempiereServer countEMails += sendEmail (activity, "ActivityInactivity", escalate, false); activity.setDateLastAlert(new Timestamp(System.currentTimeMillis())); - activity.save(); + activity.saveEx(); count++; } rs.close(); diff --git a/org.adempiere.ui.swing/src/org/compiere/AdempiereClient.java b/org.adempiere.ui.swing/src/org/compiere/AdempiereClient.java index 36c2481bc5..2abf2ad33e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/AdempiereClient.java +++ b/org.adempiere.ui.swing/src/org/compiere/AdempiereClient.java @@ -133,7 +133,7 @@ public final class AdempiereClient { SecureEngine.init(className); // test it system.setEncryptionKey(className); - system.save(); + system.saveEx(); } } SecureEngine.init(className); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AChat.java b/org.adempiere.ui.swing/src/org/compiere/apps/AChat.java index 317e36bbc2..f2e2bc4b35 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AChat.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AChat.java @@ -157,9 +157,9 @@ public class AChat extends CDialog { log.config(data); if (m_chat.get_ID() == 0) - m_chat.save(); + m_chat.saveEx(); MChatEntry entry = new MChatEntry(m_chat, data); - entry.save(); + entry.saveEx(); } // data to be saved } dispose(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java index f9c010179c..d95c7b6fb3 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java @@ -2441,7 +2441,7 @@ public final class APanel extends CPanel // MWindow win = new MWindow(m_ctx, m_curTab.getAD_Window_ID(), null); win.setWindowSize(size); - win.save(); + win.saveEx(); } // cmdWinSize private void cmd_export() diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/Attachment.java b/org.adempiere.ui.swing/src/org/compiere/apps/Attachment.java index 084769fa82..8610928d59 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/Attachment.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/Attachment.java @@ -376,7 +376,7 @@ public final class Attachment extends CDialog { m_attachment.setBinaryData(new byte[0]); // ATTENTION! HEAVY HACK HERE... Else it will not save :( m_attachment.setTextMsg(text.getText()); - m_attachment.save(); + m_attachment.saveEx(); } } else diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/EMailDialog.java b/org.adempiere.ui.swing/src/org/compiere/apps/EMailDialog.java index 7943c6eda5..fe85bb0781 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/EMailDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/EMailDialog.java @@ -417,7 +417,7 @@ public class EMailDialog extends CDialog status = email.send(); // if (m_user != null) - new MUserMail(m_user, m_user.getAD_User_ID(), email).save(); + new MUserMail(m_user, m_user.getAD_User_ID(), email).saveEx(); if (email.isSentOK()) { ADialog.info(0, this, "MessageSent"); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameter.java b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameter.java index b43c87e86d..f4196d7105 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameter.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameter.java @@ -525,7 +525,7 @@ public class ProcessParameter extends CDialog if (editor2 != null) para.setInfo_To (editor2.getDisplay()); // - para.save(); + para.saveEx(); log.fine(para.toString()); } // for every parameter diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameterPanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameterPanel.java index f4046b514e..1901a9d1ec 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameterPanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessParameterPanel.java @@ -611,7 +611,7 @@ public class ProcessParameterPanel extends CPanel implements VetoableChangeListe if (editor2 != null) para.setInfo_To (editor2.getDisplay()); // - para.save(); + para.saveEx(); log.fine(para.toString()); } // for every parameter diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/ArchiveViewer.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/ArchiveViewer.java index f894551476..1dcaf9b80c 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/ArchiveViewer.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/ArchiveViewer.java @@ -411,7 +411,7 @@ public class ArchiveViewer extends Archive } log.info("Update=" + update); if (update) - ar.save(); + ar.saveEx(); // m_index++; updateVDisplay(false); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPanel.java index 65f95cadc6..e14684defa 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPanel.java @@ -383,12 +383,12 @@ public class WFPanel extends CPanel else if (e.getSource() == bSaveLayout) { if (m_wf.getAD_Client_ID() == AD_Client_ID) - m_wf.save(); + m_wf.saveEx(); MWFNode[] nodes = m_wf.getNodes(false, AD_Client_ID); for (int i = 0; i < nodes.length; i++) { if (nodes[i].getAD_Client_ID() == AD_Client_ID) - nodes[i].save(); + nodes[i].saveEx(); } } else if (e.getSource() == bResetLayout) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPopupItem.java b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPopupItem.java index 559366a30e..568faf9150 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPopupItem.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPopupItem.java @@ -61,7 +61,7 @@ public class WFPopupItem extends JMenuItem { int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx()); MWFNodeNext newLine = new MWFNodeNext(m_node, m_AD_WF_NodeTo_ID); newLine.setClientOrg(AD_Client_ID, 0); - newLine.save(); + newLine.saveEx(); log.info("Add Line to " + m_node + " -> " + newLine); wfp.load(m_AD_Workflow_ID, true); } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPayment.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPayment.java index ce5578cc14..01aef7f942 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPayment.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPayment.java @@ -1476,12 +1476,12 @@ public class VPayment extends CDialog approved = m_mPayment.processOnline(); info = m_mPayment.getR_RespMsg() + " (" + m_mPayment.getR_AuthCode() + ") ID=" + m_mPayment.getR_PnRef(); - m_mPayment.save(); + m_mPayment.saveEx(); if (approved) { boolean ok = m_mPayment.processIt(DocAction.ACTION_Complete); - m_mPayment.save(); + m_mPayment.saveEx(); if (ok) ADialog.info(m_WindowNo, this, "PaymentProcessed", info + "\n" + m_mPayment.getDocumentNo()); else diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java index 6e0d7a56a2..946ed7f3ee 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java @@ -1029,7 +1029,7 @@ public final class VAccountDialog extends CDialog C_Project_ID, C_Campaign_ID, C_Activity_ID, User1_ID, User2_ID, 0, 0); if (acct != null && acct.get_ID() == 0) - acct.save(); + acct.saveEx(); // Show Info if (acct == null || acct.get_ID() == 0) @@ -1040,7 +1040,7 @@ public final class VAccountDialog extends CDialog if (Alias != null && Alias.length() > 0) { acct.setAlias(Alias); - acct.save(); + acct.saveEx(); } loadInfo (acct.get_ID(), s_AcctSchema.getC_AcctSchema_ID()); } diff --git a/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereThemeEditor.java b/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereThemeEditor.java index 1197458429..104ee2440a 100644 --- a/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereThemeEditor.java +++ b/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereThemeEditor.java @@ -306,7 +306,7 @@ public class CompiereThemeEditor extends CDialog // Confirm if (e.getSource() == bOK) { - //CompiereTheme.save(); + //CompiereTheme.saveEx(); dispose(); return; } diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/CashSubFunctions.java b/org.adempiere.ui.swing/src/org/compiere/pos/CashSubFunctions.java index 5865f1da9f..97a2a94e9e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/CashSubFunctions.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/CashSubFunctions.java @@ -486,7 +486,7 @@ public class CashSubFunctions extends PosSubPanel implements ActionListener, Inp cl.setCashType(MCashLine.CASHTYPE_Difference); cl.setAmount(initialChange.subtract(cash.getEndingBalance())); cl.setDescription("Initial Change Before: " + cash.getEndingBalance() + " Now: " + initialChange); - cl.save(); + cl.saveEx(); } v_PreviousChange.setValue(initialChange); } @@ -542,7 +542,7 @@ public class CashSubFunctions extends PosSubPanel implements ActionListener, Inp cl.setCashType(MCashLine.CASHTYPE_Difference); cl.setAmount(difference); cl.setDescription(Msg.translate(p_pos.getCtx(), "Cash Scrutiny -> Before: ") + previousValue + " Now: " + actualValue); - cl.save(); + cl.saveEx(); } cash = MCash.get(p_pos.getCtx(), /*p_pos.getAD_Org_ID(),*/ p_pos.getC_CashBook_ID(), today, null); v_previousBalance.setValue(cash.getEndingBalance()); diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/SubCheckout.java b/org.adempiere.ui.swing/src/org/compiere/pos/SubCheckout.java index 49b85e46b9..9e5e4591c1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/SubCheckout.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/SubCheckout.java @@ -341,7 +341,7 @@ public class SubCheckout extends PosSubPanel implements ActionListener { if (order.processIt(DocAction.ACTION_Complete) ) { - order.save(); + order.saveEx(); } else { diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/SubCurrentLine.java b/org.adempiere.ui.swing/src/org/compiere/pos/SubCurrentLine.java index 138f903184..4ed731a370 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/SubCurrentLine.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/SubCurrentLine.java @@ -435,9 +435,9 @@ public class SubCurrentLine extends PosSubPanel implements ActionListener { { lineas[i].setC_BPartner_ID(partner.getC_BPartner_ID()); lineas[i].setTax(); - lineas[i].save(); + lineas[i].saveEx(); } - m_order.save(); + m_order.saveEx(); } } } @@ -473,7 +473,7 @@ public class SubCurrentLine extends PosSubPanel implements ActionListener { double total = current + toadd; lineas[i].setQty(new BigDecimal(total)); lineas[i].setPrice(); // sets List/limit - lineas[i].save(); + lineas[i].saveEx(); return lineas[i]; } } @@ -490,7 +490,7 @@ public class SubCurrentLine extends PosSubPanel implements ActionListener { line.setPrice(); // sets List/limit line.setPrice(PriceActual); - line.save(); + line.saveEx(); return line; } // createLine diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java index 99dc9990c0..a05fe9b83f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java @@ -465,7 +465,7 @@ public class ProcessParameterPanel extends Panel implements if (editor2 != null) para.setInfo_To(editor2.getDisplay()); // - para.save(); + para.saveEx(); log.fine(para.toString()); } // for every parameter diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java index 78773ec349..2338f4f98a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java @@ -602,7 +602,7 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis log.info("Update=" + update); if (update) - ar.save(); + ar.saveEx(); m_index++; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java index 4378753f46..c4773e5b1e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java @@ -1173,7 +1173,7 @@ public class WPayment extends Window log.fine("Old Payment(1) - " + m_mPaymentOriginal); m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); - m_mPaymentOriginal.save(); + m_mPaymentOriginal.saveEx(); if (ok) log.info( "Payment Canecelled - " + m_mPaymentOriginal); else @@ -1188,7 +1188,7 @@ public class WPayment extends Window { m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); - m_mPaymentOriginal.save(); + m_mPaymentOriginal.saveEx(); if (ok) // Cancel Payment { log.fine("PaymentCancelled " + m_mPayment.getDocumentNo ()); @@ -1591,12 +1591,12 @@ public class WPayment extends Window approved = m_mPayment.processOnline(); info = m_mPayment.getR_RespMsg() + " (" + m_mPayment.getR_AuthCode() + ") ID=" + m_mPayment.getR_PnRef(); - m_mPayment.save(); + m_mPayment.saveEx(); if (approved) { boolean ok = m_mPayment.processIt(DocAction.ACTION_Complete); - m_mPayment.save(); + m_mPayment.saveEx(); if (ok) FDialog.info(m_WindowNo, this, "PaymentProcessed", info + "\n" + m_mPayment.getDocumentNo()); else diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPopupItem.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPopupItem.java index 4b0c46f51f..1b28eeabdd 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPopupItem.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPopupItem.java @@ -59,7 +59,7 @@ public class WFPopupItem extends Menuitem { int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx()); MWFNodeNext newLine = new MWFNodeNext(m_node, m_AD_WF_NodeTo_ID); newLine.setClientOrg(AD_Client_ID, 0); - newLine.save(); + newLine.saveEx(); log.info("Add Line to " + m_node + " -> " + newLine); wfp.reload(m_AD_Workflow_ID); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java index 9fd668c2fc..24a7e0b93a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java @@ -449,7 +449,7 @@ public class WAttachment extends Window implements EventListener { m_attachment.setBinaryData(new byte[0]); // ATTENTION! HEAVY HACK HERE... Else it will not save :( m_attachment.setTextMsg(text.getText()); - m_attachment.save(); + m_attachment.saveEx(); } } else diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/InvoicePrint.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/InvoicePrint.java index d830331279..876122c64d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/InvoicePrint.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/process/InvoicePrint.java @@ -313,7 +313,7 @@ public class InvoicePrint extends SvrProcess // String msg = email.send(); MUserMail um = new MUserMail(mText, getAD_User_ID(), email); - um.save(); + um.saveEx(); if (msg.equals(EMail.SENT_OK)) { addLog (C_Invoice_ID, null, null, diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java index 8c6d496a09..8914c56c67 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java @@ -1005,7 +1005,7 @@ public final class WAccountDialog extends Window C_Project_ID, C_Campaign_ID, C_Activity_ID, User1_ID, User2_ID, 0, 0); if (acct != null && acct.get_ID() == 0) - acct.save(); + acct.saveEx(); // Show Info if (acct == null || acct.get_ID() == 0) @@ -1016,7 +1016,7 @@ public final class WAccountDialog extends Window if (Alias != null && Alias.length() > 0) { acct.setAlias(Alias); - acct.save(); + acct.saveEx(); } loadInfo (acct.get_ID(), s_AcctSchema.getC_AcctSchema_ID()); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WChat.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WChat.java index 517f3662a2..a8b6cf4797 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WChat.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WChat.java @@ -170,9 +170,9 @@ public class WChat extends Window implements EventListener { log.config(data); if (m_chat.get_ID() == 0) - m_chat.save(); + m_chat.saveEx(); MChatEntry entry = new MChatEntry(m_chat, data); - entry.save(); + entry.saveEx(); } // data to be saved } dispose(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java index 828dbbdd13..24a623fd00 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java @@ -470,7 +470,7 @@ public class WEMailDialog extends Window implements EventListener, ValueChangeLi status = email.send(); // if (m_user != null) - new MUserMail(m_user, m_user.getAD_User_ID(), email).save(); + new MUserMail(m_user, m_user.getAD_User_ID(), email).saveEx(); if (email.isSentOK()) { FDialog.info(0, this, "MessageSent"); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Match.java b/org.adempiere.ui/src/org/compiere/apps/form/Match.java index 88be94851f..9aaaf9bf6c 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Match.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Match.java @@ -410,7 +410,7 @@ public class Match iLine.setM_InOutLine_ID(M_InOutLine_ID); if (sLine.getC_OrderLine_ID() != 0) iLine.setC_OrderLine_ID(sLine.getC_OrderLine_ID()); - iLine.save(); + iLine.saveEx(); // Create Shipment - Invoice Link if (iLine.getM_Product_ID() != 0) { @@ -444,7 +444,7 @@ public class Match { // Update Shipment Line sLine.setC_OrderLine_ID(Line_ID); - sLine.save(); + sLine.saveEx(); // Update Order Line MOrderLine oLine = new MOrderLine(Env.getCtx(), Line_ID, trxName); if (oLine.get_ID() != 0) // other in MInOut.completeIt diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Merge.java b/org.adempiere.ui/src/org/compiere/apps/form/Merge.java index 1959068b10..9baa59df8f 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Merge.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Merge.java @@ -266,18 +266,18 @@ public class Merge { MPayment payment = payments[i]; if (payment.testAllocation()) - payment.save(); + payment.saveEx(); } MInvoice[] invoices = MInvoice.getOfBPartner(Env.getCtx(), bp.getC_BPartner_ID(), null); for (int i = 0; i < invoices.length; i++) { MInvoice invoice = invoices[i]; if (invoice.testAllocation()) - invoice.save(); + invoice.saveEx(); } bp.setTotalOpenBalance(); bp.setActualLifeTimeValue(); - bp.save(); + bp.saveEx(); } } else if (ColumnName.equals(M_PRODUCT_ID)) diff --git a/org.adempiere.ui/src/org/compiere/apps/form/TreeMaintenance.java b/org.adempiere.ui/src/org/compiere/apps/form/TreeMaintenance.java index 3854593989..f1d09647d2 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/TreeMaintenance.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/TreeMaintenance.java @@ -100,22 +100,22 @@ public class TreeMaintenance { if (m_tree.isProduct()) { MTree_NodePR node = new MTree_NodePR (m_tree, item.id); - node.save(); + node.saveEx(); } else if (m_tree.isBPartner()) { MTree_NodeBP node = new MTree_NodeBP (m_tree, item.id); - node.save(); + node.saveEx(); } else if (m_tree.isMenu()) { MTree_NodeMM node = new MTree_NodeMM (m_tree, item.id); - node.save(); + node.saveEx(); } else { MTree_Node node = new MTree_Node (m_tree, item.id); - node.save(); + node.saveEx(); } } } // action_treeAdd diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/AssetServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/AssetServlet.java index 5499846895..240c9d6cf6 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/AssetServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/AssetServlet.java @@ -303,8 +303,8 @@ public class AssetServlet extends HttpServlet // Delivery Record ad.setDeliveryConfirmation(msg); - ad.save(); - asset.save(); + ad.saveEx(); + asset.saveEx(); } catch (IOException ex) { @@ -319,7 +319,7 @@ public class AssetServlet extends HttpServlet msg = msg.substring (0, 119); ad.setDeliveryConfirmation (msg); ad.save (); - // asset.save(); not delivered + // asset.saveEx(); not delivered } catch (Exception ex1) { diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/InvoiceServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/InvoiceServlet.java index f2c8287db2..7750d25d71 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/InvoiceServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/InvoiceServlet.java @@ -210,7 +210,7 @@ public class InvoiceServlet extends HttpServlet if (file != null) { invoice.setDatePrinted (new Timestamp(System.currentTimeMillis())); - invoice.save(); + invoice.saveEx(); } } // Issue Error diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/NoteServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/NoteServlet.java index 3f7d58c77c..fa28bd64a5 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/NoteServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/NoteServlet.java @@ -220,7 +220,7 @@ public class NoteServlet extends HttpServlet if (note.get_ID() == AD_Note_ID) { note.setProcessed(true); - note.save(); + note.saveEx(); log.fine("doPost - " + note); } } diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java index af9b9c41a3..0ddf44ce26 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java @@ -301,7 +301,7 @@ public class OrderServlet extends HttpServlet } order.setDocAction (DocAction, true); // force creation boolean ok = order.processIt (DocAction); - order.save(); + order.saveEx(); return ok; } // processOrder diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java index 103b779374..d32ced7017 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java @@ -198,7 +198,7 @@ public class PaymentServlet extends HttpServlet // BP Info p.setBP_BankAccount(wu.getBankAccount()); // - // p.save(); + // p.saveEx(); session.setAttribute (ATTR_PAYMENT, p); String url = "/paymentInfo.jsp"; @@ -277,7 +277,7 @@ public class PaymentServlet extends HttpServlet log.warning("No Order"); // payment.processIt(DocAction.ACTION_Complete); - payment.save(); + payment.saveEx(); sendThanksEMail (request, ctx, payment, wu, wo); } else diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestServlet.java index bf47942fc0..dda068407c 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestServlet.java @@ -417,7 +417,7 @@ public class RequestServlet extends HttpServlet { String msg = Msg.parseTranslation(ctx, "@Added@: @AD_Attachment_ID@ " + fileName); req.webUpdate(msg); - req.save(); + req.saveEx(); WebUtil.createForwardPage(response, msg, "requests.jsp", 10); } else diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebOrder.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebOrder.java index bd21e8c02f..103ab79dc6 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebOrder.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebOrder.java @@ -97,7 +97,7 @@ public class WebOrder // m_order.setSendEMail(true); m_order.setDocAction(MOrder.DOCACTION_Prepare); - m_order.save(); + m_order.saveEx(); log.fine("ID=" + m_order.getC_Order_ID() + ", DocNo=" + m_order.getDocumentNo()); @@ -111,10 +111,10 @@ public class WebOrder ol.setPrice(); ol.setPrice(wbl.getPrice()); ol.setTax(); - ol.save(); + ol.saveEx(); } // for all lines boolean ok = m_order.processIt (MOrder.DOCACTION_Prepare); - m_order.save(); + m_order.saveEx(); // Web User = Customer if (!wu.isCustomer()) @@ -152,11 +152,11 @@ public class WebOrder if (m_order == null) return false; if (payment.get_ID() == 0) - payment.save(); + payment.saveEx(); m_order.setC_Payment_ID (payment.getC_Payment_ID()); m_order.setDocAction (MOrder.DOCACTION_WaitComplete); boolean ok = m_order.processIt (MOrder.DOCACTION_WaitComplete); - m_order.save(); + m_order.saveEx(); // payment.setC_Order_ID (m_order.getC_Order_ID()); payment.setC_Invoice_ID (getInvoice_ID()); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WorkflowServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WorkflowServlet.java index baecad4fd7..12142ccc91 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WorkflowServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WorkflowServlet.java @@ -237,7 +237,7 @@ public class WorkflowServlet extends HttpServlet { act.setUserChoice(wu.getAD_User_ID(), isApproved ? "Y" : "N", DisplayType.YesNo, textMsg); - act.save(); + act.saveEx(); } catch (Exception e) { @@ -246,12 +246,12 @@ public class WorkflowServlet extends HttpServlet else if (act.isUserManual() && isConfirmed) { act.setUserConfirmation(wu.getAD_User_ID(), textMsg); - act.save(); + act.saveEx(); } else if (textMsg != null && textMsg.length() > 0) { act.setTextMsg (textMsg); - act.save(); + act.saveEx(); } } }