001: package org.apache.ojb.compare;
002:
003: import java.io.Serializable;
004:
005: public class PerformanceArticle implements Serializable {
006: /** maps to db-column "Artikel-Nr";INT;PrimaryKey*/
007: protected Integer articleId;
008: /** maps to db-column Artikelname;CHAR*/
009: protected String articleName;
010:
011: /** maps to db-column Mindestbestand;INT*/
012: protected int minimumStock;
013: /** maps to db-column BestellteEinheiten;INT*/
014: protected int orderedUnits;
015: /** maps to db-column Einzelpreis;DECIMAL*/
016: protected double price;
017:
018: /** maps to db-column Kategorie-Nr;INT*/
019: protected int productGroupId;
020: /** maps to db-column Lagerbestand;INT*/
021: protected int stock;
022: /** maps to db-column Lieferanten-Nr;INT*/
023: protected int supplierId;
024: /** maps to db-column Liefereinheit;CHAR*/
025: protected String unit;
026:
027: /** increase the amount of articles in stock by diff*/
028: public void addToStock(int diff) {
029: stock += diff;
030: }
031:
032: /**
033: * return an articles unique id.
034: * @return int the articles unique id
035: */
036: public Integer getArticleId() {
037: return articleId;
038: }
039:
040: /**
041: * return an articles name.
042: * @return java.lang.String
043: */
044: public String getArticleName() {
045: return articleName;
046: }
047:
048: /** return an articles ProductGroup*/
049:
050: public double getStockValue() {
051: return price * stock;
052: }
053:
054: /**
055: * set an articles unique id.
056: * @param newArticleId int
057: */
058: public void setArticleId(Integer newArticleId) {
059: articleId = newArticleId;
060: }
061:
062: /**
063: * set an articles name.
064: * @param newArticleName java.lang.String
065: */
066: public void setArticleName(java.lang.String newArticleName) {
067: articleName = newArticleName;
068: }
069:
070: /**
071: * Insert the method's description here.
072: * Creation date: (05.01.2001 19:31:04)
073: */
074: public PerformanceArticle() {
075: }
076:
077: /**
078: * Insert the method's description here.
079: * Creation date: (10.12.2000 14:40:04)
080: * @return int
081: */
082: public int getMinimumStock() {
083: return minimumStock;
084: }
085:
086: /**
087: * Insert the method's description here.
088: * Creation date: (10.12.2000 14:40:04)
089: * @return int
090: */
091: public int getOrderedUnits() {
092: return orderedUnits;
093: }
094:
095: /**
096: * Insert the method's description here.
097: * Creation date: (10.12.2000 14:40:04)
098: * @return double
099: */
100: public double getPrice() {
101: return price;
102: }
103:
104: /**
105: * Insert the method's description here.
106: * Creation date: (10.12.2000 14:40:04)
107: * @return int
108: */
109: public int getProductGroupId() {
110: return productGroupId;
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 getStock() {
119: return stock;
120: }
121:
122: /**
123: * Insert the method's description here.
124: * Creation date: (10.12.2000 14:40:04)
125: * @return int
126: */
127: public int getSupplierId() {
128: return supplierId;
129: }
130:
131: /**
132: * Insert the method's description here.
133: * Creation date: (10.12.2000 14:40:04)
134: * @return java.lang.String
135: */
136: public java.lang.String getUnit() {
137: return unit;
138: }
139:
140: /**
141: * Insert the method's description here.
142: * Creation date: (10.12.2000 14:40:04)
143: * @param newMinimumStock int
144: */
145: public void setMinimumStock(int newMinimumStock) {
146: minimumStock = newMinimumStock;
147: }
148:
149: /**
150: * Insert the method's description here.
151: * Creation date: (10.12.2000 14:40:04)
152: * @param newOrderedUnits int
153: */
154: public void setOrderedUnits(int newOrderedUnits) {
155: orderedUnits = newOrderedUnits;
156: }
157:
158: /**
159: * Insert the method's description here.
160: * Creation date: (10.12.2000 14:40:04)
161: * @param newPrice double
162: */
163: public void setPrice(double newPrice) {
164: price = newPrice;
165: }
166:
167: /**
168: * Insert the method's description here.
169: * Creation date: (10.12.2000 14:40:04)
170: * @param newProductGroupId int
171: */
172: public void setProductGroupId(int newProductGroupId) {
173: productGroupId = newProductGroupId;
174: }
175:
176: /**
177: * Insert the method's description here.
178: * Creation date: (10.12.2000 14:40:04)
179: * @param newStock int
180: */
181: public void setStock(int newStock) {
182: stock = newStock;
183: }
184:
185: /**
186: * Insert the method's description here.
187: * Creation date: (10.12.2000 14:40:04)
188: * @param newSupplierId int
189: */
190: public void setSupplierId(int newSupplierId) {
191: supplierId = newSupplierId;
192: }
193:
194: /**
195: * Insert the method's description here.
196: * Creation date: (10.12.2000 14:40:04)
197: * @param newUnit java.lang.String
198: */
199: public void setUnit(java.lang.String newUnit) {
200: unit = newUnit;
201: }
202: }
|