Source Code Cross Referenced for LineItemEJB.java in  » J2EE » JOnAS-4.8.6 » com » sun » j2ee » blueprints » lineitem » ejb » 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 » J2EE » JOnAS 4.8.6 » com.sun.j2ee.blueprints.lineitem.ejb 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
003:         *
004:         * Redistribution and use in source and binary forms, with or without
005:         * modification, are permitted provided that the following conditions
006:         * are met:
007:         *
008:         * - Redistributions of source code must retain the above copyright
009:         *   notice, this list of conditions and the following disclaimer.
010:         *
011:         * - Redistribution in binary form must reproduce the above copyright
012:         *   notice, this list of conditions and the following disclaimer in
013:         *   the documentation and/or other materials provided with the
014:         *   distribution.
015:         *
016:         * Neither the name of Sun Microsystems, Inc. or the names of
017:         * contributors may be used to endorse or promote products derived
018:         * from this software without specific prior written permission.
019:         *
020:         * This software is provided "AS IS," without a warranty of any
021:         * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
022:         * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
023:         * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
024:         * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES
025:         * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
026:         * DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN
027:         * OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR
028:         * FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
029:         * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
030:         * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE,
031:         * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
032:         *
033:         * You acknowledge that Software is not designed, licensed or intended
034:         * for use in the design, construction, operation or maintenance of
035:         * any nuclear facility.
036:         */
037:        package com.sun.j2ee.blueprints.lineitem.ejb;
038:
039:        import java.lang.Object;
040:
041:        import javax.ejb.EntityBean;
042:        import javax.ejb.EntityContext;
043:        import javax.ejb.CreateException;
044:        import javax.ejb.RemoveException;
045:
046:        /**
047:         * This is the main Entity Bean class for LineItemEJB
048:         */
049:
050:        public abstract class LineItemEJB implements  EntityBean {
051:
052:            private EntityContext context = null;
053:
054:            /**
055:             * Accessor for line item's category id
056:             * @return String   the category id
057:             */
058:            public abstract String getCategoryId();
059:
060:            /**
061:             * Setter for line item's category id
062:             * @param String      the category id
063:             */
064:            public abstract void setCategoryId(String id);
065:
066:            /**
067:             * Accessor for line item's product id
068:             * @return String   the product id
069:             */
070:            public abstract String getProductId();
071:
072:            /**
073:             * Setter for line item's product id
074:             * @param String      the product id
075:             */
076:            public abstract void setProductId(String id);
077:
078:            /**
079:             * Accessor for line item's item id
080:             * @return String   the item id
081:             */
082:            public abstract String getItemId();
083:
084:            /**
085:             * Setter for line item's item id
086:             * @param String      the item id
087:             */
088:            public abstract void setItemId(String id);
089:
090:            /**
091:             * Accessor for line item's line number
092:             * @return String   the linenumber
093:             */
094:            public abstract String getLineNumber();
095:
096:            /**
097:             * Setter for line item's line number
098:             * @param String      the line number
099:             */
100:            public abstract void setLineNumber(String num);
101:
102:            /**
103:             * Accessor for line item's quantity
104:             * @return int   the quantity
105:             */
106:            public abstract int getQuantity();
107:
108:            /**
109:             * Setter for line item's quantity
110:             * @param int      the quantity
111:             */
112:            public abstract void setQuantity(int qty);
113:
114:            /**
115:             * Accessor for line item's unit price
116:             * @return float   the unit price
117:             */
118:            public abstract float getUnitPrice();
119:
120:            /**
121:             * Setter for line item's unit price
122:             * @param float      the unit price
123:             */
124:            public abstract void setUnitPrice(float price);
125:
126:            /**
127:             * Accessor for line item's qty that is shipped
128:             * @return int the qty already shipped
129:             */
130:            public abstract int getQuantityShipped();
131:
132:            /**
133:             * Setter for line item's quantity that is already shipped
134:             * @param int the qty already shipped
135:             */
136:            public abstract void setQuantityShipped(int qty);
137:
138:            /**
139:             * The ejb create method - returns object because there is primary key
140:             */
141:            public Object ejbCreate(String catId, String prodId, String itemId,
142:                    String lineNo, int qty, float price, int qtyShipped)
143:                    throws CreateException {
144:                setCategoryId(catId);
145:                setProductId(prodId);
146:                setItemId(itemId);
147:                setLineNumber(lineNo);
148:                setQuantity(qty);
149:                setUnitPrice(price);
150:                setQuantityShipped(qtyShipped);
151:                return null;
152:            }
153:
154:            public void ejbPostCreate(String catId, String prodId,
155:                    String itemId, String lineNo, int qty, float price,
156:                    int qtyShipped) throws CreateException {
157:            }
158:
159:            public Object ejbCreate(LineItem lineItem, int qty)
160:                    throws CreateException {
161:                setCategoryId(lineItem.getCategoryId());
162:                setProductId(lineItem.getProductId());
163:                setItemId(lineItem.getItemId());
164:                setLineNumber(lineItem.getLineNumber());
165:                setQuantity(lineItem.getQuantity());
166:                setUnitPrice(lineItem.getUnitPrice());
167:                setQuantityShipped(qty);
168:                return null;
169:            }
170:
171:            public void ejbPostCreate(LineItem lineItem, int qty)
172:                    throws CreateException {
173:            }
174:
175:            public LineItem getData() {
176:                LineItem lineItem = new LineItem();
177:                lineItem.setCategoryId(getCategoryId());
178:                lineItem.setProductId(getProductId());
179:                lineItem.setItemId(getItemId());
180:                lineItem.setLineNumber(getLineNumber());
181:                lineItem.setQuantity(getQuantity());
182:                lineItem.setUnitPrice(getUnitPrice());
183:                return lineItem;
184:            }
185:
186:            /**
187:             * Other life cycle methods
188:             */
189:            public void setEntityContext(EntityContext c) {
190:                context = c;
191:            }
192:
193:            public void unsetEntityContext() {
194:            }
195:
196:            public void ejbRemove() throws RemoveException {
197:            }
198:
199:            public void ejbActivate() {
200:            }
201:
202:            public void ejbPassivate() {
203:            }
204:
205:            public void ejbStore() {
206:            }
207:
208:            public void ejbLoad() {
209:            }
210:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.