1 2 package org.compiere.model; 3 import java.util.*; 4 import java.sql.*; 5 import java.math.*; 6 import java.io.Serializable ; 7 import org.compiere.util.*; 8 10 public class X_M_Freight extends PO 11 { 12 13 public X_M_Freight (Properties ctx, int M_Freight_ID) 14 { 15 super (ctx, M_Freight_ID); 16 26 } 27 28 public X_M_Freight (Properties ctx, ResultSet rs) 29 { 30 super (ctx, rs); 31 } 32 33 protected POInfo initPO (Properties ctx) 34 { 35 int AD_Table_ID = 596; 36 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 37 return poi; 38 } 39 public String toString() 40 { 41 StringBuffer sb = new StringBuffer ("X_M_Freight[").append(getID()).append("]"); 42 return sb.toString(); 43 } 44 public void setC_Country_ID (int C_Country_ID) 45 { 46 if (C_Country_ID == 0) setValue ("C_Country_ID", null); 47 else 48 setValue ("C_Country_ID", new Integer (C_Country_ID)); 49 } 50 public int getC_Country_ID() 51 { 52 Integer ii = (Integer )getValue("C_Country_ID"); 53 if (ii == null) return 0; 54 return ii.intValue(); 55 } 56 public void setC_Currency_ID (int C_Currency_ID) 57 { 58 setValue ("C_Currency_ID", new Integer (C_Currency_ID)); 59 } 60 public int getC_Currency_ID() 61 { 62 Integer ii = (Integer )getValue("C_Currency_ID"); 63 if (ii == null) return 0; 64 return ii.intValue(); 65 } 66 public void setC_Region_ID (int C_Region_ID) 67 { 68 if (C_Region_ID == 0) setValue ("C_Region_ID", null); 69 else 70 setValue ("C_Region_ID", new Integer (C_Region_ID)); 71 } 72 public int getC_Region_ID() 73 { 74 Integer ii = (Integer )getValue("C_Region_ID"); 75 if (ii == null) return 0; 76 return ii.intValue(); 77 } 78 public void setFreightAmt (BigDecimal FreightAmt) 79 { 80 if (FreightAmt == null) throw new IllegalArgumentException ("FreightAmt is mandatory"); 81 setValue ("FreightAmt", FreightAmt); 82 } 83 public BigDecimal getFreightAmt() 84 { 85 BigDecimal bd = (BigDecimal)getValue("FreightAmt"); 86 if (bd == null) return Env.ZERO; 87 return bd; 88 } 89 public void setM_FreightCategory_ID (int M_FreightCategory_ID) 90 { 91 setValue ("M_FreightCategory_ID", new Integer (M_FreightCategory_ID)); 92 } 93 public int getM_FreightCategory_ID() 94 { 95 Integer ii = (Integer )getValue("M_FreightCategory_ID"); 96 if (ii == null) return 0; 97 return ii.intValue(); 98 } 99 void setM_Freight_ID (int M_Freight_ID) 100 { 101 setValueNoCheck ("M_Freight_ID", new Integer (M_Freight_ID)); 102 } 103 public int getM_Freight_ID() 104 { 105 Integer ii = (Integer )getValue("M_Freight_ID"); 106 if (ii == null) return 0; 107 return ii.intValue(); 108 } 109 void setM_Shipper_ID (int M_Shipper_ID) 110 { 111 setValueNoCheck ("M_Shipper_ID", new Integer (M_Shipper_ID)); 112 } 113 public int getM_Shipper_ID() 114 { 115 Integer ii = (Integer )getValue("M_Shipper_ID"); 116 if (ii == null) return 0; 117 return ii.intValue(); 118 } 119 public void setTo_Country_ID (int To_Country_ID) 120 { 121 if (To_Country_ID == 0) setValue ("To_Country_ID", null); 122 else 123 setValue ("To_Country_ID", new Integer (To_Country_ID)); 124 } 125 public int getTo_Country_ID() 126 { 127 Integer ii = (Integer )getValue("To_Country_ID"); 128 if (ii == null) return 0; 129 return ii.intValue(); 130 } 131 public void setTo_Region_ID (int To_Region_ID) 132 { 133 if (To_Region_ID == 0) setValue ("To_Region_ID", null); 134 else 135 setValue ("To_Region_ID", new Integer (To_Region_ID)); 136 } 137 public int getTo_Region_ID() 138 { 139 Integer ii = (Integer )getValue("To_Region_ID"); 140 if (ii == null) return 0; 141 return ii.intValue(); 142 } 143 public void setValidFrom (Timestamp ValidFrom) 144 { 145 if (ValidFrom == null) throw new IllegalArgumentException ("ValidFrom is mandatory"); 146 setValue ("ValidFrom", ValidFrom); 147 } 148 public Timestamp getValidFrom() 149 { 150 return (Timestamp)getValue("ValidFrom"); 151 } 152 } 153 | Popular Tags |