KickJava   Java API By Example, From Geeks To Geeks.

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


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 PA_ReportSource
9  ** @version $Id: X_PA_ReportSource.java,v 1.26 2003/10/31 05:30:54 jjanke Exp $ **/

10 public class X_PA_ReportSource extends PO
11 {
12 /** Standard Constructor **/
13 public X_PA_ReportSource (Properties ctx, int PA_ReportSource_ID)
14 {
15 super (ctx, PA_ReportSource_ID);
16 /** if (PA_ReportSource_ID == 0)
17 {
18 setElementType (null);
19 setPA_ReportLine_ID (0);
20 setPA_ReportSource_ID (0);
21 }
22  **/

23 }
24 /** Load Constructor **/
25 public X_PA_ReportSource (Properties ctx, ResultSet rs)
26 {
27 super (ctx, rs);
28 }
29 /** Load Meta Data **/
30 protected POInfo initPO (Properties ctx)
31 {
32 int AD_Table_ID = 450;
33 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
34 return poi;
35 }
36 public String JavaDoc toString()
37 {
38 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_PA_ReportSource[").append(getID()).append("]");
39 return sb.toString();
40 }
41 public void setC_Activity_ID (int C_Activity_ID)
42 {
43 if (C_Activity_ID == 0) setValue ("C_Activity_ID", null);
44  else
45 setValue ("C_Activity_ID", new Integer JavaDoc(C_Activity_ID));
46 }
47 public int getC_Activity_ID()
48 {
49 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Activity_ID");
50 if (ii == null) return 0;
51 return ii.intValue();
52 }
53 public void setC_BPartner_ID (int C_BPartner_ID)
54 {
55 if (C_BPartner_ID == 0) setValue ("C_BPartner_ID", null);
56  else
57 setValue ("C_BPartner_ID", new Integer JavaDoc(C_BPartner_ID));
58 }
59 public int getC_BPartner_ID()
60 {
61 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_BPartner_ID");
62 if (ii == null) return 0;
63 return ii.intValue();
64 }
65 public void setC_Campaign_ID (int C_Campaign_ID)
66 {
67 if (C_Campaign_ID == 0) setValue ("C_Campaign_ID", null);
68  else
69 setValue ("C_Campaign_ID", new Integer JavaDoc(C_Campaign_ID));
70 }
71 public int getC_Campaign_ID()
72 {
73 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Campaign_ID");
74 if (ii == null) return 0;
75 return ii.intValue();
76 }
77 public void setC_ElementValue_ID (int C_ElementValue_ID)
78 {
79 if (C_ElementValue_ID == 0) setValue ("C_ElementValue_ID", null);
80  else
81 setValue ("C_ElementValue_ID", new Integer JavaDoc(C_ElementValue_ID));
82 }
83 public int getC_ElementValue_ID()
84 {
85 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_ElementValue_ID");
86 if (ii == null) return 0;
87 return ii.intValue();
88 }
89 public void setC_Location_ID (int C_Location_ID)
90 {
91 if (C_Location_ID == 0) setValue ("C_Location_ID", null);
92  else
93 setValue ("C_Location_ID", new Integer JavaDoc(C_Location_ID));
94 }
95 public int getC_Location_ID()
96 {
97 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Location_ID");
98 if (ii == null) return 0;
99 return ii.intValue();
100 }
101 public void setC_Project_ID (int C_Project_ID)
102 {
103 if (C_Project_ID == 0) setValue ("C_Project_ID", null);
104  else
105 setValue ("C_Project_ID", new Integer JavaDoc(C_Project_ID));
106 }
107 public int getC_Project_ID()
108 {
109 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Project_ID");
110 if (ii == null) return 0;
111 return ii.intValue();
112 }
113 public void setC_SalesRegion_ID (int C_SalesRegion_ID)
114 {
115 if (C_SalesRegion_ID == 0) setValue ("C_SalesRegion_ID", null);
116  else
117 setValue ("C_SalesRegion_ID", new Integer JavaDoc(C_SalesRegion_ID));
118 }
119 public int getC_SalesRegion_ID()
120 {
121 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_SalesRegion_ID");
122 if (ii == null) return 0;
123 return ii.intValue();
124 }
125 public void setDescription (String JavaDoc Description)
126 {
127 setValue ("Description", Description);
128 }
129 public String JavaDoc getDescription()
130 {
131 return (String JavaDoc)getValue("Description");
132 }
133 public static final String JavaDoc ELEMENTTYPE_LocationFrom = "LF";
134 public static final String JavaDoc ELEMENTTYPE_LocationTo = "LT";
135 public static final String JavaDoc ELEMENTTYPE_SalesRegion = "SR";
136 public static final String JavaDoc ELEMENTTYPE_Project = "PJ";
137 public static final String JavaDoc ELEMENTTYPE_Campaign = "MC";
138 public static final String JavaDoc ELEMENTTYPE_User1 = "U1";
139 public static final String JavaDoc ELEMENTTYPE_User2 = "U2";
140 public static final String JavaDoc ELEMENTTYPE_Activity = "AY";
141 public static final String JavaDoc ELEMENTTYPE_Organization = "OO";
142 public static final String JavaDoc ELEMENTTYPE_Account = "AC";
143 public static final String JavaDoc ELEMENTTYPE_Product = "PR";
144 public static final String JavaDoc ELEMENTTYPE_BusPartner = "BP";
145 public static final String JavaDoc ELEMENTTYPE_TrxOrg = "OT";
146 public void setElementType (String JavaDoc ElementType)
147 {
148 if (ElementType.equals("LF") || ElementType.equals("LT") || ElementType.equals("SR") || ElementType.equals("PJ") || ElementType.equals("MC") || ElementType.equals("U1") || ElementType.equals("U2") || ElementType.equals("AY") || ElementType.equals("OO") || ElementType.equals("AC") || ElementType.equals("PR") || ElementType.equals("BP") || ElementType.equals("OT"));
149  else throw new IllegalArgumentException JavaDoc ("ElementType Invalid value - Reference_ID=181 - LF - LT - SR - PJ - MC - U1 - U2 - AY - OO - AC - PR - BP - OT");
150 if (ElementType == null) throw new IllegalArgumentException JavaDoc ("ElementType is mandatory");
151 setValue ("ElementType", ElementType);
152 }
153 public String JavaDoc getElementType()
154 {
155 return (String JavaDoc)getValue("ElementType");
156 }
157 public void setM_Product_ID (int M_Product_ID)
158 {
159 if (M_Product_ID == 0) setValue ("M_Product_ID", null);
160  else
161 setValue ("M_Product_ID", new Integer JavaDoc(M_Product_ID));
162 }
163 public int getM_Product_ID()
164 {
165 Integer JavaDoc ii = (Integer JavaDoc)getValue("M_Product_ID");
166 if (ii == null) return 0;
167 return ii.intValue();
168 }
169 public void setOrg_ID (int Org_ID)
170 {
171 if (Org_ID == 0) setValue ("Org_ID", null);
172  else
173 setValue ("Org_ID", new Integer JavaDoc(Org_ID));
174 }
175 public int getOrg_ID()
176 {
177 Integer JavaDoc ii = (Integer JavaDoc)getValue("Org_ID");
178 if (ii == null) return 0;
179 return ii.intValue();
180 }
181 void setPA_ReportLine_ID (int PA_ReportLine_ID)
182 {
183 setValueNoCheck ("PA_ReportLine_ID", new Integer JavaDoc(PA_ReportLine_ID));
184 }
185 public int getPA_ReportLine_ID()
186 {
187 Integer JavaDoc ii = (Integer JavaDoc)getValue("PA_ReportLine_ID");
188 if (ii == null) return 0;
189 return ii.intValue();
190 }
191 void setPA_ReportSource_ID (int PA_ReportSource_ID)
192 {
193 setValueNoCheck ("PA_ReportSource_ID", new Integer JavaDoc(PA_ReportSource_ID));
194 }
195 public int getPA_ReportSource_ID()
196 {
197 Integer JavaDoc ii = (Integer JavaDoc)getValue("PA_ReportSource_ID");
198 if (ii == null) return 0;
199 return ii.intValue();
200 }
201 }
202
Popular Tags