KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class X_C_InvoiceSchedule extends PO
11 {
12 /** Standard Constructor **/
13 public X_C_InvoiceSchedule (Properties ctx, int C_InvoiceSchedule_ID)
14 {
15 super (ctx, C_InvoiceSchedule_ID);
16 /** if (C_InvoiceSchedule_ID == 0)
17 {
18 setAmt (Env.ZERO);
19 setC_InvoiceSchedule_ID (0);
20 setInvoiceDay (0);
21 setInvoiceFrequency (null);
22 setInvoiceWeekDay (null);
23 setIsAmount (false);
24 setIsDefault (false);
25 setName (null);
26 }
27  **/

28 }
29 /** Load Constructor **/
30 public X_C_InvoiceSchedule (Properties ctx, ResultSet rs)
31 {
32 super (ctx, rs);
33 }
34 /** Load Meta Data **/
35 protected POInfo initPO (Properties ctx)
36 {
37 int AD_Table_ID = 257;
38 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
39 return poi;
40 }
41 public String JavaDoc toString()
42 {
43 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_C_InvoiceSchedule[").append(getID()).append("]");
44 return sb.toString();
45 }
46 public void setAmt (BigDecimal Amt)
47 {
48 if (Amt == null) throw new IllegalArgumentException JavaDoc ("Amt is mandatory");
49 setValue ("Amt", Amt);
50 }
51 public BigDecimal getAmt()
52 {
53 BigDecimal bd = (BigDecimal)getValue("Amt");
54 if (bd == null) return Env.ZERO;
55 return bd;
56 }
57 void setC_InvoiceSchedule_ID (int C_InvoiceSchedule_ID)
58 {
59 setValueNoCheck ("C_InvoiceSchedule_ID", new Integer JavaDoc(C_InvoiceSchedule_ID));
60 }
61 public int getC_InvoiceSchedule_ID()
62 {
63 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_InvoiceSchedule_ID");
64 if (ii == null) return 0;
65 return ii.intValue();
66 }
67 public void setDescription (String JavaDoc Description)
68 {
69 setValue ("Description", Description);
70 }
71 public String JavaDoc getDescription()
72 {
73 return (String JavaDoc)getValue("Description");
74 }
75 public void setEvenInvoiceWeek (boolean EvenInvoiceWeek)
76 {
77 setValue ("EvenInvoiceWeek", new Boolean JavaDoc(EvenInvoiceWeek));
78 }
79 public boolean isEvenInvoiceWeek()
80 {
81 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("EvenInvoiceWeek");
82 if (bb != null) return bb.booleanValue();
83 return false;
84 }
85 public void setInvoiceDay (int InvoiceDay)
86 {
87 setValue ("InvoiceDay", new Integer JavaDoc(InvoiceDay));
88 }
89 public int getInvoiceDay()
90 {
91 Integer JavaDoc ii = (Integer JavaDoc)getValue("InvoiceDay");
92 if (ii == null) return 0;
93 return ii.intValue();
94 }
95 public void setInvoiceDayCutoff (int InvoiceDayCutoff)
96 {
97 setValue ("InvoiceDayCutoff", new Integer JavaDoc(InvoiceDayCutoff));
98 }
99 public int getInvoiceDayCutoff()
100 {
101 Integer JavaDoc ii = (Integer JavaDoc)getValue("InvoiceDayCutoff");
102 if (ii == null) return 0;
103 return ii.intValue();
104 }
105 public static final String JavaDoc INVOICEFREQUENCY_Daily = "D";
106 public static final String JavaDoc INVOICEFREQUENCY_Weekly = "W";
107 public static final String JavaDoc INVOICEFREQUENCY_Monthly = "M";
108 public static final String JavaDoc INVOICEFREQUENCY_TwiceMonthly = "T";
109 public void setInvoiceFrequency (String JavaDoc InvoiceFrequency)
110 {
111 if (InvoiceFrequency.equals("D") || InvoiceFrequency.equals("W") || InvoiceFrequency.equals("M") || InvoiceFrequency.equals("T"));
112  else throw new IllegalArgumentException JavaDoc ("InvoiceFrequency Invalid value - Reference_ID=168 - D - W - M - T");
113 if (InvoiceFrequency == null) throw new IllegalArgumentException JavaDoc ("InvoiceFrequency is mandatory");
114 setValue ("InvoiceFrequency", InvoiceFrequency);
115 }
116 public String JavaDoc getInvoiceFrequency()
117 {
118 return (String JavaDoc)getValue("InvoiceFrequency");
119 }
120 public static final String JavaDoc INVOICEWEEKDAY_Sunday = "7";
121 public static final String JavaDoc INVOICEWEEKDAY_Monday = "1";
122 public static final String JavaDoc INVOICEWEEKDAY_Tuesday = "2";
123 public static final String JavaDoc INVOICEWEEKDAY_Wednesday = "3";
124 public static final String JavaDoc INVOICEWEEKDAY_Thursday = "4";
125 public static final String JavaDoc INVOICEWEEKDAY_Friday = "5";
126 public static final String JavaDoc INVOICEWEEKDAY_Saturday = "6";
127 public void setInvoiceWeekDay (String JavaDoc InvoiceWeekDay)
128 {
129 if (InvoiceWeekDay.equals("7") || InvoiceWeekDay.equals("1") || InvoiceWeekDay.equals("2") || InvoiceWeekDay.equals("3") || InvoiceWeekDay.equals("4") || InvoiceWeekDay.equals("5") || InvoiceWeekDay.equals("6"));
130  else throw new IllegalArgumentException JavaDoc ("InvoiceWeekDay Invalid value - Reference_ID=167 - 7 - 1 - 2 - 3 - 4 - 5 - 6");
131 if (InvoiceWeekDay == null) throw new IllegalArgumentException JavaDoc ("InvoiceWeekDay is mandatory");
132 setValue ("InvoiceWeekDay", InvoiceWeekDay);
133 }
134 public String JavaDoc getInvoiceWeekDay()
135 {
136 return (String JavaDoc)getValue("InvoiceWeekDay");
137 }
138 public static final String JavaDoc INVOICEWEEKDAYCUTOFF_Sunday = "7";
139 public static final String JavaDoc INVOICEWEEKDAYCUTOFF_Monday = "1";
140 public static final String JavaDoc INVOICEWEEKDAYCUTOFF_Tuesday = "2";
141 public static final String JavaDoc INVOICEWEEKDAYCUTOFF_Wednesday = "3";
142 public static final String JavaDoc INVOICEWEEKDAYCUTOFF_Thursday = "4";
143 public static final String JavaDoc INVOICEWEEKDAYCUTOFF_Friday = "5";
144 public static final String JavaDoc INVOICEWEEKDAYCUTOFF_Saturday = "6";
145 public void setInvoiceWeekDayCutoff (String JavaDoc InvoiceWeekDayCutoff)
146 {
147 if (InvoiceWeekDayCutoff.equals("7") || InvoiceWeekDayCutoff.equals("1") || InvoiceWeekDayCutoff.equals("2") || InvoiceWeekDayCutoff.equals("3") || InvoiceWeekDayCutoff.equals("4") || InvoiceWeekDayCutoff.equals("5") || InvoiceWeekDayCutoff.equals("6"));
148  else throw new IllegalArgumentException JavaDoc ("InvoiceWeekDayCutoff Invalid value - Reference_ID=167 - 7 - 1 - 2 - 3 - 4 - 5 - 6");
149 setValue ("InvoiceWeekDayCutoff", InvoiceWeekDayCutoff);
150 }
151 public String JavaDoc getInvoiceWeekDayCutoff()
152 {
153 return (String JavaDoc)getValue("InvoiceWeekDayCutoff");
154 }
155 public void setIsAmount (boolean IsAmount)
156 {
157 setValue ("IsAmount", new Boolean JavaDoc(IsAmount));
158 }
159 public boolean isAmount()
160 {
161 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsAmount");
162 if (bb != null) return bb.booleanValue();
163 return false;
164 }
165 public void setIsDefault (boolean IsDefault)
166 {
167 setValue ("IsDefault", new Boolean JavaDoc(IsDefault));
168 }
169 public boolean isDefault()
170 {
171 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsDefault");
172 if (bb != null) return bb.booleanValue();
173 return false;
174 }
175 public void setName (String JavaDoc Name)
176 {
177 if (Name == null) throw new IllegalArgumentException JavaDoc ("Name is mandatory");
178 setValue ("Name", Name);
179 }
180 public String JavaDoc getName()
181 {
182 return (String JavaDoc)getValue("Name");
183 }
184 }
185
Popular Tags