1 package org.apache.ojb.broker; 2 3 public class StockDetail implements java.io.Serializable 4 { 5 6 protected boolean isSelloutArticle; 7 8 protected int minimumStock; 9 10 protected int orderedUnits; 11 12 protected int stock; 13 14 protected String unit; 15 16 private ArticleWithStockDetail myArticle; 17 18 public StockDetail() 19 { 20 21 } 22 23 public StockDetail(boolean sellout, int minimum, int ordered, int stock, String unit, ArticleWithStockDetail parent) 24 { 25 isSelloutArticle = sellout; 26 minimumStock = minimum; 27 orderedUnits = ordered; 28 this.stock = stock; 29 this.unit = unit; 30 myArticle = parent; 31 } 32 33 34 public int getStock() 35 { 36 return stock; 37 } 38 39 public void setStock(int newStock) 40 { 41 stock = newStock; 42 if (myArticle != null) 44 { 45 myArticle.stock = newStock; 46 } 47 } 48 52 public boolean isSelloutArticle() 53 { 54 return isSelloutArticle; 55 } 56 57 61 public int getMinimumStock() 62 { 63 return minimumStock; 64 } 65 66 70 public ArticleWithStockDetail getMyArticle() 71 { 72 return myArticle; 73 } 74 75 79 public int getOrderedUnits() 80 { 81 return orderedUnits; 82 } 83 84 88 public String getUnit() 89 { 90 return unit; 91 } 92 93 97 public void setIsSelloutArticle(boolean isSelloutArticle) 98 { 99 this.isSelloutArticle = isSelloutArticle; 100 } 101 102 106 public void setMinimumStock(int minimumStock) 107 { 108 this.minimumStock = minimumStock; 109 } 110 111 115 public void setMyArticle(ArticleWithStockDetail myArticle) 116 { 117 this.myArticle = myArticle; 118 } 119 120 124 public void setOrderedUnits(int orderedUnits) 125 { 126 this.orderedUnits = orderedUnits; 127 } 128 129 133 public void setUnit(String unit) 134 { 135 this.unit = unit; 136 } 137 138 } 139 | Popular Tags |