diff --git a/base/src/org/adempiere/pipo/handler/ColumnElementHandler.java b/base/src/org/adempiere/pipo/handler/ColumnElementHandler.java index c10fe796b8..ea2ca2d335 100644 --- a/base/src/org/adempiere/pipo/handler/ColumnElementHandler.java +++ b/base/src/org/adempiere/pipo/handler/ColumnElementHandler.java @@ -207,7 +207,7 @@ public class ColumnElementHandler extends AbstractElementHandler { if (!recreateColumn) { String oldDefault = (String) m_Column .get_ValueOld("DefaultValue"); - String newDefault = (String) m_Column.get_Value("DefaultValue"); + String newDefault = m_Column.getDefaultValue(); if (oldDefault != null && oldDefault.length() == 0) oldDefault = null; if (newDefault != null && newDefault.length() == 0) diff --git a/base/src/org/compiere/FA/CreateGLAsset.java b/base/src/org/compiere/FA/CreateGLAsset.java index 719b0b79d0..0a4ccd7601 100644 --- a/base/src/org/compiere/FA/CreateGLAsset.java +++ b/base/src/org/compiere/FA/CreateGLAsset.java @@ -84,7 +84,7 @@ public class CreateGLAsset extends SvrProcess pstmt = null; pstmt = DB.prepareStatement(sql,get_TrxName()); if(asset.getA_Asset_ID()==0) { - Number groupId = (Number)JVLine.get_Value(I_CustomColumn.A_Asset_Group_ID); + Number groupId = (Number)JVLine.getA_Asset_Group_ID(); pstmt.setInt(1, groupId != null ? groupId.intValue() : 0); } else pstmt.setInt(1, asset.getA_Asset_Group_ID()); diff --git a/base/src/org/compiere/FA/CreateInvoicedAsset.java b/base/src/org/compiere/FA/CreateInvoicedAsset.java index b2bbd739c7..d9d6797a07 100644 --- a/base/src/org/compiere/FA/CreateInvoicedAsset.java +++ b/base/src/org/compiere/FA/CreateInvoicedAsset.java @@ -102,7 +102,7 @@ public class CreateInvoicedAsset extends SvrProcess PreparedStatement pstmt1 = null; pstmt1 = DB.prepareStatement(sqla,get_TrxName()); if(asset.getA_Asset_ID()==0) { - Number groupId = (Number)InvoiceLine.get_Value(I_CustomColumn.A_Asset_Group_ID); + Number groupId = (Number)InvoiceLine.getA_Asset_Group_ID(); pstmt1.setInt(1, groupId != null ? groupId.intValue() : 0); } else pstmt1.setInt(1, asset.getA_Asset_Group_ID()); diff --git a/base/src/org/compiere/model/MAlertRecipient.java b/base/src/org/compiere/model/MAlertRecipient.java index eaee08a750..321e40b2ee 100644 --- a/base/src/org/compiere/model/MAlertRecipient.java +++ b/base/src/org/compiere/model/MAlertRecipient.java @@ -58,7 +58,7 @@ public class MAlertRecipient extends X_AD_AlertRecipient */ public int getAD_User_ID () { - Integer ii = (Integer)get_Value("AD_User_ID"); + Integer ii = super.getAD_User_ID(); if (ii == null) return -1; return ii.intValue(); @@ -71,7 +71,7 @@ public class MAlertRecipient extends X_AD_AlertRecipient */ public int getAD_Role_ID () { - Integer ii = (Integer)get_Value("AD_Role_ID"); + Integer ii = super.getAD_Role_ID(); if (ii == null) return -1; return ii.intValue(); diff --git a/base/src/org/compiere/model/MPInstancePara.java b/base/src/org/compiere/model/MPInstancePara.java index 578b2a6ec6..dae659f49e 100644 --- a/base/src/org/compiere/model/MPInstancePara.java +++ b/base/src/org/compiere/model/MPInstancePara.java @@ -94,11 +94,11 @@ public class MPInstancePara extends X_AD_PInstance_Para if (getP_String_To() != null) sb.append(" - ").append(getP_String_To()); } - BigDecimal bd = (BigDecimal)get_Value("P_Number"); + BigDecimal bd = getP_Number(); if (bd != null) { sb.append("(n)=").append(bd); - BigDecimal bd2 = (BigDecimal)get_Value("P_Number_To"); + BigDecimal bd2 = getP_Number_To(); if (bd2 != null) sb.append(" - ").append(bd2); } diff --git a/base/src/org/compiere/model/MXIFAJournal.java b/base/src/org/compiere/model/MXIFAJournal.java index 47ea463bb1..6f3f18a45f 100644 --- a/base/src/org/compiere/model/MXIFAJournal.java +++ b/base/src/org/compiere/model/MXIFAJournal.java @@ -72,7 +72,7 @@ public class MXIFAJournal extends X_I_FAJournal { * Get Currency Type. Currency Conversion Rate Type */ public int getC_ConversionType_ID() { - Integer ii = (Integer) get_Value("C_ConversionType_ID"); + Integer ii = getC_ConversionType_ID(); if (ii == null) return 0; return ii.intValue(); diff --git a/base/src/org/compiere/print/MPrintFont.java b/base/src/org/compiere/print/MPrintFont.java index 7353178cdc..f24d34db9f 100644 --- a/base/src/org/compiere/print/MPrintFont.java +++ b/base/src/org/compiere/print/MPrintFont.java @@ -56,7 +56,7 @@ public class MPrintFont extends X_AD_PrintFont { if (m_cacheFont != null) return m_cacheFont; - String code = (String)get_Value("Code"); + String code = getCode(); if (code == null || code.equals(".")) m_cacheFont = new Font (null); try diff --git a/base/src/org/compiere/process/CommissionCalc.java b/base/src/org/compiere/process/CommissionCalc.java index dc4ce97001..a0adfd0fa1 100644 --- a/base/src/org/compiere/process/CommissionCalc.java +++ b/base/src/org/compiere/process/CommissionCalc.java @@ -221,9 +221,9 @@ public class CommissionCalc extends SvrProcess sql.append(" AND l.M_Product_ID IN " + "(SELECT M_Product_ID FROM M_Product WHERE M_Product_Category_ID=").append(lines[i].getM_Product_Category_ID()).append(")"); // Payment Rule - if (lines[i].get_Value("PaymentRule") != null) + if (lines[i].getPaymentRule() != null) sql.append(" AND h.PaymentRule IN " - + "(SELECT AD_Ref_List_ID FROM AD_Ref_List WHERE AD_Reference_ID=195 and value = '").append((String)lines[i].get_Value("PaymentRule")).append("')"); + + "(SELECT AD_Ref_List_ID FROM AD_Ref_List WHERE AD_Reference_ID=195 and value = '").append(lines[i].getPaymentRule()).append("')"); // Grouping if (!m_com.isListDetails()) sql.append(" GROUP BY h.C_Currency_ID"); diff --git a/base/src/org/eevolution/model/MCost.java b/base/src/org/eevolution/model/MCost.java index cb02e12099..74c182e7d5 100644 --- a/base/src/org/eevolution/model/MCost.java +++ b/base/src/org/eevolution/model/MCost.java @@ -183,7 +183,7 @@ public class MCost extends org.compiere.model.MCost { boolean result = super.beforeSave(newRecord); //setCumulatedAmt(getCumulatedAmt().add(getCurrentCostPriceLL())); - setCumulatedAmt(getCumulatedAmt().add((BigDecimal)get_Value("CurrentCostPrice"))); + setCumulatedAmt(getCumulatedAmt().add(getCurrentCostPrice())); return result; } diff --git a/base/src/org/eevolution/model/MPPOrder.java b/base/src/org/eevolution/model/MPPOrder.java index 64cd75c167..cc01902182 100644 --- a/base/src/org/eevolution/model/MPPOrder.java +++ b/base/src/org/eevolution/model/MPPOrder.java @@ -679,7 +679,7 @@ public class MPPOrder extends X_PP_Order implements DocAction { PP_Order_Workflow.setValue(AD_Workflow.getValue()); //PP_Order_Workflow.setQtyBatchSize(AD_Workflow.getQtyBatchSize()); PP_Order_Workflow.setWorkflowType(AD_Workflow.getWorkflowType()); - PP_Order_Workflow.setQtyBatchSize((BigDecimal)AD_Workflow.get_Value("QtyBatchSize")); + PP_Order_Workflow.setQtyBatchSize(AD_Workflow.getQtyBatchSize()); PP_Order_Workflow.setName(AD_Workflow.getName()); PP_Order_Workflow.setAccessLevel(AD_Workflow.getAccessLevel()); PP_Order_Workflow.setAuthor(AD_Workflow.getAuthor()); @@ -705,11 +705,11 @@ public class MPPOrder extends X_PP_Order implements DocAction { PP_Order_Workflow.setSetupTime(AD_Workflow.getSetupTime()); PP_Order_Workflow.setMovingTime(AD_Workflow.getMovingTime()); PP_Order_Workflow.setProcessType(AD_Workflow.getProcessType()); */ - PP_Order_Workflow.setS_Resource_ID((Integer)AD_Workflow.get_Value("S_Resource_ID")); - PP_Order_Workflow.setQueuingTime((Integer)AD_Workflow.get_Value("QueuingTime")); - PP_Order_Workflow.setSetupTime((Integer)AD_Workflow.get_Value("SetupTime")); - PP_Order_Workflow.setMovingTime((Integer)AD_Workflow.get_Value("MovingTime")); - PP_Order_Workflow.setProcessType((String)AD_Workflow.get_Value("ProcessType")); + PP_Order_Workflow.setS_Resource_ID(AD_Workflow.getS_Resource_ID()); + PP_Order_Workflow.setQueuingTime(AD_Workflow.getQueuingTime()); + PP_Order_Workflow.setSetupTime(AD_Workflow.getSetupTime()); + PP_Order_Workflow.setMovingTime(AD_Workflow.getMovingTime()); + PP_Order_Workflow.setProcessType(AD_Workflow.getProcessType()); // 4Layers @@ -726,18 +726,18 @@ public class MPPOrder extends X_PP_Order implements DocAction { boolean ValidFromNode = true; boolean ValidToNode = true; //if (AD_WF_Node[g].getValidFrom() != null ) - if ((Timestamp) AD_WF_Node[g].get_Value("ValidFrom")!= null ) + if (AD_WF_Node[g].getValidFrom() != null) { //ValidFromNode = getDateStartSchedule().compareTo(AD_WF_Node[g].getValidFrom()) >= 0 ? true : false; - ValidFromNode = getDateStartSchedule().compareTo((Timestamp) AD_WF_Node[g].get_Value("ValidFrom")) >= 0 ? true : false; + ValidFromNode = getDateStartSchedule().compareTo(AD_WF_Node[g].getValidFrom()) >= 0 ? true : false; } //if (AD_WF_Node[g].getValidTo() != null ) - if ((Timestamp)AD_WF_Node[g].get_Value("ValidTo") != null ) + if (AD_WF_Node[g].getValidTo() != null ) { //ValidToNode = getDateStartSchedule().compareTo(AD_WF_Node[g].getValidTo()) <= 0 ? true : false; - ValidToNode = getDateStartSchedule().compareTo((Timestamp)AD_WF_Node[g].get_Value("ValidTo")) <= 0 ? true : false; + ValidToNode = getDateStartSchedule().compareTo(AD_WF_Node[g].getValidTo()) <= 0 ? true : false; } if (ValidFromNode && ValidToNode) @@ -761,23 +761,23 @@ public class MPPOrder extends X_PP_Order implements DocAction { PP_Order_Node.setSubflowExecution (AD_WF_Node[g].getSubflowExecution()); PP_Order_Node.setValue(AD_WF_Node[g].getValue()); //PP_Order_Node.setS_Resource_ID(AD_WF_Node[g].getS_Resource_ID()); - PP_Order_Node.setS_Resource_ID(((Integer)AD_WF_Node[g].get_Value("S_Resource_ID")).intValue()); + PP_Order_Node.setS_Resource_ID(AD_WF_Node[g].getS_Resource_ID()); //PP_Order_Node.setSetupTime(AD_WF_Node[g].getSetupTime()); - PP_Order_Node.setSetupTime(((Integer)AD_WF_Node[g].get_Value("SetupTime")).intValue()); + PP_Order_Node.setSetupTime(AD_WF_Node[g].getSetupTime()); //PP_Order_Node.setSetupTimeRequiered(AD_WF_Node[g].getSetupTime()); - PP_Order_Node.setSetupTimeRequiered(((Integer)AD_WF_Node[g].get_Value("SetupTime")).intValue()); + PP_Order_Node.setSetupTimeRequiered(AD_WF_Node[g].getSetupTime()); BigDecimal time = new BigDecimal(AD_WF_Node[g].getDuration()).multiply(getQtyOrdered()); PP_Order_Node.setDurationRequiered(time.intValue()); //PP_Order_Node.setMovingTime(AD_WF_Node[g].getMovingTime()); - PP_Order_Node.setMovingTime(((Integer)AD_WF_Node[g].get_Value("MovingTime")).intValue()); + PP_Order_Node.setMovingTime(AD_WF_Node[g].getMovingTime()); PP_Order_Node.setWaitingTime(AD_WF_Node[g].getWaitingTime()); PP_Order_Node.setWorkingTime(AD_WF_Node[g].getWorkingTime());; //PP_Order_Node.setQueuingTime(AD_WF_Node[g].getQueuingTime()); - PP_Order_Node.setQueuingTime(((Integer)AD_WF_Node[g].get_Value("QueuingTime")).intValue()); + PP_Order_Node.setQueuingTime(AD_WF_Node[g].getQueuingTime()); PP_Order_Node.setXPosition(AD_WF_Node[g].getXPosition()); //e-evolution generatemodel PP_Order_Node.setYPosition(AD_WF_Node[g].getYPosition()); //e-evolution generatemodel //PP_Order_Node.setS_Resource_ID(AD_WF_Node[g].getS_Resource_ID()); - PP_Order_Node.setS_Resource_ID(((Integer)AD_WF_Node[g].get_Value("S_Resource_ID")).intValue()); + PP_Order_Node.setS_Resource_ID(AD_WF_Node[g].getS_Resource_ID()); PP_Order_Node.setDocAction(AD_WF_Node[g].getDocAction()); PP_Order_Node.save(get_TrxName()); @@ -1396,7 +1396,7 @@ public class MPPOrder extends X_PP_Order implements DocAction { PP_Order_Cost.setCumulatedAmt(cost[j].getCumulatedAmt()); PP_Order_Cost.setCumulatedQty(cost[j].getCumulatedQty()); //PP_Order_Cost.setCurrentCostPriceLL(cost[j].getCurrentCostPriceLL()); - PP_Order_Cost.setCurrentCostPriceLL((BigDecimal)cost[j].get_Value("CurrentCostPriceLL")); + PP_Order_Cost.setCurrentCostPriceLL((BigDecimal)cost[j].get_Value("CurrentCostPriceLL")); // column doesn't exist !!! PP_Order_Cost.setCurrentCostPrice(cost[j].getCurrentCostPrice()); PP_Order_Cost.setM_Product_ID(getM_Product_ID()); PP_Order_Cost.setM_AttributeSetInstance_ID(cost[j].getM_AttributeSetInstance_ID()); diff --git a/base/src/org/eevolution/process/RollupWorkflow.java b/base/src/org/eevolution/process/RollupWorkflow.java index 63f10bed2e..a8329d112e 100644 --- a/base/src/org/eevolution/process/RollupWorkflow.java +++ b/base/src/org/eevolution/process/RollupWorkflow.java @@ -200,11 +200,11 @@ public class RollupWorkflow extends SvrProcess { MWFNode node = (MWFNode) nodes[i]; //BigDecimal rate = getRate(CostElementType , node.getS_Resource_ID() , AD_Org_ID , C_AcctSchema_ID , M_CostType_ID); - BigDecimal rate = getRate(CostElementType , ((Integer)node.get_Value("S_Resource_ID")).intValue() , AD_Org_ID , C_AcctSchema_ID , M_CostType_ID); + BigDecimal rate = getRate(CostElementType, node.getS_Resource_ID(), AD_Org_ID , C_AcctSchema_ID , M_CostType_ID); String sql = "SELECT CASE WHEN ow.DurationUnit = 's' THEN 1 * ( (onode.SetupTime/ow.QtyBatchSize) + onode.Duration ) WHEN ow.DurationUnit = 'm' THEN 60 * ( (onode.SetupTime/ow.QtyBatchSize) + onode.Duration) WHEN ow.DurationUnit = 'h' THEN 3600 * ( (onode.SetupTime/ow.QtyBatchSize) + onode.Duration) WHEN ow.DurationUnit = 'Y' THEN 31536000 * ( (onode.SetupTime/ow.QtyBatchSize) + onode.Duration) WHEN ow.DurationUnit = 'M' THEN 2592000 * ( (onode.SetupTime/ow.QtyBatchSize) + onode.Duration ) WHEN ow.DurationUnit = 'D' THEN 86400 * ((onode.SetupTime/ow.QtyBatchSize) + onode.Duration) END AS load FROM AD_WF_Node onode INNER JOIN AD_Workflow ow ON (ow.AD_Workflow_ID = onode.AD_Workflow_ID) WHERE onode.AD_WF_Node_ID = ? AND onode.AD_Client_ID = ?" ; int seconds = DB.getSQLValue(null,sql,node.getAD_WF_Node_ID(),node.getAD_Client_ID()); //int C_UOM_ID = DB.getSQLValue(null,"SELECT C_UOM_ID FROM M_Product WHERE S_Resource_ID = ? " , node.getS_Resource_ID()); - int C_UOM_ID = DB.getSQLValue(null,"SELECT C_UOM_ID FROM M_Product WHERE S_Resource_ID = ? " , ((Integer)node.get_Value("S_Resource_ID")).intValue()); + int C_UOM_ID = DB.getSQLValue(null,"SELECT C_UOM_ID FROM M_Product WHERE S_Resource_ID = ? " , node.getS_Resource_ID()); MUOM oum = new MUOM(getCtx(),C_UOM_ID,null); if (oum.isHour()) { diff --git a/client/src/org/eevolution/form/crp/CRPDatasetFactory.java b/client/src/org/eevolution/form/crp/CRPDatasetFactory.java index 96393ce71f..6059d3c0d3 100644 --- a/client/src/org/eevolution/form/crp/CRPDatasetFactory.java +++ b/client/src/org/eevolution/form/crp/CRPDatasetFactory.java @@ -86,12 +86,12 @@ public abstract class CRPDatasetFactory extends CRPReasoner implements CRPModel MResourceType t = new MResourceType(Env.getCtx(), r.getS_ResourceType_ID(), null); //BigDecimal utilization = r.getPercentUtilization(); - BigDecimal utilization = (BigDecimal) r.get_Value("PercentUtilization"); + BigDecimal utilization = r.getPercentUtilization(); BigDecimal dailyCapacity = null; if(BigDecimal.ZERO.compareTo(utilization) < 0) { //dailyCapacity = r.getDailyCapacity().divide(utilization.divide(new BigDecimal(100)), 8, BigDecimal.ROUND_HALF_DOWN); - dailyCapacity = ((BigDecimal)r.get_Value("DailyCapacity")).divide(utilization.divide(new BigDecimal(100)), 8, BigDecimal.ROUND_HALF_DOWN); + dailyCapacity = (r.getDailyCapacity()).divide(utilization.divide(new BigDecimal(100)), 8, BigDecimal.ROUND_HALF_DOWN); } else { @@ -275,7 +275,7 @@ public abstract class CRPDatasetFactory extends CRPReasoner implements CRPModel protected BigDecimal getMaxRange(MResource r) { //return r.getDailyCapacity().divide(r.getPercentUtilization().divide(new BigDecimal(100))); - return ((BigDecimal)r.get_Value("DailyCapacity")).divide(((BigDecimal)r.get_Value("PercentUtilization")).divide(new BigDecimal(100))); + return (r.getDailyCapacity()).divide((r.getPercentUtilization()).divide(new BigDecimal(100))); }