1 package org.apache.ojb.broker; 2 3 public class PerformanceArticle implements java.io.Serializable 4 { 5 6 protected int articleId; 7 8 protected String articleName; 9 10 11 protected int minimumStock; 12 13 protected int orderedUnits; 14 15 protected double price; 16 17 18 protected int productGroupId; 19 20 protected int stock; 21 22 protected int supplierId; 23 24 protected String unit; 25 26 27 public void addToStock(int diff) 28 { 29 stock += diff; 30 } 31 32 36 public int getArticleId() 37 { 38 return articleId; 39 } 40 41 45 public java.lang.String getArticleName() 46 { 47 return articleName; 48 } 49 50 51 52 public double getStockValue() 53 { 54 return price * stock; 55 } 56 57 61 public void setArticleId(int newArticleId) 62 { 63 articleId = newArticleId; 64 } 65 66 70 public void setArticleName(java.lang.String newArticleName) 71 { 72 articleName = newArticleName; 73 } 74 75 79 public PerformanceArticle() 80 { 81 } 82 83 87 public PerformanceArticle( 88 int artId, 89 String artName, 90 int suppId, 91 int pgId, 92 String 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 118 public int getMinimumStock() 119 { 120 return minimumStock; 121 } 122 123 128 public int getOrderedUnits() 129 { 130 return orderedUnits; 131 } 132 133 138 public double getPrice() 139 { 140 return price; 141 } 142 143 144 149 public int getProductGroupId() 150 { 151 return productGroupId; 152 } 153 154 159 public int getStock() 160 { 161 return stock; 162 } 163 164 169 public int getSupplierId() 170 { 171 return supplierId; 172 } 173 174 179 public java.lang.String getUnit() 180 { 181 return unit; 182 } 183 184 185 186 191 public void setMinimumStock(int newMinimumStock) 192 { 193 minimumStock = newMinimumStock; 194 } 195 196 201 public void setOrderedUnits(int newOrderedUnits) 202 { 203 orderedUnits = newOrderedUnits; 204 } 205 206 211 public void setPrice(double newPrice) 212 { 213 price = newPrice; 214 } 215 216 217 222 public void setProductGroupId(int newProductGroupId) 223 { 224 productGroupId = newProductGroupId; 225 } 226 227 232 public void setStock(int newStock) 233 { 234 stock = newStock; 235 } 236 237 242 public void setSupplierId(int newSupplierId) 243 { 244 supplierId = newSupplierId; 245 } 246 247 252 public void setUnit(java.lang.String newUnit) 253 { 254 unit = newUnit; 255 } 256 } 257 | Popular Tags |