Source Code Cross Referenced for AccountBean.java in  » EJB-Server-JBoss-4.2.1 » testsuite » org » jboss » test » banknew » 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 » EJB Server JBoss 4.2.1 » testsuite » org.jboss.test.banknew.ejb 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * JBoss, Home of Professional Open Source.
003:         * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004:         * as indicated by the @author tags. See the copyright.txt file in the
005:         * distribution for a full listing of individual contributors.
006:         *
007:         * This is free software; you can redistribute it and/or modify it
008:         * under the terms of the GNU Lesser General Public License as
009:         * published by the Free Software Foundation; either version 2.1 of
010:         * the License, or (at your option) any later version.
011:         *
012:         * This software is distributed in the hope that it will be useful,
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
014:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015:         * Lesser General Public License for more details.
016:         *
017:         * You should have received a copy of the GNU Lesser General Public
018:         * License along with this software; if not, write to the Free
019:         * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020:         * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021:         */
022:        package org.jboss.test.banknew.ejb;
023:
024:        import javax.ejb.CreateException;
025:
026:        import org.jboss.test.banknew.interfaces.AccountData;
027:        import org.jboss.test.banknew.interfaces.AccountPK;
028:        import org.jboss.test.util.ejb.EntitySupport;
029:
030:        /**
031:         * The Entity bean represents a bank account
032:         *
033:         * @author Andreas Schaefer
034:         * @version $Revision: 57211 $
035:         *
036:         * @ejb:bean name="bank/Account"
037:         *           display-name="Bank Account Entity"
038:         *           type="CMP"
039:         *           view-type="remote"
040:         *           jndi-name="ejb/bank/Account"
041:         *           schema="Account"
042:         *
043:         * @ejb:interface extends="javax.ejb.EJBObject"
044:         *
045:         * @ejb:home extends="javax.ejb.EJBHome"
046:         *
047:         * @ejb:pk extends="java.lang.Object"
048:         *
049:         * @ejb:transaction type="Required"
050:         *
051:         * @ejb:data-object setdata="true"
052:         *                  extends="java.lang.Object"
053:         *
054:         * @ejb:finder signature="java.util.Collection findAll()"
055:         *             query="SELECT OBJECT(o) from Account AS o"
056:         *
057:         * @ejb:finder signature="java.util.Collection findByCustomer( java.lang.String pCustomerId )"
058:         *             query="SELECT OBJECT(o) from Account AS o WHERE o.customerId = ?1"
059:         *
060:         * @jboss:finder-query name="findByCustomer"
061:         *                     query="Customer_Id = {0}"
062:         *                     order="Type"
063:         *
064:         * @ejb:finder signature="org.jboss.test.banknew.interfaces.Account findByCustomerAndType( java.lang.String pCustomerId, int pType )"
065:         *             query="SELECT OBJECT(o) from Account AS o WHERE o.customerId = ?1 AND o.type = ?2"
066:         *
067:         * @jboss:finder-query name="findByCustomerAndType"
068:         *                     query="Customer_Id = {0} AND Type = {1}"
069:         *
070:         * @jboss:table-name table-name="New_Account"
071:         *
072:         * @jboss:create-table create="true"
073:         *
074:         * @jboss:remove-table remove="true"
075:         */
076:        public abstract class AccountBean extends EntitySupport {
077:            // Constants -----------------------------------------------------
078:
079:            // Attributes ----------------------------------------------------
080:
081:            // Static --------------------------------------------------------
082:
083:            // Constructors --------------------------------------------------
084:
085:            // Public --------------------------------------------------------
086:
087:            /**
088:             * @ejb:persistent-field
089:             * @ejb:pk-field
090:             *
091:             * @jboss:column-name name="Id"
092:             **/
093:            abstract public String getId();
094:
095:            abstract public void setId(String pId);
096:
097:            /**
098:             * @ejb:persistent-field
099:             *
100:             * @jboss:column-name name="Customer_Id"
101:             **/
102:            abstract public String getCustomerId();
103:
104:            abstract public void setCustomerId(String pCustomerId);
105:
106:            /**
107:             * @ejb:persistent-field
108:             *
109:             * @jboss:column-name name="Type"
110:             **/
111:            abstract public int getType();
112:
113:            abstract public void setType(int pType);
114:
115:            /**
116:             * @ejb:persistent-field
117:             * @ejb:interface-method view-type="remote"
118:             *
119:             * @jboss:column-name name="Balance"
120:             **/
121:            abstract public float getBalance();
122:
123:            abstract public void setBalance(float pAmount);
124:
125:            /**
126:             * @ejb:interface-method view-type="remote"
127:             **/
128:            public abstract void setData(AccountData pData);
129:
130:            /**
131:             * @ejb:interface-method view-type="remote"
132:             **/
133:            public abstract AccountData getData();
134:
135:            //   protected abstract void makeDirty();
136:
137:            //   protected abstract void makeClean();
138:
139:            // EntityBean implementation -------------------------------------
140:            /**
141:             * @ejb:create-method view-type="remote"
142:             **/
143:            public AccountPK ejbCreate(AccountData pData)
144:                    throws CreateException {
145:                setId(pData.getCustomerId() + ":" + pData.getType());
146:                setData(pData);
147:
148:                return null;
149:            }
150:
151:            public void ejbPostCreate(AccountData data) throws CreateException {
152:            }
153:        }
154:
155:        /*
156:         *   $Id: AccountBean.java 57211 2006-09-26 12:39:46Z dimitris@jboss.org $
157:         *   Currently locked by:$Locker$
158:         *   Revision:
159:         *   $Log$
160:         *   Revision 1.2.16.2  2006/03/01 15:58:56  adrian
161:         *   Remove xdoclet from the jca tests + other tidyup
162:         *
163:         *   Revision 1.2.16.1  2005/10/29 05:04:35  starksm
164:         *   Update the LGPL header
165:         *
166:         *   Revision 1.2  2002/05/06 00:07:36  danch
167:         *   Added ejbql query specs, schema names
168:         *
169:         *   Revision 1.1  2002/05/04 01:08:25  schaefera
170:         *   Added new Stats classes (JMS related) to JSR-77 implemenation and added the
171:         *   bank-new test application but this does not work right now properly but
172:         *   it is not added to the default tests so I shouldn't bother someone.
173:         *
174:         *   Revision 1.1.2.5  2002/04/30 01:21:23  schaefera
175:         *   Added some fixes to the marathon test and a windows script.
176:         *
177:         *   Revision 1.1.2.4  2002/04/29 21:05:17  schaefera
178:         *   Added new marathon test suite using the new bank application
179:         *
180:         *   Revision 1.1.2.3  2002/04/17 05:07:24  schaefera
181:         *   Redesigned the banknew example therefore to a create separation between
182:         *   the Entity Bean (CMP) and the Session Beans (Business Logic).
183:         *   The test cases are redesigned but not finished yet.
184:         *
185:         *   Revision 1.1.2.2  2002/04/15 04:28:15  schaefera
186:         *   Minor fixes regarding to the JNDI names of the beans.
187:         *
188:         *   Revision 1.1.2.1  2002/04/15 02:32:24  schaefera
189:         *   Add a new test version of the bank because the old did no use transactions
190:         *   and the new uses XDoclet 1.1.2 to generate the DDs and other Java classes.
191:         *   Also a marathon test is added. Please specify the jbosstest.duration for
192:         *   how long and the test.timeout (which must be longer than the duration) to
193:         *   run the test with run_tests.xml, tag marathon-test-and-report.
194:         *
195:         *   Revision 1.2.2.1  2001/12/27 22:00:02  starksm
196:         *
197:         *   Set dirty to false in ejbStore
198:         *
199:         *   Revision 1.2  2001/01/07 23:14:34  peter
200:         *   Trying to get JAAS to work within test suite.
201:         *
202:         *   Revision 1.1.1.1  2000/06/21 15:52:37  oberg
203:         *   Initial import of jBoss test. This module contains CTS tests, some simple examples, and small bean suites.
204:         */
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.