KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > model > X_M_Product_Category


1 /** Generated Model - DO NOT CHANGE - Copyright (C) 1999-2003 Jorg Janke **/
2 package org.compiere.model;
3 import java.util.*;
4 import java.sql.*;
5 import java.math.*;
6 import java.io.Serializable JavaDoc;
7 import org.compiere.util.*;
8 /** Generated Model for M_Product_Category
9  ** @version $Id: X_M_Product_Category.java,v 1.26 2003/10/31 05:30:54 jjanke Exp $ **/

10 public class X_M_Product_Category extends PO
11 {
12 /** Standard Constructor **/
13 public X_M_Product_Category (Properties ctx, int M_Product_Category_ID)
14 {
15 super (ctx, M_Product_Category_ID);
16 /** if (M_Product_Category_ID == 0)
17 {
18 setIsDefault (false);
19 setM_Product_Category_ID (0);
20 setName (null);
21 setPlannedMargin (Env.ZERO);
22 setValue (null);
23 }
24  **/

25 }
26 /** Load Constructor **/
27 public X_M_Product_Category (Properties ctx, ResultSet rs)
28 {
29 super (ctx, rs);
30 }
31 /** Load Meta Data **/
32 protected POInfo initPO (Properties ctx)
33 {
34 int AD_Table_ID = 209;
35 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
36 return poi;
37 }
38 public String JavaDoc toString()
39 {
40 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_M_Product_Category[").append(getID()).append("]");
41 return sb.toString();
42 }
43 public void setA_Asset_Group_ID (int A_Asset_Group_ID)
44 {
45 if (A_Asset_Group_ID == 0) setValue ("A_Asset_Group_ID", null);
46  else
47 setValue ("A_Asset_Group_ID", new Integer JavaDoc(A_Asset_Group_ID));
48 }
49 public int getA_Asset_Group_ID()
50 {
51 Integer JavaDoc ii = (Integer JavaDoc)getValue("A_Asset_Group_ID");
52 if (ii == null) return 0;
53 return ii.intValue();
54 }
55 public void setDescription (String JavaDoc Description)
56 {
57 setValue ("Description", Description);
58 }
59 public String JavaDoc getDescription()
60 {
61 return (String JavaDoc)getValue("Description");
62 }
63 public void setIsDefault (boolean IsDefault)
64 {
65 setValue ("IsDefault", new Boolean JavaDoc(IsDefault));
66 }
67 public boolean isDefault()
68 {
69 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsDefault");
70 if (bb != null) return bb.booleanValue();
71 return false;
72 }
73 void setM_Product_Category_ID (int M_Product_Category_ID)
74 {
75 setValueNoCheck ("M_Product_Category_ID", new Integer JavaDoc(M_Product_Category_ID));
76 }
77 public int getM_Product_Category_ID()
78 {
79 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Product_Category_ID");
80 if (ii == null) return 0;
81 return ii.intValue();
82 }
83 public void setName (String JavaDoc Name)
84 {
85 if (Name == null) throw new IllegalArgumentException JavaDoc ("Name is mandatory");
86 setValue ("Name", Name);
87 }
88 public String JavaDoc getName()
89 {
90 return (String JavaDoc)getValue("Name");
91 }
92 public void setPlannedMargin (BigDecimal PlannedMargin)
93 {
94 if (PlannedMargin == null) throw new IllegalArgumentException JavaDoc ("PlannedMargin is mandatory");
95 setValue ("PlannedMargin", PlannedMargin);
96 }
97 public BigDecimal getPlannedMargin()
98 {
99 BigDecimal bd = (BigDecimal)getValue("PlannedMargin");
100 if (bd == null) return Env.ZERO;
101 return bd;
102 }
103 public void setValue (String JavaDoc Value)
104 {
105 if (Value == null) throw new IllegalArgumentException JavaDoc ("Value is mandatory");
106 setValue ("Value", Value);
107 }
108 public String JavaDoc getValue()
109 {
110 return (String JavaDoc)getValue("Value");
111 }
112 }
113
Popular Tags