KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > compiere > custom > X_XX_Visit


1 /******************************************************************************
2  * The contents of this file are subject to the Compiere License Version 1.1
3  * ("License"); You may not use this file except in compliance with the License
4  * You may obtain a copy of the License at http://www.compiere.org/license.html
5  * Software distributed under the License is distributed on an "AS IS" basis,
6  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
7  * the specific language governing rights and limitations under the License.
8  * The Original Code is Compiere ERP & CRM Business Solution
9  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
10  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
11  * created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
12  * Contributor(s): ______________________________________.
13  *****************************************************************************/

14 package com.compiere.custom;
15
16 import java.util.*;
17 import java.sql.*;
18 import java.math.*;
19 import java.io.Serializable JavaDoc;
20 import org.compiere.util.*;
21 import org.compiere.model.*;
22
23 /**
24  * Example Generated Model for XX_Visit.
25  * Note that this will not work unless you have the table
26  * in the data dictionary and the ID is 625.
27  * (i.e. you need to re-generate it or change the
28  * reference in method initPO).
29  *
30  * @author Jorg Janke
31  * @version $Id: X_XX_Visit.java,v 1.1 2003/09/29 03:46:32 jjanke Exp $
32  */

33 public class X_XX_Visit extends PO
34 {
35     public X_XX_Visit(Properties ctx, int XX_Visit_ID)
36     {
37         super(ctx, XX_Visit_ID);
38         /*
39         if (XX_Visit_ID == 0)
40         {
41             setAD_User_ID (0);
42             setC_BPartner_ID (0);
43             setC_BPartner_Location_ID (0);
44             setMinutes (0);
45             setName (null);
46             setR_InterestArea_ID (0);
47             setSalesRep_ID (0);
48             setVisitTime (new Timestamp(System.currentTimeMillis()));
49             setXX_Visit_ID (0);
50         }
51         */

52     }
53     public X_XX_Visit(Properties ctx, ResultSet rs)
54     {
55         super(ctx, rs);
56     }
57     protected POInfo initPO(Properties ctx)
58     {
59         int AD_Table_ID = 625;
60         POInfo poi = POInfo.getPOInfo(ctx, AD_Table_ID);
61         return poi;
62     }
63     public String JavaDoc toString()
64     {
65         StringBuffer JavaDoc sb =
66             new StringBuffer JavaDoc("X_XX_Visit[").append(getID()).append("]");
67         return sb.toString();
68     }
69     public void setAD_User_ID(int AD_User_ID)
70     {
71         setValue("AD_User_ID", new Integer JavaDoc(AD_User_ID));
72     }
73     public int getAD_User_ID()
74     {
75         Integer JavaDoc ii = (Integer JavaDoc) getValue("AD_User_ID");
76         if (ii == null)
77             return 0;
78         return ii.intValue();
79     }
80     public void setC_BPartner_ID(int C_BPartner_ID)
81     {
82         setValue("C_BPartner_ID", new Integer JavaDoc(C_BPartner_ID));
83     }
84     public int getC_BPartner_ID()
85     {
86         Integer JavaDoc ii = (Integer JavaDoc) getValue("C_BPartner_ID");
87         if (ii == null)
88             return 0;
89         return ii.intValue();
90     }
91     public void setC_BPartner_Location_ID(int C_BPartner_Location_ID)
92     {
93         setValue("C_BPartner_Location_ID", new Integer JavaDoc(C_BPartner_Location_ID));
94     }
95     public int getC_BPartner_Location_ID()
96     {
97         Integer JavaDoc ii = (Integer JavaDoc) getValue("C_BPartner_Location_ID");
98         if (ii == null)
99             return 0;
100         return ii.intValue();
101     }
102     public void setDescription(String JavaDoc Description)
103     {
104         setValue("Description", Description);
105     }
106     public String JavaDoc getDescription()
107     {
108         return (String JavaDoc) getValue("Description");
109     }
110     public void setMinutes(int Minutes)
111     {
112         setValue("Minutes", new Integer JavaDoc(Minutes));
113     }
114     public int getMinutes()
115     {
116         Integer JavaDoc ii = (Integer JavaDoc) getValue("Minutes");
117         if (ii == null)
118             return 0;
119         return ii.intValue();
120     }
121     public void setName(String JavaDoc Name)
122     {
123         if (Name == null)
124             throw new IllegalArgumentException JavaDoc("Name is mandatory");
125         setValue("Name", Name);
126     }
127     public String JavaDoc getName()
128     {
129         return (String JavaDoc) getValue("Name");
130     }
131     public void setR_InterestArea_ID(int R_InterestArea_ID)
132     {
133         setValue("R_InterestArea_ID", new Integer JavaDoc(R_InterestArea_ID));
134     }
135     public int getR_InterestArea_ID()
136     {
137         Integer JavaDoc ii = (Integer JavaDoc) getValue("R_InterestArea_ID");
138         if (ii == null)
139             return 0;
140         return ii.intValue();
141     }
142     public void setSalesRep_ID(int SalesRep_ID)
143     {
144         setValue("SalesRep_ID", new Integer JavaDoc(SalesRep_ID));
145     }
146     public int getSalesRep_ID()
147     {
148         Integer JavaDoc ii = (Integer JavaDoc) getValue("SalesRep_ID");
149         if (ii == null)
150             return 0;
151         return ii.intValue();
152     }
153     public void setVisitTime(Timestamp VisitTime)
154     {
155         if (VisitTime == null)
156             throw new IllegalArgumentException JavaDoc("VisitTime is mandatory");
157         setValue("VisitTime", VisitTime);
158     }
159     public Timestamp getVisitTime()
160     {
161         return (Timestamp) getValue("VisitTime");
162     }
163     void setXX_Visit_ID(int XX_Visit_ID)
164     {
165         setValueNoCheck("XX_Visit_ID", new Integer JavaDoc(XX_Visit_ID));
166     }
167     public int getXX_Visit_ID()
168     {
169         Integer JavaDoc ii = (Integer JavaDoc) getValue("XX_Visit_ID");
170         if (ii == null)
171             return 0;
172         return ii.intValue();
173     }
174 }
175
Popular Tags