KickJava   Java API By Example, From Geeks To Geeks.

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


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

36     public int getArticleId()
37     {
38         return articleId;
39     }
40
41     /**
42      * return an articles name.
43      * @return java.lang.String
44      */

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

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

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

79     public PerformanceArticle()
80     {
81     }
82
83     /**
84      * Insert the method's description here.
85      * Creation date: (05.01.2001 19:21:38)
86      */

87     public PerformanceArticle(
88             int artId,
89             String JavaDoc artName,
90             int suppId,
91             int pgId,
92             String JavaDoc uni,
93             double pric,
94             int sto,
95             int ordUnits,
96             int minStock
97             )
98     {
99         articleId = artId;
100         articleName = artName;
101         supplierId = suppId;
102         productGroupId = pgId;
103         unit = uni;
104         price = pric;
105         stock = sto;
106         orderedUnits = ordUnits;
107         minimumStock = minStock;
108         
109     }
110
111
112
113     /**
114      * Insert the method's description here.
115      * Creation date: (10.12.2000 14:40:04)
116      * @return int
117      */

118     public int getMinimumStock()
119     {
120         return minimumStock;
121     }
122
123     /**
124      * Insert the method's description here.
125      * Creation date: (10.12.2000 14:40:04)
126      * @return int
127      */

128     public int getOrderedUnits()
129     {
130         return orderedUnits;
131     }
132
133     /**
134      * Insert the method's description here.
135      * Creation date: (10.12.2000 14:40:04)
136      * @return double
137      */

138     public double getPrice()
139     {
140         return price;
141     }
142
143
144     /**
145      * Insert the method's description here.
146      * Creation date: (10.12.2000 14:40:04)
147      * @return int
148      */

149     public int getProductGroupId()
150     {
151         return productGroupId;
152     }
153
154     /**
155      * Insert the method's description here.
156      * Creation date: (10.12.2000 14:40:04)
157      * @return int
158      */

159     public int getStock()
160     {
161         return stock;
162     }
163
164     /**
165      * Insert the method's description here.
166      * Creation date: (10.12.2000 14:40:04)
167      * @return int
168      */

169     public int getSupplierId()
170     {
171         return supplierId;
172     }
173
174     /**
175      * Insert the method's description here.
176      * Creation date: (10.12.2000 14:40:04)
177      * @return java.lang.String
178      */

179     public java.lang.String JavaDoc getUnit()
180     {
181         return unit;
182     }
183
184
185
186     /**
187      * Insert the method's description here.
188      * Creation date: (10.12.2000 14:40:04)
189      * @param newMinimumStock int
190      */

191     public void setMinimumStock(int newMinimumStock)
192     {
193         minimumStock = newMinimumStock;
194     }
195
196     /**
197      * Insert the method's description here.
198      * Creation date: (10.12.2000 14:40:04)
199      * @param newOrderedUnits int
200      */

201     public void setOrderedUnits(int newOrderedUnits)
202     {
203         orderedUnits = newOrderedUnits;
204     }
205
206     /**
207      * Insert the method's description here.
208      * Creation date: (10.12.2000 14:40:04)
209      * @param newPrice double
210      */

211     public void setPrice(double newPrice)
212     {
213         price = newPrice;
214     }
215
216
217     /**
218      * Insert the method's description here.
219      * Creation date: (10.12.2000 14:40:04)
220      * @param newProductGroupId int
221      */

222     public void setProductGroupId(int newProductGroupId)
223     {
224         productGroupId = newProductGroupId;
225     }
226
227     /**
228      * Insert the method's description here.
229      * Creation date: (10.12.2000 14:40:04)
230      * @param newStock int
231      */

232     public void setStock(int newStock)
233     {
234         stock = newStock;
235     }
236
237     /**
238      * Insert the method's description here.
239      * Creation date: (10.12.2000 14:40:04)
240      * @param newSupplierId int
241      */

242     public void setSupplierId(int newSupplierId)
243     {
244         supplierId = newSupplierId;
245     }
246
247     /**
248      * Insert the method's description here.
249      * Creation date: (10.12.2000 14:40:04)
250      * @param newUnit java.lang.String
251      */

252     public void setUnit(java.lang.String JavaDoc newUnit)
253     {
254         unit = newUnit;
255     }
256 }
257
Popular Tags