Source Code Cross Referenced for ArticleWithStockDetail.java in  » Database-ORM » db-ojb » org » apache » ojb » broker » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » db ojb » org.apache.ojb.broker 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.apache.ojb.broker;
002:
003:        public class ArticleWithStockDetail implements  java.io.Serializable {
004:
005:            /** return a string representation of an article*/
006:            public String toString() {
007:                return "----\n" + "Article No:   " + articleId + "\n"
008:                        + "Description:  " + articleName + "\n"
009:                        + "stock:        " + stock + "\n" + "price:        "
010:                        + price + "\n" + "stock-value   " + getStockValue()
011:                        + "\n";
012:
013:            }
014:
015:            /** maps to db-column "Artikel-Nr";INT;PrimaryKey*/
016:            protected int articleId;
017:            /** maps to db-column Artikelname;CHAR*/
018:            protected String articleName;
019:            /** maps to db-column Auslaufartikel;SMALL INT*/
020:            boolean isSelloutArticle;
021:            /** maps to db-column Mindestbestand;INT*/
022:            int minimumStock;
023:            /** maps to db-column BestellteEinheiten;INT*/
024:            int orderedUnits;
025:
026:            /** this attribute is not filled through a reference lookup but with a RowReader !*/
027:            protected StockDetail stockDetail;
028:
029:            /** maps to db-column Einzelpreis;DECIMAL*/
030:            protected double price;
031:            /** maps to db-column Kategorie-Nr;INT*/
032:            protected int productGroupId;
033:            /** maps to db-column Lagerbestand;INT*/
034:            int stock;
035:            /** maps to db-column Lieferanten-Nr;INT*/
036:            protected int supplierId;
037:            /** maps to db-column Liefereinheit;CHAR*/
038:            String unit;
039:
040:            /** increase the amount of articles in stock by diff*/
041:            public void addToStock(int diff) {
042:                stock += diff;
043:            }
044:
045:            /**
046:             * return an articles unique id.
047:             * @return int the articles unique id
048:             */
049:            public int getArticleId() {
050:                return articleId;
051:            }
052:
053:            /**
054:             * return an articles name.
055:             * @return java.lang.String
056:             */
057:            public String getArticleName() {
058:                return articleName;
059:            }
060:
061:            /** return an articles ProductGroup*/
062:
063:            public double getStockValue() {
064:                return price * stockDetail.getStock();
065:            }
066:
067:            /**
068:             * set an articles unique id.
069:             * @param newArticleId int
070:             */
071:            public void setArticleId(int newArticleId) {
072:                articleId = newArticleId;
073:            }
074:
075:            /**
076:             * set an articles name.
077:             * @param newArticleName java.lang.String
078:             */
079:            public void setArticleName(String newArticleName) {
080:                articleName = newArticleName;
081:            }
082:
083:            /**
084:             * Insert the method's description here.
085:             * Creation date: (05.01.2001 19:31:04)
086:             */
087:            public ArticleWithStockDetail() {
088:            }
089:
090:            /**
091:             * Insert the method's description here.
092:             * Creation date: (05.01.2001 19:21:38)
093:             */
094:            public ArticleWithStockDetail(int artId, String artName,
095:                    int suppId, int pgId, String uni, double pric, int sto,
096:                    int ordUnits, int minStock, boolean isSellout) {
097:                articleId = artId;
098:                articleName = artName;
099:                supplierId = suppId;
100:                productGroupId = pgId;
101:                unit = uni;
102:                price = pric;
103:                stock = sto;
104:                orderedUnits = ordUnits;
105:                minimumStock = minStock;
106:                isSelloutArticle = isSellout;
107:            }
108:
109:            /**
110:             * Insert the method's description here.
111:             * Creation date: (10.12.2000 14:40:04)
112:             * @return boolean
113:             */
114:            public boolean getIsSelloutArticle() {
115:                return isSelloutArticle;
116:            }
117:
118:            /**
119:             * Insert the method's description here.
120:             * Creation date: (10.12.2000 14:40:04)
121:             * @return int
122:             */
123:            public int getMinimumStock() {
124:                return minimumStock;
125:            }
126:
127:            /**
128:             * Insert the method's description here.
129:             * Creation date: (10.12.2000 14:40:04)
130:             * @return int
131:             */
132:            public int getOrderedUnits() {
133:                return orderedUnits;
134:            }
135:
136:            /**
137:             * Insert the method's description here.
138:             * Creation date: (10.12.2000 14:40:04)
139:             * @return double
140:             */
141:            public double getPrice() {
142:                return price;
143:            }
144:
145:            /**
146:             * Insert the method's description here.
147:             * Creation date: (10.12.2000 14:40:04)
148:             * @return int
149:             */
150:            public int getProductGroupId() {
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 getSupplierId() {
160:                return supplierId;
161:            }
162:
163:            /**
164:             * Insert the method's description here.
165:             * Creation date: (10.12.2000 14:40:04)
166:             * @return java.lang.String
167:             */
168:            public String getUnit() {
169:                return unit;
170:            }
171:
172:            /**
173:             * Insert the method's description here.
174:             * Creation date: (10.12.2000 14:40:04)
175:             * @param newIsSelloutArticle int
176:             */
177:            public void setIsSelloutArticle(boolean newIsSelloutArticle) {
178:                isSelloutArticle = newIsSelloutArticle;
179:            }
180:
181:            /**
182:             * Insert the method's description here.
183:             * Creation date: (10.12.2000 14:40:04)
184:             * @param newMinimumStock int
185:             */
186:            public void setMinimumStock(int newMinimumStock) {
187:                minimumStock = newMinimumStock;
188:            }
189:
190:            /**
191:             * Insert the method's description here.
192:             * Creation date: (10.12.2000 14:40:04)
193:             * @param newOrderedUnits int
194:             */
195:            public void setOrderedUnits(int newOrderedUnits) {
196:                orderedUnits = newOrderedUnits;
197:            }
198:
199:            /**
200:             * Insert the method's description here.
201:             * Creation date: (10.12.2000 14:40:04)
202:             * @param newPrice double
203:             */
204:            public void setPrice(double newPrice) {
205:                price = newPrice;
206:            }
207:
208:            /**
209:             * Insert the method's description here.
210:             * Creation date: (10.12.2000 14:40:04)
211:             * @param newProductGroupId int
212:             */
213:            public void setProductGroupId(int newProductGroupId) {
214:                productGroupId = newProductGroupId;
215:            }
216:
217:            /**
218:             * Insert the method's description here.
219:             * Creation date: (10.12.2000 14:40:04)
220:             * @param newSupplierId int
221:             */
222:            public void setSupplierId(int newSupplierId) {
223:                supplierId = newSupplierId;
224:            }
225:
226:            /**
227:             * Insert the method's description here.
228:             * Creation date: (10.12.2000 14:40:04)
229:             * @param newUnit java.lang.String
230:             */
231:            public void setUnit(String newUnit) {
232:                unit = newUnit;
233:            }
234:
235:            public StockDetail getDetail() {
236:                return stockDetail;
237:            }
238:
239:            /**
240:             * Gets the stock.
241:             * @return Returns a int
242:             */
243:            public int getStock() {
244:                return stock;
245:            }
246:
247:            /**
248:             * Sets the stock.
249:             * @param stock The stock to set
250:             */
251:            public void setStock(int stock) {
252:                this.stock = stock;
253:            }
254:
255:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.