KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class X_C_PaySchedule extends PO
11 {
12 /** Standard Constructor **/
13 public X_C_PaySchedule (Properties ctx, int C_PaySchedule_ID)
14 {
15 super (ctx, C_PaySchedule_ID);
16 /** if (C_PaySchedule_ID == 0)
17 {
18 setC_PaySchedule_ID (0);
19 setC_PaymentTerm_ID (0);
20 setDiscount (Env.ZERO);
21 setDiscountDays (0);
22 setGraceDays (0);
23 setIsValid (false);
24 setNetDays (0);
25 setPercentage (Env.ZERO);
26 }
27  **/

28 }
29 /** Load Constructor **/
30 public X_C_PaySchedule (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 = 548;
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_PaySchedule[").append(getID()).append("]");
44 return sb.toString();
45 }
46 void setC_PaySchedule_ID (int C_PaySchedule_ID)
47 {
48 setValueNoCheck ("C_PaySchedule_ID", new Integer JavaDoc(C_PaySchedule_ID));
49 }
50 public int getC_PaySchedule_ID()
51 {
52 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_PaySchedule_ID");
53 if (ii == null) return 0;
54 return ii.intValue();
55 }
56 void setC_PaymentTerm_ID (int C_PaymentTerm_ID)
57 {
58 setValueNoCheck ("C_PaymentTerm_ID", new Integer JavaDoc(C_PaymentTerm_ID));
59 }
60 public int getC_PaymentTerm_ID()
61 {
62 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_PaymentTerm_ID");
63 if (ii == null) return 0;
64 return ii.intValue();
65 }
66 public void setDiscount (BigDecimal Discount)
67 {
68 if (Discount == null) throw new IllegalArgumentException JavaDoc ("Discount is mandatory");
69 setValue ("Discount", Discount);
70 }
71 public BigDecimal getDiscount()
72 {
73 BigDecimal bd = (BigDecimal)getValue("Discount");
74 if (bd == null) return Env.ZERO;
75 return bd;
76 }
77 public void setDiscountDays (int DiscountDays)
78 {
79 setValue ("DiscountDays", new Integer JavaDoc(DiscountDays));
80 }
81 public int getDiscountDays()
82 {
83 Integer JavaDoc ii = (Integer JavaDoc)getValue("DiscountDays");
84 if (ii == null) return 0;
85 return ii.intValue();
86 }
87 public void setGraceDays (int GraceDays)
88 {
89 setValue ("GraceDays", new Integer JavaDoc(GraceDays));
90 }
91 public int getGraceDays()
92 {
93 Integer JavaDoc ii = (Integer JavaDoc)getValue("GraceDays");
94 if (ii == null) return 0;
95 return ii.intValue();
96 }
97 public void setIsValid (boolean IsValid)
98 {
99 setValue ("IsValid", new Boolean JavaDoc(IsValid));
100 }
101 public boolean isValid()
102 {
103 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsValid");
104 if (bb != null) return bb.booleanValue();
105 return false;
106 }
107 public static final String JavaDoc NETDAY_Sunday = "7";
108 public static final String JavaDoc NETDAY_Monday = "1";
109 public static final String JavaDoc NETDAY_Tuesday = "2";
110 public static final String JavaDoc NETDAY_Wednesday = "3";
111 public static final String JavaDoc NETDAY_Thursday = "4";
112 public static final String JavaDoc NETDAY_Friday = "5";
113 public static final String JavaDoc NETDAY_Saturday = "6";
114 public void setNetDay (String JavaDoc NetDay)
115 {
116 if (NetDay.equals("7") || NetDay.equals("1") || NetDay.equals("2") || NetDay.equals("3") || NetDay.equals("4") || NetDay.equals("5") || NetDay.equals("6"));
117  else throw new IllegalArgumentException JavaDoc ("NetDay Invalid value - Reference_ID=167 - 7 - 1 - 2 - 3 - 4 - 5 - 6");
118 setValue ("NetDay", NetDay);
119 }
120 public String JavaDoc getNetDay()
121 {
122 return (String JavaDoc)getValue("NetDay");
123 }
124 public void setNetDays (int NetDays)
125 {
126 setValue ("NetDays", new Integer JavaDoc(NetDays));
127 }
128 public int getNetDays()
129 {
130 Integer JavaDoc ii = (Integer JavaDoc)getValue("NetDays");
131 if (ii == null) return 0;
132 return ii.intValue();
133 }
134 public void setPercentage (BigDecimal Percentage)
135 {
136 if (Percentage == null) throw new IllegalArgumentException JavaDoc ("Percentage is mandatory");
137 setValue ("Percentage", Percentage);
138 }
139 public BigDecimal getPercentage()
140 {
141 BigDecimal bd = (BigDecimal)getValue("Percentage");
142 if (bd == null) return Env.ZERO;
143 return bd;
144 }
145 }
146
Free Books   Free Magazines  
Popular Tags