KickJava   Java API By Example, From Geeks To Geeks.

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


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

10 public class X_C_Period extends PO
11 {
12 /** Standard Constructor **/
13 public X_C_Period (Properties ctx, int C_Period_ID)
14 {
15 super (ctx, C_Period_ID);
16 /** if (C_Period_ID == 0)
17 {
18 setC_Period_ID (0);
19 setC_Year_ID (0);
20 setName (null);
21 setPeriodNo (0);
22 setPeriodType (null);
23 setStartDate (new Timestamp(System.currentTimeMillis()));
24 }
25  **/

26 }
27 /** Load Constructor **/
28 public X_C_Period (Properties ctx, ResultSet rs)
29 {
30 super (ctx, rs);
31 }
32 /** Load Meta Data **/
33 protected POInfo initPO (Properties ctx)
34 {
35 int AD_Table_ID = 145;
36 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
37 return poi;
38 }
39 public String JavaDoc toString()
40 {
41 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_C_Period[").append(getID()).append("]");
42 return sb.toString();
43 }
44 void setC_Period_ID (int C_Period_ID)
45 {
46 setValueNoCheck ("C_Period_ID", new Integer JavaDoc(C_Period_ID));
47 }
48 public int getC_Period_ID()
49 {
50 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Period_ID");
51 if (ii == null) return 0;
52 return ii.intValue();
53 }
54 void setC_Year_ID (int C_Year_ID)
55 {
56 setValueNoCheck ("C_Year_ID", new Integer JavaDoc(C_Year_ID));
57 }
58 public int getC_Year_ID()
59 {
60 Integer JavaDoc ii = (Integer JavaDoc)getValue("C_Year_ID");
61 if (ii == null) return 0;
62 return ii.intValue();
63 }
64 public void setEndDate (Timestamp EndDate)
65 {
66 setValue ("EndDate", EndDate);
67 }
68 public Timestamp getEndDate()
69 {
70 return (Timestamp)getValue("EndDate");
71 }
72 public void setName (String JavaDoc Name)
73 {
74 if (Name == null) throw new IllegalArgumentException JavaDoc ("Name is mandatory");
75 setValue ("Name", Name);
76 }
77 public String JavaDoc getName()
78 {
79 return (String JavaDoc)getValue("Name");
80 }
81 public void setPeriodNo (int PeriodNo)
82 {
83 setValue ("PeriodNo", new Integer JavaDoc(PeriodNo));
84 }
85 public int getPeriodNo()
86 {
87 Integer JavaDoc ii = (Integer JavaDoc)getValue("PeriodNo");
88 if (ii == null) return 0;
89 return ii.intValue();
90 }
91 public static final String JavaDoc PERIODTYPE_StandardCalendarPeriod = "S";
92 public static final String JavaDoc PERIODTYPE_AdjustmentPeriod = "A";
93 public void setPeriodType (String JavaDoc PeriodType)
94 {
95 if (PeriodType.equals("S") || PeriodType.equals("A"));
96  else throw new IllegalArgumentException JavaDoc ("PeriodType Invalid value - Reference_ID=115 - S - A");
97 if (PeriodType == null) throw new IllegalArgumentException JavaDoc ("PeriodType is mandatory");
98 setValue ("PeriodType", PeriodType);
99 }
100 public String JavaDoc getPeriodType()
101 {
102 return (String JavaDoc)getValue("PeriodType");
103 }
104 public void setProcessing (String JavaDoc Processing)
105 {
106 setValue ("Processing", Processing);
107 }
108 public String JavaDoc getProcessing()
109 {
110 return (String JavaDoc)getValue("Processing");
111 }
112 public void setStartDate (Timestamp StartDate)
113 {
114 if (StartDate == null) throw new IllegalArgumentException JavaDoc ("StartDate is mandatory");
115 setValue ("StartDate", StartDate);
116 }
117 public Timestamp getStartDate()
118 {
119 return (Timestamp)getValue("StartDate");
120 }
121 }
122
Popular Tags