Source Code Cross Referenced for BillEntityBean.java in  » Testing » mockrunner-0.4 » com » mockrunner » example » 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 » Testing » mockrunner 0.4 » com.mockrunner.example.ejb 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.mockrunner.example.ejb;
002:
003:        import java.util.Date;
004:
005:        import javax.ejb.CreateException;
006:        import javax.ejb.EJBException;
007:        import javax.ejb.EntityBean;
008:        import javax.ejb.EntityContext;
009:        import javax.ejb.RemoveException;
010:
011:        /*
012:         * @ejb:bean name="BillEntity"
013:         *           display-name="BillEntity"
014:         *           type="CMP"
015:         *           cmp-version="2.x"
016:         *           primkey-field="id"
017:         *           jndi-name="com/mockrunner/example/UserEntity"
018:         *
019:         * @ejb:pk class="java.lang.Integer"
020:         *
021:         * @ejb:transaction type="Required"
022:         * 
023:         * @ejb:finder signature="java.util.Collection findUnpaid()"
024:         *             query="SELECT OBJECT(t) FROM BillEntity as t WHERE t.paid = false"
025:         * 
026:         * @ejb:finder signature="java.util.Collection findAll()"
027:         *             
028:         * @jboss:persistence datasource="java:/MySQLDB"
029:         *                    table-name="BillEntity"
030:         *                    create-table="true"
031:         *                    remove-table="false"
032:         **/
033:        /**
034:         * This CMP entity bean represents a bill.
035:         * It has a date, and a marker if it is paid.
036:         * It has two custom finders, namely
037:         * <code>findUnpaid()</code> and <code>findAll()</code>.
038:         */
039:        public abstract class BillEntityBean implements  EntityBean {
040:            public EntityContext entityContext;
041:
042:            /*
043:             * @ejb:interface-method
044:             * @ejb:persistence
045:             * @ejb:pk-field
046:             * @jboss:column-name name="id"
047:             **/
048:            public abstract Integer getId();
049:
050:            public abstract void setId(Integer id);
051:
052:            /*
053:             * @ejb:interface-method
054:             * @ejb:persistence
055:             * @jboss:column-name name="date" sql-type="DATETIME" jdbc-type="DATE"
056:             **/
057:            public abstract Date getDate();
058:
059:            /*
060:             * @ejb:interface-method
061:             **/
062:            public abstract void setDate(Date date);
063:
064:            /*
065:             * @ejb:interface-method
066:             * @ejb:persistence
067:             * @jboss:column-name name="paid"
068:             **/
069:            public abstract boolean getPaid();
070:
071:            /*
072:             * @ejb:interface-method
073:             **/
074:            public abstract void setPaid(boolean isPaid);
075:
076:            /*
077:             * @ejb:create-method
078:             **/
079:            public Integer ejbCreate(Integer id) throws EJBException,
080:                    CreateException {
081:                setId(id);
082:                return null;
083:            }
084:
085:            public void ejbPostCreate(Integer id) {
086:            }
087:
088:            public void setEntityContext(EntityContext context) {
089:                entityContext = context;
090:            }
091:
092:            public void unsetEntityContext() {
093:                entityContext = null;
094:            }
095:
096:            public void ejbActivate() {
097:            }
098:
099:            public void ejbPassivate() {
100:            }
101:
102:            public void ejbLoad() {
103:            }
104:
105:            public void ejbStore() {
106:            }
107:
108:            public void ejbRemove() throws RemoveException {
109:            }
110:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.