KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class X_C_PaymentTerm extends PO
11 {
12 /** Standard Constructor **/
13 public X_C_PaymentTerm (Properties ctx, int C_PaymentTerm_ID)
14 {
15 super (ctx, C_PaymentTerm_ID);
16 /** if (C_PaymentTerm_ID == 0)
17 {
18 setAfterDelivery (false);
19 setC_PaymentTerm_ID (0);
20 setDiscount (Env.ZERO);
21 setDiscount2 (Env.ZERO);
22 setDiscountDays (0);
23 setDiscountDays2 (0);
24 setGraceDays (0);
25 setIsDueFixed (false);
26 setIsValid (false);
27 setName (null);
28 setNetDays (0);
29 setValue (null);
30 }
31  **/

32 }
33 /** Load Constructor **/
34 public X_C_PaymentTerm (Properties ctx, ResultSet rs)
35 {
36 super (ctx, rs);
37 }
38 /** Load Meta Data **/
39 protected POInfo initPO (Properties ctx)
40 {
41 int AD_Table_ID = 113;
42 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
43 return poi;
44 }
45 public String JavaDoc toString()
46 {
47 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_C_PaymentTerm[").append(getID()).append("]");
48 return sb.toString();
49 }
50 public void setAfterDelivery (boolean AfterDelivery)
51 {
52 setValue ("AfterDelivery", new Boolean JavaDoc(AfterDelivery));
53 }
54 public boolean isAfterDelivery()
55 {
56 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("AfterDelivery");
57 if (bb != null) return bb.booleanValue();
58 return false;
59 }
60 void setC_PaymentTerm_ID (int C_PaymentTerm_ID)
61 {
62 setValueNoCheck ("C_PaymentTerm_ID", new Integer JavaDoc(C_PaymentTerm_ID));
63 }
64 public int getC_PaymentTerm_ID()
65 {
66 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_PaymentTerm_ID");
67 if (ii == null) return 0;
68 return ii.intValue();
69 }
70 public void setDescription (String JavaDoc Description)
71 {
72 setValue ("Description", Description);
73 }
74 public String JavaDoc getDescription()
75 {
76 return (String JavaDoc)getValue("Description");
77 }
78 public void setDiscount (BigDecimal Discount)
79 {
80 if (Discount == null) throw new IllegalArgumentException JavaDoc ("Discount is mandatory");
81 setValue ("Discount", Discount);
82 }
83 public BigDecimal getDiscount()
84 {
85 BigDecimal bd = (BigDecimal)getValue("Discount");
86 if (bd == null) return Env.ZERO;
87 return bd;
88 }
89 public void setDiscount2 (BigDecimal Discount2)
90 {
91 if (Discount2 == null) throw new IllegalArgumentException JavaDoc ("Discount2 is mandatory");
92 setValue ("Discount2", Discount2);
93 }
94 public BigDecimal getDiscount2()
95 {
96 BigDecimal bd = (BigDecimal)getValue("Discount2");
97 if (bd == null) return Env.ZERO;
98 return bd;
99 }
100 public void setDiscountDays (int DiscountDays)
101 {
102 setValue ("DiscountDays", new Integer JavaDoc(DiscountDays));
103 }
104 public int getDiscountDays()
105 {
106 Integer JavaDoc ii = (Integer JavaDoc)getValue("DiscountDays");
107 if (ii == null) return 0;
108 return ii.intValue();
109 }
110 public void setDiscountDays2 (int DiscountDays2)
111 {
112 setValue ("DiscountDays2", new Integer JavaDoc(DiscountDays2));
113 }
114 public int getDiscountDays2()
115 {
116 Integer JavaDoc ii = (Integer JavaDoc)getValue("DiscountDays2");
117 if (ii == null) return 0;
118 return ii.intValue();
119 }
120 public void setDocumentNote (String JavaDoc DocumentNote)
121 {
122 setValue ("DocumentNote", DocumentNote);
123 }
124 public String JavaDoc getDocumentNote()
125 {
126 return (String JavaDoc)getValue("DocumentNote");
127 }
128 public void setFixMonthCutoff (int FixMonthCutoff)
129 {
130 setValue ("FixMonthCutoff", new Integer JavaDoc(FixMonthCutoff));
131 }
132 public int getFixMonthCutoff()
133 {
134 Integer JavaDoc ii = (Integer JavaDoc)getValue("FixMonthCutoff");
135 if (ii == null) return 0;
136 return ii.intValue();
137 }
138 public void setFixMonthDay (int FixMonthDay)
139 {
140 setValue ("FixMonthDay", new Integer JavaDoc(FixMonthDay));
141 }
142 public int getFixMonthDay()
143 {
144 Integer JavaDoc ii = (Integer JavaDoc)getValue("FixMonthDay");
145 if (ii == null) return 0;
146 return ii.intValue();
147 }
148 public void setFixMonthOffset (int FixMonthOffset)
149 {
150 setValue ("FixMonthOffset", new Integer JavaDoc(FixMonthOffset));
151 }
152 public int getFixMonthOffset()
153 {
154 Integer JavaDoc ii = (Integer JavaDoc)getValue("FixMonthOffset");
155 if (ii == null) return 0;
156 return ii.intValue();
157 }
158 public void setGraceDays (int GraceDays)
159 {
160 setValue ("GraceDays", new Integer JavaDoc(GraceDays));
161 }
162 public int getGraceDays()
163 {
164 Integer JavaDoc ii = (Integer JavaDoc)getValue("GraceDays");
165 if (ii == null) return 0;
166 return ii.intValue();
167 }
168 public void setIsDefault (boolean IsDefault)
169 {
170 setValue ("IsDefault", new Boolean JavaDoc(IsDefault));
171 }
172 public boolean isDefault()
173 {
174 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsDefault");
175 if (bb != null) return bb.booleanValue();
176 return false;
177 }
178 public void setIsDueFixed (boolean IsDueFixed)
179 {
180 setValue ("IsDueFixed", new Boolean JavaDoc(IsDueFixed));
181 }
182 public boolean isDueFixed()
183 {
184 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsDueFixed");
185 if (bb != null) return bb.booleanValue();
186 return false;
187 }
188 public void setIsNextBusinessDay (boolean IsNextBusinessDay)
189 {
190 setValue ("IsNextBusinessDay", new Boolean JavaDoc(IsNextBusinessDay));
191 }
192 public boolean isNextBusinessDay()
193 {
194 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsNextBusinessDay");
195 if (bb != null) return bb.booleanValue();
196 return false;
197 }
198 public void setIsValid (boolean IsValid)
199 {
200 setValue ("IsValid", new Boolean JavaDoc(IsValid));
201 }
202 public boolean isValid()
203 {
204 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsValid");
205 if (bb != null) return bb.booleanValue();
206 return false;
207 }
208 public void setName (String JavaDoc Name)
209 {
210 if (Name == null) throw new IllegalArgumentException JavaDoc ("Name is mandatory");
211 setValue ("Name", Name);
212 }
213 public String JavaDoc getName()
214 {
215 return (String JavaDoc)getValue("Name");
216 }
217 public static final String JavaDoc NETDAY_Sunday = "7";
218 public static final String JavaDoc NETDAY_Monday = "1";
219 public static final String JavaDoc NETDAY_Tuesday = "2";
220 public static final String JavaDoc NETDAY_Wednesday = "3";
221 public static final String JavaDoc NETDAY_Thursday = "4";
222 public static final String JavaDoc NETDAY_Friday = "5";
223 public static final String JavaDoc NETDAY_Saturday = "6";
224 public void setNetDay (String JavaDoc NetDay)
225 {
226 if (NetDay.equals("7") || NetDay.equals("1") || NetDay.equals("2") || NetDay.equals("3") || NetDay.equals("4") || NetDay.equals("5") || NetDay.equals("6"));
227  else throw new IllegalArgumentException JavaDoc ("NetDay Invalid value - Reference_ID=167 - 7 - 1 - 2 - 3 - 4 - 5 - 6");
228 setValue ("NetDay", NetDay);
229 }
230 public String JavaDoc getNetDay()
231 {
232 return (String JavaDoc)getValue("NetDay");
233 }
234 public void setNetDays (int NetDays)
235 {
236 setValue ("NetDays", new Integer JavaDoc(NetDays));
237 }
238 public int getNetDays()
239 {
240 Integer JavaDoc ii = (Integer JavaDoc)getValue("NetDays");
241 if (ii == null) return 0;
242 return ii.intValue();
243 }
244 public void setValue (String JavaDoc Value)
245 {
246 if (Value == null) throw new IllegalArgumentException JavaDoc ("Value is mandatory");
247 setValue ("Value", Value);
248 }
249 public String JavaDoc getValue()
250 {
251 return (String JavaDoc)getValue("Value");
252 }
253 }
254
Popular Tags