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_Product extends PO 11 { 12 13 public X_M_Product (Properties ctx, int M_Product_ID) 14 { 15 super (ctx, M_Product_ID); 16 36 } 37 38 public X_M_Product (Properties ctx, ResultSet rs) 39 { 40 super (ctx, rs); 41 } 42 43 protected POInfo initPO (Properties ctx) 44 { 45 int AD_Table_ID = 208; 46 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 47 return poi; 48 } 49 public String toString() 50 { 51 StringBuffer sb = new StringBuffer ("X_M_Product[").append(getID()).append("]"); 52 return sb.toString(); 53 } 54 public void setC_RevenueRecognition_ID (int C_RevenueRecognition_ID) 55 { 56 if (C_RevenueRecognition_ID == 0) setValue ("C_RevenueRecognition_ID", null); 57 else 58 setValue ("C_RevenueRecognition_ID", new Integer (C_RevenueRecognition_ID)); 59 } 60 public int getC_RevenueRecognition_ID() 61 { 62 Integer ii = (Integer )getValue("C_RevenueRecognition_ID"); 63 if (ii == null) return 0; 64 return ii.intValue(); 65 } 66 public void setC_TaxCategory_ID (int C_TaxCategory_ID) 67 { 68 setValue ("C_TaxCategory_ID", new Integer (C_TaxCategory_ID)); 69 } 70 public int getC_TaxCategory_ID() 71 { 72 Integer ii = (Integer )getValue("C_TaxCategory_ID"); 73 if (ii == null) return 0; 74 return ii.intValue(); 75 } 76 public void setC_UOM_ID (int C_UOM_ID) 77 { 78 setValue ("C_UOM_ID", new Integer (C_UOM_ID)); 79 } 80 public int getC_UOM_ID() 81 { 82 Integer ii = (Integer )getValue("C_UOM_ID"); 83 if (ii == null) return 0; 84 return ii.intValue(); 85 } 86 public void setClassification (String Classification) 87 { 88 setValue ("Classification", Classification); 89 } 90 public String getClassification() 91 { 92 return (String )getValue("Classification"); 93 } 94 public void setDescription (String Description) 95 { 96 setValue ("Description", Description); 97 } 98 public String getDescription() 99 { 100 return (String )getValue("Description"); 101 } 102 public void setDescriptionURL (String DescriptionURL) 103 { 104 setValue ("DescriptionURL", DescriptionURL); 105 } 106 public String getDescriptionURL() 107 { 108 return (String )getValue("DescriptionURL"); 109 } 110 public void setDiscontinued (boolean Discontinued) 111 { 112 setValue ("Discontinued", new Boolean (Discontinued)); 113 } 114 public boolean isDiscontinued() 115 { 116 Boolean bb = (Boolean )getValue("Discontinued"); 117 if (bb != null) return bb.booleanValue(); 118 return false; 119 } 120 public void setDiscontinuedBy (Timestamp DiscontinuedBy) 121 { 122 setValue ("DiscontinuedBy", DiscontinuedBy); 123 } 124 public Timestamp getDiscontinuedBy() 125 { 126 return (Timestamp)getValue("DiscontinuedBy"); 127 } 128 public void setDocumentNote (String DocumentNote) 129 { 130 setValue ("DocumentNote", DocumentNote); 131 } 132 public String getDocumentNote() 133 { 134 return (String )getValue("DocumentNote"); 135 } 136 public void setDownloadURL (String DownloadURL) 137 { 138 setValue ("DownloadURL", DownloadURL); 139 } 140 public String getDownloadURL() 141 { 142 return (String )getValue("DownloadURL"); 143 } 144 public void setGuaranteeDays (int GuaranteeDays) 145 { 146 setValue ("GuaranteeDays", new Integer (GuaranteeDays)); 147 } 148 public int getGuaranteeDays() 149 { 150 Integer ii = (Integer )getValue("GuaranteeDays"); 151 if (ii == null) return 0; 152 return ii.intValue(); 153 } 154 public void setGuaranteeDaysMin (int GuaranteeDaysMin) 155 { 156 setValue ("GuaranteeDaysMin", new Integer (GuaranteeDaysMin)); 157 } 158 public int getGuaranteeDaysMin() 159 { 160 Integer ii = (Integer )getValue("GuaranteeDaysMin"); 161 if (ii == null) return 0; 162 return ii.intValue(); 163 } 164 public void setHelp (String Help) 165 { 166 setValue ("Help", Help); 167 } 168 public String getHelp() 169 { 170 return (String )getValue("Help"); 171 } 172 public void setImageURL (String ImageURL) 173 { 174 setValue ("ImageURL", ImageURL); 175 } 176 public String getImageURL() 177 { 178 return (String )getValue("ImageURL"); 179 } 180 public void setIsBOM (boolean IsBOM) 181 { 182 setValue ("IsBOM", new Boolean (IsBOM)); 183 } 184 public boolean isBOM() 185 { 186 Boolean bb = (Boolean )getValue("IsBOM"); 187 if (bb != null) return bb.booleanValue(); 188 return false; 189 } 190 public void setIsInvoicePrintDetails (boolean IsInvoicePrintDetails) 191 { 192 setValue ("IsInvoicePrintDetails", new Boolean (IsInvoicePrintDetails)); 193 } 194 public boolean isInvoicePrintDetails() 195 { 196 Boolean bb = (Boolean )getValue("IsInvoicePrintDetails"); 197 if (bb != null) return bb.booleanValue(); 198 return false; 199 } 200 public void setIsPickListPrintDetails (boolean IsPickListPrintDetails) 201 { 202 setValue ("IsPickListPrintDetails", new Boolean (IsPickListPrintDetails)); 203 } 204 public boolean isPickListPrintDetails() 205 { 206 Boolean bb = (Boolean )getValue("IsPickListPrintDetails"); 207 if (bb != null) return bb.booleanValue(); 208 return false; 209 } 210 public void setIsPurchased (boolean IsPurchased) 211 { 212 setValue ("IsPurchased", new Boolean (IsPurchased)); 213 } 214 public boolean isPurchased() 215 { 216 Boolean bb = (Boolean )getValue("IsPurchased"); 217 if (bb != null) return bb.booleanValue(); 218 return false; 219 } 220 public void setIsSold (boolean IsSold) 221 { 222 setValue ("IsSold", new Boolean (IsSold)); 223 } 224 public boolean isSold() 225 { 226 Boolean bb = (Boolean )getValue("IsSold"); 227 if (bb != null) return bb.booleanValue(); 228 return false; 229 } 230 public void setIsStocked (boolean IsStocked) 231 { 232 setValue ("IsStocked", new Boolean (IsStocked)); 233 } 234 public boolean isStocked() 235 { 236 Boolean bb = (Boolean )getValue("IsStocked"); 237 if (bb != null) return bb.booleanValue(); 238 return false; 239 } 240 public void setIsSummary (boolean IsSummary) 241 { 242 setValue ("IsSummary", new Boolean (IsSummary)); 243 } 244 public boolean isSummary() 245 { 246 Boolean bb = (Boolean )getValue("IsSummary"); 247 if (bb != null) return bb.booleanValue(); 248 return false; 249 } 250 void setIsVerified (boolean IsVerified) 251 { 252 setValueNoCheck ("IsVerified", new Boolean (IsVerified)); 253 } 254 public boolean isVerified() 255 { 256 Boolean bb = (Boolean )getValue("IsVerified"); 257 if (bb != null) return bb.booleanValue(); 258 return false; 259 } 260 public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) 261 { 262 if (M_AttributeSetInstance_ID == 0) setValue ("M_AttributeSetInstance_ID", null); 263 else 264 setValue ("M_AttributeSetInstance_ID", new Integer (M_AttributeSetInstance_ID)); 265 } 266 public int getM_AttributeSetInstance_ID() 267 { 268 Integer ii = (Integer )getValue("M_AttributeSetInstance_ID"); 269 if (ii == null) return 0; 270 return ii.intValue(); 271 } 272 public void setM_AttributeSet_ID (int M_AttributeSet_ID) 273 { 274 if (M_AttributeSet_ID == 0) setValue ("M_AttributeSet_ID", null); 275 else 276 setValue ("M_AttributeSet_ID", new Integer (M_AttributeSet_ID)); 277 } 278 public int getM_AttributeSet_ID() 279 { 280 Integer ii = (Integer )getValue("M_AttributeSet_ID"); 281 if (ii == null) return 0; 282 return ii.intValue(); 283 } 284 public void setM_FreightCategory_ID (int M_FreightCategory_ID) 285 { 286 if (M_FreightCategory_ID == 0) setValue ("M_FreightCategory_ID", null); 287 else 288 setValue ("M_FreightCategory_ID", new Integer (M_FreightCategory_ID)); 289 } 290 public int getM_FreightCategory_ID() 291 { 292 Integer ii = (Integer )getValue("M_FreightCategory_ID"); 293 if (ii == null) return 0; 294 return ii.intValue(); 295 } 296 public void setM_Locator_ID (int M_Locator_ID) 297 { 298 if (M_Locator_ID == 0) setValue ("M_Locator_ID", null); 299 else 300 setValue ("M_Locator_ID", new Integer (M_Locator_ID)); 301 } 302 public int getM_Locator_ID() 303 { 304 Integer ii = (Integer )getValue("M_Locator_ID"); 305 if (ii == null) return 0; 306 return ii.intValue(); 307 } 308 public void setM_Product_Category_ID (int M_Product_Category_ID) 309 { 310 setValue ("M_Product_Category_ID", new Integer (M_Product_Category_ID)); 311 } 312 public int getM_Product_Category_ID() 313 { 314 Integer ii = (Integer )getValue("M_Product_Category_ID"); 315 if (ii == null) return 0; 316 return ii.intValue(); 317 } 318 void setM_Product_ID (int M_Product_ID) 319 { 320 setValueNoCheck ("M_Product_ID", new Integer (M_Product_ID)); 321 } 322 public int getM_Product_ID() 323 { 324 Integer ii = (Integer )getValue("M_Product_ID"); 325 if (ii == null) return 0; 326 return ii.intValue(); 327 } 328 public void setName (String Name) 329 { 330 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 331 setValue ("Name", Name); 332 } 333 public String getName() 334 { 335 return (String )getValue("Name"); 336 } 337 public void setProcessing (String Processing) 338 { 339 if (Processing == null) throw new IllegalArgumentException ("Processing is mandatory"); 340 setValue ("Processing", Processing); 341 } 342 public String getProcessing() 343 { 344 return (String )getValue("Processing"); 345 } 346 public static final String PRODUCTTYPE_Item = "I"; 347 public static final String PRODUCTTYPE_Service = "S"; 348 public static final String PRODUCTTYPE_Resource = "R"; 349 public static final String PRODUCTTYPE_ExpenseType = "E"; 350 public static final String PRODUCTTYPE_Online = "O"; 351 public void setProductType (String ProductType) 352 { 353 if (ProductType.equals("I") || ProductType.equals("S") || ProductType.equals("R") || ProductType.equals("E") || ProductType.equals("O")); 354 else throw new IllegalArgumentException ("ProductType Invalid value - Reference_ID=270 - I - S - R - E - O"); 355 if (ProductType == null) throw new IllegalArgumentException ("ProductType is mandatory"); 356 setValue ("ProductType", ProductType); 357 } 358 public String getProductType() 359 { 360 return (String )getValue("ProductType"); 361 } 362 public void setR_MailText_ID (int R_MailText_ID) 363 { 364 if (R_MailText_ID == 0) setValue ("R_MailText_ID", null); 365 else 366 setValue ("R_MailText_ID", new Integer (R_MailText_ID)); 367 } 368 public int getR_MailText_ID() 369 { 370 Integer ii = (Integer )getValue("R_MailText_ID"); 371 if (ii == null) return 0; 372 return ii.intValue(); 373 } 374 public void setSKU (String SKU) 375 { 376 setValue ("SKU", SKU); 377 } 378 public String getSKU() 379 { 380 return (String )getValue("SKU"); 381 } 382 void setS_ExpenseType_ID (int S_ExpenseType_ID) 383 { 384 if (S_ExpenseType_ID == 0) setValueNoCheck ("S_ExpenseType_ID", null); 385 else 386 setValueNoCheck ("S_ExpenseType_ID", new Integer (S_ExpenseType_ID)); 387 } 388 public int getS_ExpenseType_ID() 389 { 390 Integer ii = (Integer )getValue("S_ExpenseType_ID"); 391 if (ii == null) return 0; 392 return ii.intValue(); 393 } 394 void setS_Resource_ID (int S_Resource_ID) 395 { 396 if (S_Resource_ID == 0) setValueNoCheck ("S_Resource_ID", null); 397 else 398 setValueNoCheck ("S_Resource_ID", new Integer (S_Resource_ID)); 399 } 400 public int getS_Resource_ID() 401 { 402 Integer ii = (Integer )getValue("S_Resource_ID"); 403 if (ii == null) return 0; 404 return ii.intValue(); 405 } 406 public void setSalesRep_ID (int SalesRep_ID) 407 { 408 if (SalesRep_ID == 0) setValue ("SalesRep_ID", null); 409 else 410 setValue ("SalesRep_ID", new Integer (SalesRep_ID)); 411 } 412 public int getSalesRep_ID() 413 { 414 Integer ii = (Integer )getValue("SalesRep_ID"); 415 if (ii == null) return 0; 416 return ii.intValue(); 417 } 418 public void setShelfDepth (int ShelfDepth) 419 { 420 setValue ("ShelfDepth", new Integer (ShelfDepth)); 421 } 422 public int getShelfDepth() 423 { 424 Integer ii = (Integer )getValue("ShelfDepth"); 425 if (ii == null) return 0; 426 return ii.intValue(); 427 } 428 public void setShelfHeight (int ShelfHeight) 429 { 430 setValue ("ShelfHeight", new Integer (ShelfHeight)); 431 } 432 public int getShelfHeight() 433 { 434 Integer ii = (Integer )getValue("ShelfHeight"); 435 if (ii == null) return 0; 436 return ii.intValue(); 437 } 438 public void setShelfWidth (int ShelfWidth) 439 { 440 setValue ("ShelfWidth", new Integer (ShelfWidth)); 441 } 442 public int getShelfWidth() 443 { 444 Integer ii = (Integer )getValue("ShelfWidth"); 445 if (ii == null) return 0; 446 return ii.intValue(); 447 } 448 public void setUPC (String UPC) 449 { 450 setValue ("UPC", UPC); 451 } 452 public String getUPC() 453 { 454 return (String )getValue("UPC"); 455 } 456 public void setUnitsPerPallet (int UnitsPerPallet) 457 { 458 setValue ("UnitsPerPallet", new Integer (UnitsPerPallet)); 459 } 460 public int getUnitsPerPallet() 461 { 462 Integer ii = (Integer )getValue("UnitsPerPallet"); 463 if (ii == null) return 0; 464 return ii.intValue(); 465 } 466 public void setValue (String Value) 467 { 468 if (Value == null) throw new IllegalArgumentException ("Value is mandatory"); 469 setValue ("Value", Value); 470 } 471 public String getValue() 472 { 473 return (String )getValue("Value"); 474 } 475 public void setVersionNo (String VersionNo) 476 { 477 setValue ("VersionNo", VersionNo); 478 } 479 public String getVersionNo() 480 { 481 return (String )getValue("VersionNo"); 482 } 483 public void setVolume (BigDecimal Volume) 484 { 485 setValue ("Volume", Volume); 486 } 487 public BigDecimal getVolume() 488 { 489 BigDecimal bd = (BigDecimal)getValue("Volume"); 490 if (bd == null) return Env.ZERO; 491 return bd; 492 } 493 public void setWeight (BigDecimal Weight) 494 { 495 setValue ("Weight", Weight); 496 } 497 public BigDecimal getWeight() 498 { 499 BigDecimal bd = (BigDecimal)getValue("Weight"); 500 if (bd == null) return Env.ZERO; 501 return bd; 502 } 503 } 504 | Popular Tags |