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