Source Code Cross Referenced for BnUserPropertyBean.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.BnUserLocal;
004:        import hero.interfaces.BnUserPropertyPK;
005:        import hero.interfaces.BnUserPropertyValue;
006:        import hero.interfaces.InvalidValueException;
007:        import javax.ejb.CreateException;
008:        import javax.ejb.EJBException;
009:        import javax.ejb.EntityBean;
010:        import javax.ejb.EntityContext;
011:        import javax.ejb.RemoveException;
012:
013:        /**
014:         * The Entity bean represents a BnUserProperty
015:         *
016:         * @author Oriol Montala
017:         * @version $Revision: 1.9 $
018:         *
019:         * @ejb:bean name="BnUserProperty"
020:         *           display-name="BnUser Entity"
021:         *           type="CMP"
022:         *           jndi-name="ejb/hero/BnUserProperty"
023:         *           local-jndi-name="ejb/hero/BnUserProperty_L"
024:         *           view-type="both"
025:         *           cmp-version="2.x"
026:         *           reentrant="true"
027:         *
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="BnUserProperty"
039:         *
040:         * @jonas.shared false
041:         *
042:         * @ejb:finder signature="java.util.Collection findAll()"
043:         *     query="SELECT object(u) FROM BnUserProperty u"
044:         *     transaction-type="Supports"
045:         * @ejb:finder signature="java.util.Collection findByUser(java.lang.String userId)" view-type="local"
046:         *     query="SELECT OBJECT(p) From BnUserProperty p Where p.bnUser.id = ?1"
047:         *     transaction-type="Supports"
048:         * @ejb:finder signature="java.util.Collection findByTheKey(java.lang.String userId, java.lang.String pkey)" view-type="local"
049:         *     query="SELECT OBJECT(p) From BnUserProperty p Where p.bnUser.id = ?1 AND p.theKey=?2"
050:         *     transaction-type="Supports"
051:         *
052:         *
053:         * @ejb.value-object
054:         *    match="*"
055:         *    name="BnUserProperty"
056:         *
057:         * @ejb.value-object
058:         *    match="light"
059:         *    name="BnUserPropertyLight"
060:         *
061:         * @jboss.persistence
062:         *    table-name="BnUserProperty"
063:         *    create-table="true"
064:         *    remove-table="false"
065:         *
066:         * @jboss.container-configuration name="Standard CMP 2.x EntityBean for Bonita"
067:         **/
068:        public abstract class BnUserPropertyBean implements  EntityBean {
069:
070:            // -------------------------------------------------------------------------
071:            // Members
072:            // -------------------------------------------------------------------------
073:
074:            public EntityContext mContext;
075:
076:            // -------------------------------------------------------------------------
077:            // Methods
078:            // -------------------------------------------------------------------------
079:
080:            // -------------------------------------------------------------------------
081:            // Properties (Getters/Setters)
082:            // -------------------------------------------------------------------------
083:
084:            /**
085:             * Retrieve the BnUserProperty's id.
086:             *
087:             * @return Returns an int representing the id of this BnUserProperty.
088:             *
089:             * @ejb:pk-field
090:             * @ejb.value-object
091:             *    match="light"
092:             * @ejb:persistence column-name="id"
093:             * @jonas.cmp-field-jdbc-mapping
094:             *    field-name="id"
095:             *    jdbc-field-name="id"
096:             * @ejb:transaction type="Supports"
097:             **/
098:            public abstract String getId();
099:
100:            /**
101:             * Set the Property's id.
102:             *
103:             * @param pId The id of this Property. Is set at creation time.
104:             * @ejb:transaction type="Required"
105:             **/
106:            public abstract void setId(String pId);
107:
108:            /** Retrieve the BnUser.
109:             *
110:             * @return Returns a BnUserLocal.
111:             * @ejb:interface-method view-type="both"
112:             * @ejb:relation name="userprp" role-name="property-by" cascade-delete="yes"
113:             * @ejb:transaction type="Supports"
114:             *
115:             * @jboss.relation
116:             *    related-pk-field = "id"
117:             *    fk-column = "userProperyIdFK"
118:             **/
119:            public abstract BnUserLocal getBnUser();
120:
121:            /**
122:             * Set the BnUser.
123:             *
124:             * @ejb:interface-method view-type="local"
125:             * @param pUser The BnUser of this Property.
126:             * @ejb:transaction type="Required"
127:             **/
128:            public abstract void setBnUser(BnUserLocal pUser);
129:
130:            /**
131:             * Retrieve the Key value.
132:             *
133:             * @return Returns an String representing the Key value of this Property.
134:             *
135:             * @ejb:interface-method view-type="both"
136:             * @ejb.value-object
137:             *    match="light"
138:             * @ejb:persistence column-name="thekey"
139:             * @ejb:transaction type="Supports"
140:             **/
141:            public abstract String getTheKey();
142:
143:            /**
144:             * Set the key value.
145:             * @ejb:interface-method view-type="both"
146:             * @param key The Key of this Property.
147:             * @ejb:transaction type="Required"
148:             **/
149:            public abstract void setTheKey(String key);
150:
151:            /**
152:             * Retrieve the Value value.
153:             *
154:             * @return Returns an String representing the Value value of this Property.
155:             *
156:             * @ejb:interface-method view-type="both"
157:             * @ejb.value-object
158:             *    match="light"
159:             * @ejb:persistence column-name="thevalue"
160:             * @ejb:transaction type="Supports"
161:             **/
162:            public abstract String getTheValue();
163:
164:            /**
165:             * Set the Value value.
166:             * @ejb:interface-method view-type="both"
167:             * @param value The Value value of this Property.
168:             * @ejb:transaction type="Required"
169:             **/
170:            public abstract void setTheValue(String value);
171:
172:            /**
173:             * @ejb.interface-method
174:             * @ejb:transaction type="Supports"
175:             */
176:            public abstract BnUserPropertyValue getBnUserPropertyValue();
177:
178:            /**
179:             * @ejb.interface-method
180:             */
181:            public abstract void setBnUserPropertyValue(BnUserPropertyValue v);
182:
183:            // -------------------------------------------------------------------------
184:            // Framework Callbacks
185:            // -------------------------------------------------------------------------
186:
187:            /**
188:             * Create a Property based on the supplied Property Value Object.
189:             *
190:             *
191:             * @throws InvalidValueException If one of the values are not correct,
192:             *                               this will not roll back the transaction
193:             *                               because the caller has the chance to
194:             *                               fix the problem and try again
195:             * @throws EJBException If no new unique ID could be retrieved this will
196:             *                      rollback the transaction because there is no
197:             *                      hope to try again
198:             * @throws CreateException Because we have to do so (EJB spec.)
199:             *
200:             * @ejb:create-method view-type="both"
201:             **/
202:            public BnUserPropertyPK ejbCreate(BnUserPropertyValue prp)
203:                    throws InvalidValueException, EJBException, CreateException {
204:                this .setId(hero.interfaces.BnUserPropertyUtil
205:                        .generateGUID(this ));
206:                // This is only possible in CMPs. Otherwise return a valid PK.
207:                return null;
208:            }
209:
210:            public void ejbPostCreate(BnUserPropertyValue prp) {
211:                // Assign value object in ejbPostCreate to apply XDoclet best
212:                // practice. If not done, there will be an error in JBoss if
213:                // the Value Object has relations.
214:                this .setBnUserPropertyValue(prp);
215:            }
216:
217:            /**
218:             * Create a Property based on the supplied  key  and value.
219:             *
220:             *
221:             * @throws InvalidValueException If one of the values are not correct,
222:             *                               this will not roll back the transaction
223:             *                               because the caller has the chance to
224:             *                               fix the problem and try again
225:             * @throws EJBException If no new unique ID could be retrieved this will
226:             *                      rollback the transaction because there is no
227:             *                      hope to try again
228:             * @throws CreateException Because we have to do so (EJB spec.)
229:             *
230:             * @ejb:create-method view-type="both"
231:             **/
232:            public BnUserPropertyPK ejbCreate(String key, String value)
233:                    throws InvalidValueException, EJBException, CreateException {
234:                this .setTheKey(key);
235:                this .setTheValue(value);
236:                this .setId(hero.interfaces.BnUserPropertyUtil
237:                        .generateGUID(this ));
238:
239:                // This is only possible in CMPs. Otherwise return a valid PK.
240:                return null;
241:            }
242:
243:            public void setEntityContext(EntityContext lContext) {
244:                mContext = lContext;
245:            }
246:
247:            public void unsetEntityContext() {
248:                mContext = null;
249:            }
250:
251:            public void ejbActivate() {
252:            }
253:
254:            public void ejbPassivate() {
255:            }
256:
257:            public void ejbLoad() {
258:            }
259:
260:            public void ejbStore() {
261:            }
262:
263:            public void ejbRemove() throws RemoveException {
264:            }
265:
266:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.