Source Code Cross Referenced for BnProjectHookBean.java in  » Workflow-Engines » bonita-v3.1 » hero » entity » 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 » Workflow Engines » bonita v3.1 » hero.entity 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package hero.entity;
002:
003:        import hero.interfaces.BnProjectHookPK;
004:        import hero.interfaces.BnProjectHookValue;
005:        import hero.interfaces.BnProjectLocal;
006:        import hero.interfaces.InvalidValueException;
007:
008:        import javax.ejb.CreateException;
009:        import javax.ejb.EJBException;
010:        import javax.ejb.EntityBean;
011:        import javax.ejb.EntityContext;
012:        import javax.ejb.RemoveException;
013:
014:        /**
015:         * The Entity bean represents a BnProjectHook
016:         *
017:         * @author Oriol Montala
018:         * @version $Revision: 1.9 $
019:         *
020:         * @ejb:bean name="BnProjectHook"
021:         *           display-name="BnProject Hook Entity"
022:         *           type="CMP"
023:         *           jndi-name="ejb/hero/BnProjectHook"
024:         *           local-jndi-name="ejb/hero/BnProjectHook_L"
025:         *           view-type="both"
026:         *           cmp-version="2.x"
027:         *           reentrant="true"
028:         *
029:         * @ejb:transaction type="Supports"
030:         *
031:         *
032:         * @ejb.pk generate="true" method-intf="both"
033:         *
034:         * @jonas.bean
035:         * 	   lock-policy="container-read-committed"
036:         * @jonas.jdbc-mapping
037:         *     jndi-name="bonita"
038:         *     jdbc-table-name="BnProjectHook"
039:         *
040:         * @jonas.shared false
041:         *
042:         * @ejb:finder signature="java.util.Collection findAll()"
043:         *     query="SELECT object(p) FROM BnProjectHook p"
044:         *     transaction-type="Supports"
045:         * @ejb:finder signature="java.util.Collection findByProject(java.lang.String projectId)" view-type="local"
046:         *     query="SELECT OBJECT(p) From BnProjectHook p Where p.bnProject.id = ?1"
047:         *     transaction-type="Supports"
048:         * @ejb:finder signature="hero.interfaces.BnProjectHookLocal findByName(java.lang.String projectId, java.lang.String name)" view-type="local"
049:         *     query="SELECT OBJECT(p) From BnProjectHook p Where p.bnProject.id = ?1 AND p.name = ?2"
050:         *     transaction-type="Supports"
051:         *
052:         * @ejb.value-object
053:         *    match="*"
054:         *    name="BnProjectHook"
055:         *
056:         * @ejb.value-object
057:         *    match="light"
058:         *    name="BnProjectHookLight"
059:         *
060:         * @jboss.persistence
061:         *    table-name="BnProjectHook"
062:         *    create-table="true"
063:         *    remove-table="false"
064:         * 
065:         * @jboss.container-configuration name="Standard CMP 2.x EntityBean for Bonita"
066:         **/
067:        public abstract class BnProjectHookBean implements  EntityBean {
068:
069:            // -------------------------------------------------------------------------
070:            // Members
071:            // -------------------------------------------------------------------------
072:
073:            public EntityContext mContext;
074:
075:            // -------------------------------------------------------------------------
076:            // Methods
077:            // -------------------------------------------------------------------------
078:
079:            // -------------------------------------------------------------------------
080:            // Properties (Getters/Setters)
081:            // -------------------------------------------------------------------------
082:
083:            /**
084:             * Retrieve the BnProjectProperty's id.
085:             *
086:             * @return Returns an int representing the id of this BnProjectProperty.
087:             *
088:             * @ejb:pk-field
089:             * @ejb.value-object
090:             *    match="light"
091:             * @ejb:persistence column-name="id"
092:             * @jonas.cmp-field-jdbc-mapping
093:             *    field-name="id"
094:             *    jdbc-field-name="id"
095:             * @ejb:transaction type="Supports"
096:             **/
097:            public abstract String getId();
098:
099:            /**
100:             * Set the Property's id.
101:             *
102:             * @param pId The id of this Property. Is set at creation time.
103:             * @ejb:transaction type="Required"
104:             **/
105:            public abstract void setId(String pId);
106:
107:            /** Retrieve the BnProject.
108:             *
109:             * @return Returns a BnProjectLocal.
110:             * @ejb:interface-method view-type="both"
111:             * @ejb:relation name="projecthook" role-name="hook-by" cascade-delete="yes"
112:             * @ejb:transaction type="Supports"
113:             * @jboss.relation
114:             *    related-pk-field = "id"
115:             *    fk-column = "projectHookBeanIdFK"
116:             **/
117:            public abstract BnProjectLocal getBnProject();
118:
119:            /**
120:             * Set the BnProject.
121:             *
122:             * @ejb:interface-method view-type="local"
123:             * @param pProject The BnProject of this Hook.
124:             * @ejb:transaction type="Required"
125:             **/
126:            public abstract void setBnProject(BnProjectLocal pProject);
127:
128:            /**
129:             * Retrieve the Name value.
130:             *
131:             * @return Returns an String representing the Hook Name value.
132:             * @ejb.value-object
133:             *    match="light"
134:             * @ejb:interface-method view-type="both"
135:             *
136:             * @ejb:persistence column-name="name"
137:             * @ejb:transaction type="Supports"
138:             **/
139:            public abstract String getName();
140:
141:            /**
142:             * Set the Name value.
143:             * @ejb:interface-method view-type="both"
144:             * @param key The Name of this Hook.
145:             * @ejb:transaction type="Required"
146:             **/
147:            public abstract void setName(String hookName);
148:
149:            /**
150:             * Retrieve the Event value.
151:             *
152:             * @return Returns an String representing the Event value.
153:             * @ejb.value-object
154:             *    match="light"
155:             * @ejb:interface-method view-type="both"
156:             *
157:             * @ejb:persistence column-name="event"
158:             * @ejb:transaction type="Supports"
159:             **/
160:            public abstract String getEvent();
161:
162:            /**
163:             * Set the Event value.
164:             * @ejb:interface-method view-type="both"
165:             * @param value The Event value of this Hook.
166:             * @ejb:transaction type="Required"
167:             **/
168:            public abstract void setEvent(String hookEvent);
169:
170:            /**
171:             * Retrieve the Type value.
172:             *
173:             * @return Returns an int representing the Type value.
174:             * @ejb.value-object
175:             *    match="light"
176:             * @ejb:interface-method view-type="both"
177:             *
178:             * @ejb:persistence column-name="type"
179:             * @ejb:transaction type="Supports"
180:             **/
181:            public abstract int getType();
182:
183:            /**
184:             * Set the Type value.
185:             * @ejb:interface-method view-type="both"
186:             * @param value The Type value of this Hook.
187:             * @ejb:transaction type="Required"
188:             **/
189:            public abstract void setType(int hookType);
190:
191:            /**
192:             * @ejb.interface-method
193:             * @ejb:transaction type="Supports"
194:             */
195:            public abstract BnProjectHookValue getBnProjectHookValue();
196:
197:            /**
198:             * @ejb.interface-method
199:             * @ejb:transaction type="Required"
200:             */
201:            public abstract void setBnProjectHookValue(BnProjectHookValue v);
202:
203:            // -------------------------------------------------------------------------
204:            // Framework Callbacks
205:            // -------------------------------------------------------------------------
206:
207:            /**
208:             * Create a Hook based on the supplied Hook Value Object.
209:             *
210:             *
211:             * @throws InvalidValueException If one of the values are not correct,
212:             *                               this will not roll back the transaction
213:             *                               because the caller has the chance to
214:             *                               fix the problem and try again
215:             * @throws EJBException If no new unique ID could be retrieved this will
216:             *                      rollback the transaction because there is no
217:             *                      hope to try again
218:             * @throws CreateException Because we have to do so (EJB spec.)
219:             *
220:             * @ejb:create-method view-type="both"
221:             **/
222:            public BnProjectHookPK ejbCreate(BnProjectHookValue prp)
223:                    throws InvalidValueException, EJBException, CreateException {
224:                this 
225:                        .setId(hero.interfaces.BnProjectHookUtil
226:                                .generateGUID(this ));
227:
228:                // This is only possible in CMPs. Otherwise return a valid PK.
229:                return null;
230:            }
231:
232:            public void ejbPostCreate(BnProjectHookValue prp) {
233:                // Assign value object in ejbPostCreate to apply XDoclet best
234:                // practice. If not done, there will be an error in JBoss if
235:                // the Value Object has relations.
236:                this .setBnProjectHookValue(prp);
237:            }
238:
239:            /**
240:             * Create a Hook based on the supplied parameters.
241:             *
242:             *
243:             * @throws InvalidValueException If one of the values are not correct,
244:             *                               this will not roll back the transaction
245:             *                               because the caller has the chance to
246:             *                               fix the problem and try again
247:             * @throws EJBException If no new unique ID could be retrieved this will
248:             *                      rollback the transaction because there is no
249:             *                      hope to try again
250:             * @throws CreateException Because we have to do so (EJB spec.)
251:             *
252:             * @ejb:create-method view-type="both"
253:             **/
254:            public BnProjectHookPK ejbCreate(String hookName, String hookEvent,
255:                    int hookType) throws InvalidValueException, EJBException,
256:                    CreateException {
257:                this .setName(hookName);
258:                this .setEvent(hookEvent);
259:                this .setType(hookType);
260:                this 
261:                        .setId(hero.interfaces.BnProjectHookUtil
262:                                .generateGUID(this ));
263:
264:                // This is only possible in CMPs. Otherwise return a valid PK.
265:                return null;
266:            }
267:
268:            public void setEntityContext(EntityContext lContext) {
269:                mContext = lContext;
270:            }
271:
272:            public void unsetEntityContext() {
273:                mContext = null;
274:            }
275:
276:            public void ejbActivate() {
277:            }
278:
279:            public void ejbPassivate() {
280:            }
281:
282:            public void ejbLoad() {
283:            }
284:
285:            public void ejbStore() {
286:            }
287:
288:            public void ejbRemove() throws RemoveException {
289:            }
290:
291:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.