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_DiscountSchemaLine extends PO 11 { 12 13 public X_M_DiscountSchemaLine (Properties ctx, int M_DiscountSchemaLine_ID) 14 { 15 super (ctx, M_DiscountSchemaLine_ID); 16 43 } 44 45 public X_M_DiscountSchemaLine (Properties ctx, ResultSet rs) 46 { 47 super (ctx, rs); 48 } 49 50 protected POInfo initPO (Properties ctx) 51 { 52 int AD_Table_ID = 477; 53 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 54 return poi; 55 } 56 public String toString() 57 { 58 StringBuffer sb = new StringBuffer ("X_M_DiscountSchemaLine[").append(getID()).append("]"); 59 return sb.toString(); 60 } 61 public void setC_BPartner_ID (int C_BPartner_ID) 62 { 63 if (C_BPartner_ID == 0) setValue ("C_BPartner_ID", null); 64 else 65 setValue ("C_BPartner_ID", new Integer (C_BPartner_ID)); 66 } 67 public int getC_BPartner_ID() 68 { 69 Integer ii = (Integer )getValue("C_BPartner_ID"); 70 if (ii == null) return 0; 71 return ii.intValue(); 72 } 73 public void setConversionDate (Timestamp ConversionDate) 74 { 75 if (ConversionDate == null) throw new IllegalArgumentException ("ConversionDate is mandatory"); 76 setValue ("ConversionDate", ConversionDate); 77 } 78 public Timestamp getConversionDate() 79 { 80 return (Timestamp)getValue("ConversionDate"); 81 } 82 public static final String CONVERSIONRATETYPE_Spot = "S"; 83 public static final String CONVERSIONRATETYPE_PeriodEnd = "P"; 84 public static final String CONVERSIONRATETYPE_None = "N"; 85 public static final String CONVERSIONRATETYPE_Fixed = "F"; 86 public static final String CONVERSIONRATETYPE_Average = "A"; 87 public static final String CONVERSIONRATETYPE_Company = "C"; 88 public static final String CONVERSIONRATETYPE_UserType = "U"; 89 public static final String CONVERSIONRATETYPE_ManualRate = "M"; 90 public void setConversionRateType (String ConversionRateType) 91 { 92 if (ConversionRateType.equals("S") || ConversionRateType.equals("P") || ConversionRateType.equals("N") || ConversionRateType.equals("F") || ConversionRateType.equals("A") || ConversionRateType.equals("C") || ConversionRateType.equals("U") || ConversionRateType.equals("M")); 93 else throw new IllegalArgumentException ("ConversionRateType Invalid value - Reference_ID=111 - S - P - N - F - A - C - U - M"); 94 if (ConversionRateType == null) throw new IllegalArgumentException ("ConversionRateType is mandatory"); 95 setValue ("ConversionRateType", ConversionRateType); 96 } 97 public String getConversionRateType() 98 { 99 return (String )getValue("ConversionRateType"); 100 } 101 public void setLimit_AddAmt (BigDecimal Limit_AddAmt) 102 { 103 if (Limit_AddAmt == null) throw new IllegalArgumentException ("Limit_AddAmt is mandatory"); 104 setValue ("Limit_AddAmt", Limit_AddAmt); 105 } 106 public BigDecimal getLimit_AddAmt() 107 { 108 BigDecimal bd = (BigDecimal)getValue("Limit_AddAmt"); 109 if (bd == null) return Env.ZERO; 110 return bd; 111 } 112 public static final String LIMIT_BASE_ListPrice = "L"; 113 public static final String LIMIT_BASE_StandardPrice = "S"; 114 public static final String LIMIT_BASE_LimitPOPrice = "X"; 115 public static final String LIMIT_BASE_FixedPrice = "F"; 116 public void setLimit_Base (String Limit_Base) 117 { 118 if (Limit_Base.equals("L") || Limit_Base.equals("S") || Limit_Base.equals("X") || Limit_Base.equals("F")); 119 else throw new IllegalArgumentException ("Limit_Base Invalid value - Reference_ID=194 - L - S - X - F"); 120 if (Limit_Base == null) throw new IllegalArgumentException ("Limit_Base is mandatory"); 121 setValue ("Limit_Base", Limit_Base); 122 } 123 public String getLimit_Base() 124 { 125 return (String )getValue("Limit_Base"); 126 } 127 public void setLimit_Discount (BigDecimal Limit_Discount) 128 { 129 if (Limit_Discount == null) throw new IllegalArgumentException ("Limit_Discount is mandatory"); 130 setValue ("Limit_Discount", Limit_Discount); 131 } 132 public BigDecimal getLimit_Discount() 133 { 134 BigDecimal bd = (BigDecimal)getValue("Limit_Discount"); 135 if (bd == null) return Env.ZERO; 136 return bd; 137 } 138 public void setLimit_Fixed (BigDecimal Limit_Fixed) 139 { 140 setValue ("Limit_Fixed", Limit_Fixed); 141 } 142 public BigDecimal getLimit_Fixed() 143 { 144 BigDecimal bd = (BigDecimal)getValue("Limit_Fixed"); 145 if (bd == null) return Env.ZERO; 146 return bd; 147 } 148 public void setLimit_MaxAmt (BigDecimal Limit_MaxAmt) 149 { 150 if (Limit_MaxAmt == null) throw new IllegalArgumentException ("Limit_MaxAmt is mandatory"); 151 setValue ("Limit_MaxAmt", Limit_MaxAmt); 152 } 153 public BigDecimal getLimit_MaxAmt() 154 { 155 BigDecimal bd = (BigDecimal)getValue("Limit_MaxAmt"); 156 if (bd == null) return Env.ZERO; 157 return bd; 158 } 159 public void setLimit_MinAmt (BigDecimal Limit_MinAmt) 160 { 161 if (Limit_MinAmt == null) throw new IllegalArgumentException ("Limit_MinAmt is mandatory"); 162 setValue ("Limit_MinAmt", Limit_MinAmt); 163 } 164 public BigDecimal getLimit_MinAmt() 165 { 166 BigDecimal bd = (BigDecimal)getValue("Limit_MinAmt"); 167 if (bd == null) return Env.ZERO; 168 return bd; 169 } 170 public static final String LIMIT_ROUNDING_CurrencyPrecision = "C"; 171 public static final String LIMIT_ROUNDING_WholeNumber00 = "0"; 172 public static final String LIMIT_ROUNDING_NoRounding = "N"; 173 public static final String LIMIT_ROUNDING_Quarter255075 = "Q"; 174 public static final String LIMIT_ROUNDING_Dime102030 = "D"; 175 public static final String LIMIT_ROUNDING_Nickel051015 = "5"; 176 public static final String LIMIT_ROUNDING_Ten10002000 = "T"; 177 public void setLimit_Rounding (String Limit_Rounding) 178 { 179 if (Limit_Rounding.equals("C") || Limit_Rounding.equals("0") || Limit_Rounding.equals("N") || Limit_Rounding.equals("Q") || Limit_Rounding.equals("D") || Limit_Rounding.equals("5") || Limit_Rounding.equals("T")); 180 else throw new IllegalArgumentException ("Limit_Rounding Invalid value - Reference_ID=155 - C - 0 - N - Q - D - 5 - T"); 181 if (Limit_Rounding == null) throw new IllegalArgumentException ("Limit_Rounding is mandatory"); 182 setValue ("Limit_Rounding", Limit_Rounding); 183 } 184 public String getLimit_Rounding() 185 { 186 return (String )getValue("Limit_Rounding"); 187 } 188 public void setList_AddAmt (BigDecimal List_AddAmt) 189 { 190 if (List_AddAmt == null) throw new IllegalArgumentException ("List_AddAmt is mandatory"); 191 setValue ("List_AddAmt", List_AddAmt); 192 } 193 public BigDecimal getList_AddAmt() 194 { 195 BigDecimal bd = (BigDecimal)getValue("List_AddAmt"); 196 if (bd == null) return Env.ZERO; 197 return bd; 198 } 199 public static final String LIST_BASE_ListPrice = "L"; 200 public static final String LIST_BASE_StandardPrice = "S"; 201 public static final String LIST_BASE_LimitPOPrice = "X"; 202 public static final String LIST_BASE_FixedPrice = "F"; 203 public void setList_Base (String List_Base) 204 { 205 if (List_Base.equals("L") || List_Base.equals("S") || List_Base.equals("X") || List_Base.equals("F")); 206 else throw new IllegalArgumentException ("List_Base Invalid value - Reference_ID=194 - L - S - X - F"); 207 if (List_Base == null) throw new IllegalArgumentException ("List_Base is mandatory"); 208 setValue ("List_Base", List_Base); 209 } 210 public String getList_Base() 211 { 212 return (String )getValue("List_Base"); 213 } 214 public void setList_Discount (BigDecimal List_Discount) 215 { 216 if (List_Discount == null) throw new IllegalArgumentException ("List_Discount is mandatory"); 217 setValue ("List_Discount", List_Discount); 218 } 219 public BigDecimal getList_Discount() 220 { 221 BigDecimal bd = (BigDecimal)getValue("List_Discount"); 222 if (bd == null) return Env.ZERO; 223 return bd; 224 } 225 public void setList_Fixed (BigDecimal List_Fixed) 226 { 227 setValue ("List_Fixed", List_Fixed); 228 } 229 public BigDecimal getList_Fixed() 230 { 231 BigDecimal bd = (BigDecimal)getValue("List_Fixed"); 232 if (bd == null) return Env.ZERO; 233 return bd; 234 } 235 public void setList_MaxAmt (BigDecimal List_MaxAmt) 236 { 237 if (List_MaxAmt == null) throw new IllegalArgumentException ("List_MaxAmt is mandatory"); 238 setValue ("List_MaxAmt", List_MaxAmt); 239 } 240 public BigDecimal getList_MaxAmt() 241 { 242 BigDecimal bd = (BigDecimal)getValue("List_MaxAmt"); 243 if (bd == null) return Env.ZERO; 244 return bd; 245 } 246 public void setList_MinAmt (BigDecimal List_MinAmt) 247 { 248 if (List_MinAmt == null) throw new IllegalArgumentException ("List_MinAmt is mandatory"); 249 setValue ("List_MinAmt", List_MinAmt); 250 } 251 public BigDecimal getList_MinAmt() 252 { 253 BigDecimal bd = (BigDecimal)getValue("List_MinAmt"); 254 if (bd == null) return Env.ZERO; 255 return bd; 256 } 257 public static final String LIST_ROUNDING_CurrencyPrecision = "C"; 258 public static final String LIST_ROUNDING_WholeNumber00 = "0"; 259 public static final String LIST_ROUNDING_NoRounding = "N"; 260 public static final String LIST_ROUNDING_Quarter255075 = "Q"; 261 public static final String LIST_ROUNDING_Dime102030 = "D"; 262 public static final String LIST_ROUNDING_Nickel051015 = "5"; 263 public static final String LIST_ROUNDING_Ten10002000 = "T"; 264 public void setList_Rounding (String List_Rounding) 265 { 266 if (List_Rounding.equals("C") || List_Rounding.equals("0") || List_Rounding.equals("N") || List_Rounding.equals("Q") || List_Rounding.equals("D") || List_Rounding.equals("5") || List_Rounding.equals("T")); 267 else throw new IllegalArgumentException ("List_Rounding Invalid value - Reference_ID=155 - C - 0 - N - Q - D - 5 - T"); 268 if (List_Rounding == null) throw new IllegalArgumentException ("List_Rounding is mandatory"); 269 setValue ("List_Rounding", List_Rounding); 270 } 271 public String getList_Rounding() 272 { 273 return (String )getValue("List_Rounding"); 274 } 275 void setM_DiscountSchemaLine_ID (int M_DiscountSchemaLine_ID) 276 { 277 setValueNoCheck ("M_DiscountSchemaLine_ID", new Integer (M_DiscountSchemaLine_ID)); 278 } 279 public int getM_DiscountSchemaLine_ID() 280 { 281 Integer ii = (Integer )getValue("M_DiscountSchemaLine_ID"); 282 if (ii == null) return 0; 283 return ii.intValue(); 284 } 285 void setM_DiscountSchema_ID (int M_DiscountSchema_ID) 286 { 287 setValueNoCheck ("M_DiscountSchema_ID", new Integer (M_DiscountSchema_ID)); 288 } 289 public int getM_DiscountSchema_ID() 290 { 291 Integer ii = (Integer )getValue("M_DiscountSchema_ID"); 292 if (ii == null) return 0; 293 return ii.intValue(); 294 } 295 public void setM_Product_Category_ID (int M_Product_Category_ID) 296 { 297 if (M_Product_Category_ID == 0) setValue ("M_Product_Category_ID", null); 298 else 299 setValue ("M_Product_Category_ID", new Integer (M_Product_Category_ID)); 300 } 301 public int getM_Product_Category_ID() 302 { 303 Integer ii = (Integer )getValue("M_Product_Category_ID"); 304 if (ii == null) return 0; 305 return ii.intValue(); 306 } 307 public void setM_Product_ID (int M_Product_ID) 308 { 309 if (M_Product_ID == 0) setValue ("M_Product_ID", null); 310 else 311 setValue ("M_Product_ID", new Integer (M_Product_ID)); 312 } 313 public int getM_Product_ID() 314 { 315 Integer ii = (Integer )getValue("M_Product_ID"); 316 if (ii == null) return 0; 317 return ii.intValue(); 318 } 319 public void setSeqNo (int SeqNo) 320 { 321 setValue ("SeqNo", new Integer (SeqNo)); 322 } 323 public int getSeqNo() 324 { 325 Integer ii = (Integer )getValue("SeqNo"); 326 if (ii == null) return 0; 327 return ii.intValue(); 328 } 329 public void setStd_AddAmt (BigDecimal Std_AddAmt) 330 { 331 if (Std_AddAmt == null) throw new IllegalArgumentException ("Std_AddAmt is mandatory"); 332 setValue ("Std_AddAmt", Std_AddAmt); 333 } 334 public BigDecimal getStd_AddAmt() 335 { 336 BigDecimal bd = (BigDecimal)getValue("Std_AddAmt"); 337 if (bd == null) return Env.ZERO; 338 return bd; 339 } 340 public static final String STD_BASE_ListPrice = "L"; 341 public static final String STD_BASE_StandardPrice = "S"; 342 public static final String STD_BASE_LimitPOPrice = "X"; 343 public static final String STD_BASE_FixedPrice = "F"; 344 public void setStd_Base (String Std_Base) 345 { 346 if (Std_Base.equals("L") || Std_Base.equals("S") || Std_Base.equals("X") || Std_Base.equals("F")); 347 else throw new IllegalArgumentException ("Std_Base Invalid value - Reference_ID=194 - L - S - X - F"); 348 if (Std_Base == null) throw new IllegalArgumentException ("Std_Base is mandatory"); 349 setValue ("Std_Base", Std_Base); 350 } 351 public String getStd_Base() 352 { 353 return (String )getValue("Std_Base"); 354 } 355 public void setStd_Discount (BigDecimal Std_Discount) 356 { 357 if (Std_Discount == null) throw new IllegalArgumentException ("Std_Discount is mandatory"); 358 setValue ("Std_Discount", Std_Discount); 359 } 360 public BigDecimal getStd_Discount() 361 { 362 BigDecimal bd = (BigDecimal)getValue("Std_Discount"); 363 if (bd == null) return Env.ZERO; 364 return bd; 365 } 366 public void setStd_Fixed (BigDecimal Std_Fixed) 367 { 368 setValue ("Std_Fixed", Std_Fixed); 369 } 370 public BigDecimal getStd_Fixed() 371 { 372 BigDecimal bd = (BigDecimal)getValue("Std_Fixed"); 373 if (bd == null) return Env.ZERO; 374 return bd; 375 } 376 public void setStd_MaxAmt (BigDecimal Std_MaxAmt) 377 { 378 if (Std_MaxAmt == null) throw new IllegalArgumentException ("Std_MaxAmt is mandatory"); 379 setValue ("Std_MaxAmt", Std_MaxAmt); 380 } 381 public BigDecimal getStd_MaxAmt() 382 { 383 BigDecimal bd = (BigDecimal)getValue("Std_MaxAmt"); 384 if (bd == null) return Env.ZERO; 385 return bd; 386 } 387 public void setStd_MinAmt (BigDecimal Std_MinAmt) 388 { 389 if (Std_MinAmt == null) throw new IllegalArgumentException ("Std_MinAmt is mandatory"); 390 setValue ("Std_MinAmt", Std_MinAmt); 391 } 392 public BigDecimal getStd_MinAmt() 393 { 394 BigDecimal bd = (BigDecimal)getValue("Std_MinAmt"); 395 if (bd == null) return Env.ZERO; 396 return bd; 397 } 398 public static final String STD_ROUNDING_CurrencyPrecision = "C"; 399 public static final String STD_ROUNDING_WholeNumber00 = "0"; 400 public static final String STD_ROUNDING_NoRounding = "N"; 401 public static final String STD_ROUNDING_Quarter255075 = "Q"; 402 public static final String STD_ROUNDING_Dime102030 = "D"; 403 public static final String STD_ROUNDING_Nickel051015 = "5"; 404 public static final String STD_ROUNDING_Ten10002000 = "T"; 405 public void setStd_Rounding (String Std_Rounding) 406 { 407 if (Std_Rounding.equals("C") || Std_Rounding.equals("0") || Std_Rounding.equals("N") || Std_Rounding.equals("Q") || Std_Rounding.equals("D") || Std_Rounding.equals("5") || Std_Rounding.equals("T")); 408 else throw new IllegalArgumentException ("Std_Rounding Invalid value - Reference_ID=155 - C - 0 - N - Q - D - 5 - T"); 409 if (Std_Rounding == null) throw new IllegalArgumentException ("Std_Rounding is mandatory"); 410 setValue ("Std_Rounding", Std_Rounding); 411 } 412 public String getStd_Rounding() 413 { 414 return (String )getValue("Std_Rounding"); 415 } 416 } 417 | Popular Tags |