KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > compare > PerformanceArticle


1 package org.apache.ojb.compare;
2
3 import java.io.Serializable JavaDoc;
4
5 public class PerformanceArticle implements Serializable JavaDoc
6 {
7     /** maps to db-column "Artikel-Nr";INT;PrimaryKey*/
8     protected Integer JavaDoc articleId;
9     /** maps to db-column Artikelname;CHAR*/
10     protected String JavaDoc articleName;
11     
12     /** maps to db-column Mindestbestand;INT*/
13     protected int minimumStock;
14     /** maps to db-column BestellteEinheiten;INT*/
15     protected int orderedUnits;
16     /** maps to db-column Einzelpreis;DECIMAL*/
17     protected double price;
18     
19     /** maps to db-column Kategorie-Nr;INT*/
20     protected int productGroupId;
21     /** maps to db-column Lagerbestand;INT*/
22     protected int stock;
23     /** maps to db-column Lieferanten-Nr;INT*/
24     protected int supplierId;
25     /** maps to db-column Liefereinheit;CHAR*/
26     protected String JavaDoc unit;
27
28     /** increase the amount of articles in stock by diff*/
29     public void addToStock(int diff)
30     {
31         stock += diff;
32     }
33
34     /**
35      * return an articles unique id.
36      * @return int the articles unique id
37      */

38     public Integer JavaDoc getArticleId()
39     {
40         return articleId;
41     }
42
43     /**
44      * return an articles name.
45      * @return java.lang.String
46      */

47     public String JavaDoc getArticleName()
48     {
49         return articleName;
50     }
51
52     /** return an articles ProductGroup*/
53
54     public double getStockValue()
55     {
56         return price * stock;
57     }
58
59     /**
60      * set an articles unique id.
61      * @param newArticleId int
62      */

63     public void setArticleId(Integer JavaDoc newArticleId)
64     {
65         articleId = newArticleId;
66     }
67
68     /**
69      * set an articles name.
70      * @param newArticleName java.lang.String
71      */

72     public void setArticleName(java.lang.String JavaDoc newArticleName)
73     {
74         articleName = newArticleName;
75     }
76
77     /**
78      * Insert the method's description here.
79      * Creation date: (05.01.2001 19:31:04)
80      */

81     public PerformanceArticle()
82     {
83     }
84
85     /**
86      * Insert the method's description here.
87      * Creation date: (10.12.2000 14:40:04)
88      * @return int
89      */

90     public int getMinimumStock()
91     {
92         return minimumStock;
93     }
94
95     /**
96      * Insert the method's description here.
97      * Creation date: (10.12.2000 14:40:04)
98      * @return int
99      */

100     public int getOrderedUnits()
101     {
102         return orderedUnits;
103     }
104
105     /**
106      * Insert the method's description here.
107      * Creation date: (10.12.2000 14:40:04)
108      * @return double
109      */

110     public double getPrice()
111     {
112         return price;
113     }
114
115
116     /**
117      * Insert the method's description here.
118      * Creation date: (10.12.2000 14:40:04)
119      * @return int
120      */

121     public int getProductGroupId()
122     {
123         return productGroupId;
124     }
125
126     /**
127      * Insert the method's description here.
128      * Creation date: (10.12.2000 14:40:04)
129      * @return int
130      */

131     public int getStock()
132     {
133         return stock;
134     }
135
136     /**
137      * Insert the method's description here.
138      * Creation date: (10.12.2000 14:40:04)
139      * @return int
140      */

141     public int getSupplierId()
142     {
143         return supplierId;
144     }
145
146     /**
147      * Insert the method's description here.
148      * Creation date: (10.12.2000 14:40:04)
149      * @return java.lang.String
150      */

151     public java.lang.String JavaDoc getUnit()
152     {
153         return unit;
154     }
155
156
157
158     /**
159      * Insert the method's description here.
160      * Creation date: (10.12.2000 14:40:04)
161      * @param newMinimumStock int
162      */

163     public void setMinimumStock(int newMinimumStock)
164     {
165         minimumStock = newMinimumStock;
166     }
167
168     /**
169      * Insert the method's description here.
170      * Creation date: (10.12.2000 14:40:04)
171      * @param newOrderedUnits int
172      */

173     public void setOrderedUnits(int newOrderedUnits)
174     {
175         orderedUnits = newOrderedUnits;
176     }
177
178     /**
179      * Insert the method's description here.
180      * Creation date: (10.12.2000 14:40:04)
181      * @param newPrice double
182      */

183     public void setPrice(double newPrice)
184     {
185         price = newPrice;
186     }
187
188
189     /**
190      * Insert the method's description here.
191      * Creation date: (10.12.2000 14:40:04)
192      * @param newProductGroupId int
193      */

194     public void setProductGroupId(int newProductGroupId)
195     {
196         productGroupId = newProductGroupId;
197     }
198
199     /**
200      * Insert the method's description here.
201      * Creation date: (10.12.2000 14:40:04)
202      * @param newStock int
203      */

204     public void setStock(int newStock)
205     {
206         stock = newStock;
207     }
208
209     /**
210      * Insert the method's description here.
211      * Creation date: (10.12.2000 14:40:04)
212      * @param newSupplierId int
213      */

214     public void setSupplierId(int newSupplierId)
215     {
216         supplierId = newSupplierId;
217     }
218
219     /**
220      * Insert the method's description here.
221      * Creation date: (10.12.2000 14:40:04)
222      * @param newUnit java.lang.String
223      */

224     public void setUnit(java.lang.String JavaDoc newUnit)
225     {
226         unit = newUnit;
227     }
228 }
229
Popular Tags