Source Code Cross Referenced for BnNodeBean.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) 


0001:        package hero.entity;
0002:
0003:        import hero.interfaces.BnNodeLightValue;
0004:        import hero.interfaces.BnNodePK;
0005:        import hero.interfaces.BnNodeValue;
0006:        import hero.interfaces.BnProjectLocal;
0007:        import hero.interfaces.BnNodePerformerAssignLocal;
0008:        import hero.interfaces.BnRoleLocal;
0009:        import hero.interfaces.InvalidValueException;
0010:        import hero.util.BonitaServiceLocator;
0011:        import hero.util.BonitaServiceException;
0012:        import hero.util.HeroException;
0013:
0014:        import java.util.ArrayList;
0015:        import java.util.Date;
0016:        import java.util.Collection;
0017:
0018:        import javax.ejb.CreateException;
0019:        import javax.ejb.EJBException;
0020:        import javax.ejb.EntityBean;
0021:        import javax.ejb.EntityContext;
0022:        import javax.ejb.FinderException;
0023:        import javax.ejb.RemoveException;
0024:
0025:        /**
0026:         * The Entity bean represents a BnUser
0027:         *
0028:         * @author Fran?s Charoy
0029:         * @version $Revision: 1.37 $
0030:         *
0031:         * @ejb:bean name="BnNode"
0032:         *           display-name="BnNode Entity"
0033:         *           type="CMP"
0034:         *           jndi-name="ejb/hero/BnNode"
0035:         *           local-jndi-name="ejb/hero/BnNode_L"
0036:         *           view-type="both"
0037:         *           cmp-version="2.x"
0038:         *           reentrant="true"
0039:         *
0040:         *
0041:         * @ejb:transaction type="Supports"
0042:         *
0043:         *
0044:         * @ejb.pk method-intf="both"
0045:         *
0046:         * @jonas.bean
0047:         * 	   lock-policy="container-read-committed"
0048:         * @jonas.jdbc-mapping
0049:         *     jndi-name="bonita"
0050:         *     jdbc-table-name="BnNode"
0051:         *
0052:         * @jonas.shared false
0053:         *
0054:         * @ejb:finder signature="java.util.Collection findAll()"
0055:         *     query="SELECT object(n) FROM BnNode n"
0056:         *     transaction-type="Supports"
0057:         *
0058:         * @ejb:finder signature="hero.interfaces.BnNode findByName(java.lang.String pName, java.lang.String projectId )" view-type="both" result-type-mapping="Remote"
0059:         *     query="SELECT OBJECT(n) FROM BnNode n WHERE n.name = ?1 AND n.bnProject.id = ?2"
0060:         *     transaction-type="Supports"
0061:         * @ejb:finder signature="hero.interfaces.BnNodeLocal findByName(java.lang.String pName, java.lang.String projectId )" view-type="both" result-type-mapping="Local"
0062:         *     query="SELECT OBJECT(n) FROM BnNode n WHERE n.name = ?1 AND n.bnProject.id = ?2"
0063:         *     transaction-type="Supports"
0064:         *
0065:         * @ejb.finder
0066:         *     signature="Collection findUserReady(java.lang.String projectId, java.lang.String userName)"
0067:         *     view-type="local" result-type-mapping="Local"
0068:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnProject AS p, IN (p.bnUsers) AS u, IN (u.bnRoles) AS r
0069:         *                              WHERE n.bnProject.id = ?1
0070:         *                              AND (n.state = 1 OR n.state =3)
0071:         *                              AND u.name = ?2
0072:         *                              AND r.id = n.bnRole.id
0073:         *                              AND (n.activityPerformer IS NULL OR n.activityPerformer = ?2)"
0074:         *    transaction-type="Supports"
0075:         *
0076:         * @ejb.finder
0077:         *     signature="Collection findUserExecuting(java.lang.String projectId, java.lang.String userName)"
0078:         *     view-type="local" result-type-mapping="Local"
0079:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n
0080:         *                              WHERE n.bnProject.id = ?1
0081:         *                              AND (n.state = 5 OR n.state =6)
0082:         *                              AND (n.type <> 5)
0083:         *                              AND n.executor = ?2"
0084:         *     transaction-type="Supports"
0085:         *
0086:         * @ejb.finder
0087:         *     signature="Collection findUserReadyAllProjects(java.lang.String userName)"
0088:         *     view-type="local" result-type-mapping="Local"
0089:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0090:         *                              WHERE u.name = ?1
0091:         *                              AND (n.state = 1 OR n.state =3)
0092:         *                              AND r.id = n.bnRole.id
0093:         *                              AND ru.id=u.id
0094:         *                              AND (n.activityPerformer IS NULL OR n.activityPerformer = ?1)"                          
0095:         *    transaction-type="Supports"
0096:         *
0097:         * @ejb.finder
0098:         *     signature="Collection findUserExecutingAllProjects(java.lang.String userName)"
0099:         *     view-type="local" result-type-mapping="Local"
0100:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n
0101:         *                              WHERE n.executor = ?1
0102:         *                              AND (n.type <> 5)
0103:         * 				                AND (n.state = 5 OR n.state =6)"
0104:         *     transaction-type="Supports"
0105:         *
0106:         * @ejb.finder
0107:         *     signature="Collection findUserTerminatedAllProjects(java.lang.String userName)"
0108:         *     view-type="local" result-type-mapping="Local"
0109:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n
0110:         *                              WHERE n.executor = ?1
0111:         * 				                AND n.state = 10"
0112:         *     transaction-type="Supports"
0113:         *
0114:         * @ejb.finder
0115:         *     signature="Collection findUserReadyAllProjectsByProperty(java.lang.String userName, java.lang.String key, java.lang.String value)"
0116:         *     view-type="local" result-type-mapping="Local"
0117:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnProject AS p, IN (p.bnProperties) AS prop, IN (p.bnUsers) AS u, IN (u.bnRoles) AS r
0118:         *                              WHERE u.name = ?1
0119:         * 			        			AND prop.theKey = ?2
0120:         * 								AND prop.theValue = ?3
0121:         * 			  					AND (prop.bnProject.name = n.bnProject.name)
0122:         *                              AND (n.state = 1 OR n.state =3)
0123:         *                              AND r.id = n.bnRole.id
0124:         *                              AND (n.activityPerformer IS NULL OR n.activityPerformer = ?1)"                                   
0125:         *    transaction-type="Supports"
0126:         *
0127:         * @ejb.finder
0128:         *     signature="Collection findUserReadyAllActivitiesByProperty(java.lang.String userName, java.lang.String key, java.lang.String value)"
0129:         *     view-type="local" result-type-mapping="Local"
0130:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnProject AS p, IN (n.bnProperties) AS prop, IN (p.bnUsers) AS u, IN (u.bnRoles) AS r
0131:         *                              WHERE u.name = ?1
0132:         * 			        			AND prop.theKey = ?2
0133:         * 								AND prop.theValue = ?3
0134:         *                              AND (n.state = 1 OR n.state =3)
0135:         *                              AND r.id = n.bnRole.id
0136:         *                              AND (n.activityPerformer IS NULL OR n.activityPerformer = ?1)"                                   
0137:         *    transaction-type="Supports"
0138:         *
0139:         *
0140:         * @ejb.finder
0141:         *     signature="Collection findUserReadyAllProjectsByTwoPropertiesAND(java.lang.String userName, java.lang.String key1, java.lang.String value1, java.lang.String key2, java.lang.String value2)"
0142:         *     view-type="local" result-type-mapping="Local"
0143:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnProject AS p, BnProjectProperty AS prop1, BnProjectProperty AS prop2, IN (p.bnUsers) AS u, IN (u.bnRoles) AS r
0144:         *                              WHERE u.name = ?1
0145:         * 			        			AND prop1.theKey = ?2
0146:         * 								AND prop1.theValue = ?3
0147:         * 								AND prop2.theKey = ?4
0148:         * 								AND prop2.theValue = ?5
0149:         * 			  					AND (prop1.bnProject.name = n.bnProject.name)
0150:         * 								AND (prop2.bnProject.name = n.bnProject.name)
0151:         *                              AND (n.state = 1 OR n.state =3)
0152:         *                              AND r.id = n.bnRole.id
0153:         *                              AND (n.activityPerformer IS NULL OR n.activityPerformer = ?1)"                                   
0154:         *    transaction-type="Supports"
0155:         *
0156:         *
0157:         * @ejb.finder
0158:         *     signature="Collection findUserReadyAllProjectsByTwoPropertiesOR(java.lang.String userName, java.lang.String key1, java.lang.String value1, java.lang.String key2, java.lang.String value2)"
0159:         *     view-type="local" result-type-mapping="Local"
0160:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, In (n.bnProject.bnProperties) As prop, IN (n.bnProject.bnUsers) AS u, IN (u.bnRoles) AS r
0161:         *                              WHERE u.name = ?1
0162:         * 			        			AND ((prop.theKey = ?2 AND prop.theValue = ?3) OR (prop.theKey = ?4 AND prop.theValue = ?5))
0163:         *                              AND (n.state = 1 OR n.state =3)
0164:         *                              AND r.id = n.bnRole.id
0165:         *                              AND (n.activityPerformer IS NULL OR n.activityPerformer = ?1)"                                   
0166:         *    transaction-type="Supports"
0167:         *
0168:         *
0169:         * @ejb.finder
0170:         *     signature="Collection findUserReadyAllProjectsByThreePropertiesAND(java.lang.String userName, java.lang.String key1, java.lang.String value1, java.lang.String key2, java.lang.String value2, java.lang.String key3, java.lang.String value3)"
0171:         *     view-type="local" result-type-mapping="Local"
0172:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnProject AS p, BnProjectProperty AS prop1, BnProjectProperty AS prop2, BnProjectProperty AS prop3, IN (p.bnUsers) AS u, IN (u.bnRoles) AS r
0173:         *                              WHERE u.name = ?1
0174:         * 			        			AND prop1.theKey = ?2
0175:         * 								AND prop1.theValue = ?3
0176:         * 								AND prop2.theKey = ?4
0177:         * 								AND prop2.theValue = ?5
0178:         * 								AND prop3.theKey = ?6
0179:         * 								AND prop3.theValue = ?7
0180:         * 			  					AND (prop1.bnProject.name = n.bnProject.name)
0181:         * 								AND (prop2.bnProject.name = n.bnProject.name)
0182:         * 								AND (prop3.bnProject.name = n.bnProject.name)
0183:         *                              AND (n.state = 1 OR n.state =3)
0184:         *                              AND r.id = n.bnRole.id
0185:         *                              AND (n.activityPerformer IS NULL OR n.activityPerformer = ?1)"                                
0186:         *    transaction-type="Supports"
0187:         *
0188:         * @ejb.finder
0189:         *     signature="Collection findUserReadyAllProjectsByThreePropertiesOR(java.lang.String userName, java.lang.String key1, java.lang.String value1, java.lang.String key2, java.lang.String value2, java.lang.String key3, java.lang.String value3)"
0190:         *     view-type="local" result-type-mapping="Local"
0191:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, In (n.bnProject.bnProperties) As prop, IN (n.bnProject.bnUsers) AS u, IN (u.bnRoles) AS r
0192:         *                              WHERE u.name = ?1
0193:         * 			        			AND ((prop.theKey = ?2 AND prop.theValue = ?3) OR (prop.theKey = ?4 AND prop.theValue = ?5) OR (prop.theKey = ?6 AND prop.theValue = ?7))
0194:         *                              AND (n.state = 1 OR n.state =3)
0195:         *                              AND r.id = n.bnRole.id
0196:         *                              AND (n.activityPerformer IS NULL OR n.activityPerformer = ?1)"                                   
0197:         *    transaction-type="Supports"
0198:         *
0199:         *
0200:         * @ejb.finder
0201:         *     signature="Collection findUserExecutingAllProjectsByProperty(java.lang.String userName, java.lang.String key, java.lang.String value)"
0202:         *     view-type="local" result-type-mapping="Local"
0203:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnProject AS p, IN (p.bnProperties) AS prop
0204:         *                              WHERE n.executor = ?1
0205:         * 								AND prop.theKey = ?2
0206:         * 								AND prop.theValue = ?3
0207:         * 								AND (prop.bnProject.name = n.bnProject.name)
0208:         *                              AND (n.type <> 5)
0209:         * 								AND (n.state = 5 OR n.state =6)"
0210:         *     transaction-type="Supports"
0211:         *
0212:         * @ejb.finder
0213:         *     signature="Collection findAdminActivities (java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0214:         *     view-type="local" result-type-mapping="Local"
0215:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0216:         *                              WHERE u.name = ?1 
0217:         *                              AND r.name = ?2
0218:         * 								AND (n.bnProject.type = ?3 OR n.bnProject.type = ?4)
0219:         *                              AND r.bnProject.id = n.bnProject.id
0220:         *                              AND ru.id=u.id"
0221:         *     transaction-type="Supports"
0222:         *
0223:         * @ejb.finder
0224:         *     signature="Collection findAdminActivitiesFilterAll (int state, java.lang.String executor, java.lang.String performer, java.lang.String process, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0225:         *     view-type="local" result-type-mapping="Local"
0226:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0227:         *                              WHERE n.state = ?1
0228:         *                              AND n.executor = ?2
0229:         *                              AND n.activityPerformer = ?3
0230:         *                              AND n.bnProject.name LIKE ?4
0231:         *                              AND u.name = ?5 
0232:         *                              AND r.name = ?6
0233:         * 								AND (n.bnProject.type = ?7 OR n.bnProject.type = ?8)
0234:         *                              AND r.bnProject.id = n.bnProject.id
0235:         *                              AND ru.id=u.id"
0236:         *     transaction-type="Supports"
0237:         *
0238:         * @ejb.finder
0239:         *     signature="Collection findAdminActivitiesFilterNoState (java.lang.String executor, java.lang.String performer, java.lang.String process, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0240:         *     view-type="local" result-type-mapping="Local"
0241:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0242:         *                              WHERE n.executor = ?1
0243:         *                              AND n.activityPerformer = ?2
0244:         *                              AND n.bnProject.name LIKE ?3
0245:         *                              AND u.name = ?4 
0246:         *                              AND r.name = ?5
0247:         * 								AND (n.bnProject.type = ?6 OR n.bnProject.type = ?7)
0248:         *                              AND r.bnProject.id = n.bnProject.id
0249:         *                              AND ru.id=u.id"
0250:         *     transaction-type="Supports"
0251:         *
0252:         * @ejb.finder
0253:         *     signature="Collection findAdminActivitiesFilterNoExecutor (int state, java.lang.String performer, java.lang.String process, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0254:         *     view-type="local" result-type-mapping="Local"
0255:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0256:         *                              WHERE n.state = ?1
0257:         *                              AND n.activityPerformer = ?2
0258:         *                              AND n.bnProject.name LIKE ?3
0259:         *                              AND u.name = ?4 
0260:         *                              AND r.name = ?5
0261:         * 								AND (n.bnProject.type = ?6 OR n.bnProject.type = ?7)
0262:         *                              AND r.bnProject.id = n.bnProject.id
0263:         *                              AND ru.id=u.id"
0264:         *     transaction-type="Supports"
0265:         *
0266:         * @ejb.finder
0267:         *     signature="Collection findAdminActivitiesFilterNoPerformer (int state, java.lang.String executor, java.lang.String process, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0268:         *     view-type="local" result-type-mapping="Local"
0269:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0270:         *                              WHERE n.state = ?1
0271:         *                              AND n.executor = ?2
0272:         *                              AND n.bnProject.name LIKE ?3
0273:         *                              AND u.name = ?4 
0274:         *                              AND r.name = ?5
0275:         * 								AND (n.bnProject.type = ?6 OR n.bnProject.type = ?7)
0276:         *                              AND r.bnProject.id = n.bnProject.id
0277:         *                              AND ru.id=u.id"
0278:         *     transaction-type="Supports"
0279:         *
0280:         * @ejb.finder
0281:         *     signature="Collection findAdminActivitiesFilterNoProcess (int state, java.lang.String executor, java.lang.String performer, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0282:         *     view-type="local" result-type-mapping="Local"
0283:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0284:         *                              WHERE n.state = ?1
0285:         *                              AND n.executor = ?2
0286:         *                              AND n.activityPerformer = ?3
0287:         *                              AND u.name = ?4 
0288:         *                              AND r.name = ?5
0289:         * 								AND (n.bnProject.type = ?6 OR n.bnProject.type = ?7)
0290:         *                              AND r.bnProject.id = n.bnProject.id
0291:         *                              AND ru.id=u.id"
0292:         *     transaction-type="Supports"
0293:         *
0294:         * @ejb.finder
0295:         *     signature="Collection findAdminActivitiesFilterNoStateNoExecutor (java.lang.String performer, java.lang.String process, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0296:         *     view-type="local" result-type-mapping="Local"
0297:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0298:         *                              WHERE n.activityPerformer = ?1
0299:         *                              AND n.bnProject.name LIKE ?2
0300:         *                              AND u.name = ?3 
0301:         *                              AND r.name = ?4
0302:         * 								AND (n.bnProject.type = ?5 OR n.bnProject.type = ?6)
0303:         *                              AND r.bnProject.id = n.bnProject.id
0304:         *                              AND ru.id=u.id"
0305:         *     transaction-type="Supports"
0306:         *
0307:         * @ejb.finder
0308:         *     signature="Collection findAdminActivitiesFilterNoStateNoExecutorNoPerformer (java.lang.String process, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0309:         *     view-type="local" result-type-mapping="Local"
0310:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0311:         *                              WHERE n.bnProject.name LIKE ?1
0312:         *                              AND u.name = ?2 
0313:         *                              AND r.name = ?3
0314:         * 								AND (n.bnProject.type = ?4 OR n.bnProject.type = ?5)
0315:         *                              AND r.bnProject.id = n.bnProject.id
0316:         *                              AND ru.id=u.id"
0317:         *     transaction-type="Supports"
0318:         *
0319:         * @ejb.finder
0320:         *     signature="Collection findAdminActivitiesFilterNoStateNoProcess (java.lang.String executor, java.lang.String performer, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0321:         *     view-type="local" result-type-mapping="Local"
0322:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0323:         *                              WHERE n.executor = ?1
0324:         *                              AND n.activityPerformer = ?2
0325:         *                              AND u.name = ?3 
0326:         *                              AND r.name = ?4
0327:         * 								AND (n.bnProject.type = ?5 OR n.bnProject.type = ?6)
0328:         *                              AND r.bnProject.id = n.bnProject.id
0329:         *                              AND ru.id=u.id"
0330:         *     transaction-type="Supports"
0331:         *
0332:         * @ejb.finder
0333:         *     signature="Collection findAdminActivitiesFilterNoExecutorNoPerformerNoProcess (int state, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0334:         *     view-type="local" result-type-mapping="Local"
0335:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0336:         *                              WHERE n.state = ?1
0337:         *                              AND u.name = ?2 
0338:         *                              AND r.name = ?3
0339:         * 								AND (n.bnProject.type = ?4 OR n.bnProject.type = ?5)
0340:         *                              AND r.bnProject.id = n.bnProject.id
0341:         *                              AND ru.id=u.id"
0342:         *     transaction-type="Supports"
0343:         *
0344:         * @ejb.finder
0345:         *     signature="Collection findAdminActivitiesFilterNoStateNoPerformerNoProcess (java.lang.String executor, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0346:         *     view-type="local" result-type-mapping="Local"
0347:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0348:         *                              WHERE n.executor = ?1
0349:         *                              AND u.name = ?2 
0350:         *                              AND r.name = ?3
0351:         * 								AND (n.bnProject.type = ?4 OR n.bnProject.type = ?5)
0352:         *                              AND r.bnProject.id = n.bnProject.id
0353:         *                              AND ru.id=u.id"
0354:         *     transaction-type="Supports"
0355:         *
0356:         * @ejb.finder
0357:         *     signature="Collection findAdminActivitiesFilterNoStateNoExecutorNoProcess (java.lang.String performer, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0358:         *     view-type="local" result-type-mapping="Local"
0359:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0360:         *                              WHERE n.activityPerformer = ?1
0361:         *                              AND u.name = ?2 
0362:         *                              AND r.name = ?3
0363:         * 								AND (n.bnProject.type = ?4 OR n.bnProject.type = ?5)
0364:         *                              AND r.bnProject.id = n.bnProject.id
0365:         *                              AND ru.id=u.id"
0366:         *     transaction-type="Supports"
0367:         *
0368:         * @ejb.finder
0369:         *     signature="Collection findAdminActivitiesFilterNoStateNoPerformer (java.lang.String executor, java.lang.String process, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0370:         *     view-type="local" result-type-mapping="Local"
0371:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0372:         *                              WHERE n.executor = ?1
0373:         *                              AND n.bnProject.name LIKE ?2
0374:         *                              AND u.name = ?3 
0375:         *                              AND r.name = ?4
0376:         * 								AND (n.bnProject.type = ?5 OR n.bnProject.type = ?6)
0377:         *                              AND r.bnProject.id = n.bnProject.id
0378:         *                              AND ru.id=u.id"
0379:         *     transaction-type="Supports"
0380:         *
0381:         * @ejb.finder
0382:         *     signature="Collection findAdminActivitiesFilterNoExecutorNoProcess (int state, java.lang.String performer, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0383:         *     view-type="local" result-type-mapping="Local"
0384:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0385:         *                              WHERE n.state = ?1
0386:         *                              AND n.activityPerformer = ?2
0387:         *                              AND u.name = ?3 
0388:         *                              AND r.name = ?4
0389:         * 								AND (n.bnProject.type = ?5 OR n.bnProject.type = ?6)
0390:         *                              AND r.bnProject.id = n.bnProject.id
0391:         *                              AND ru.id=u.id"
0392:         *     transaction-type="Supports"
0393:         *
0394:         * @ejb.finder
0395:         *     signature="Collection findAdminActivitiesFilterNoExecutorNoPerformer (int state, java.lang.String process, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0396:         *     view-type="local" result-type-mapping="Local"
0397:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0398:         *                              WHERE n.state = ?1
0399:         *                              AND n.bnProject.name LIKE ?2
0400:         *                              AND u.name = ?3 
0401:         *                              AND r.name = ?4
0402:         * 								AND (n.bnProject.type = ?5 OR n.bnProject.type = ?6)
0403:         *                              AND r.bnProject.id = n.bnProject.id
0404:         *                              AND ru.id=u.id"
0405:         *     transaction-type="Supports"
0406:         *
0407:         * @ejb.finder
0408:         *     signature="Collection findAdminActivitiesFilterNoPerformerNoProcess (int state, java.lang.String executor, java.lang.String userName, java.lang.String role ,java.lang.String instance, java.lang.String cooperative)"
0409:         *     view-type="local" result-type-mapping="Local"
0410:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0411:         *                              WHERE n.state = ?1
0412:         *                              AND n.executor = ?2
0413:         *                              AND u.name = ?3 
0414:         *                              AND r.name = ?4
0415:         * 								AND (n.bnProject.type = ?5 OR n.bnProject.type = ?6)
0416:         *                              AND r.bnProject.id = n.bnProject.id
0417:         *                              AND ru.id=u.id"
0418:         *     transaction-type="Supports"
0419:         *
0420:         * @ejb.finder
0421:         *     signature="Collection findUserReadyModelActivity(java.lang.String model, java.lang.String node, java.lang.String userName)"
0422:         *     view-type="local" result-type-mapping="Local"
0423:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
0424:         *                              WHERE n.bnProject.name LIKE ?1
0425:         *                              AND u.name = ?3
0426:         *                              AND (n.state = 1 OR n.state =3)
0427:         *                              AND n.name = ?2
0428:         *                              AND r.id = n.bnRole.id
0429:         *                              AND ru.id=u.id
0430:         *                              AND (n.activityPerformer IS NULL OR n.activityPerformer = ?3)"
0431:         *    transaction-type="Supports"
0432:         *
0433:         * @ejb.finder
0434:         *     signature="Collection findUserTerminatedModelActivity(java.lang.String model, java.lang.String node, java.lang.String userName)"
0435:         *     view-type="local" result-type-mapping="Local"
0436:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n
0437:         *                              WHERE n.bnProject.name LIKE ?1
0438:         *                              AND n.name = ?2
0439:         *                              AND n.executor = ?3
0440:         * 				                AND n.state = 10"
0441:         *     transaction-type="Supports"
0442:         *
0443:         * @ejb.finder
0444:         *     signature="Collection findUserModelReady(java.lang.String model,java.lang.String userName)"
0445:         *     view-type="local" result-type-mapping="Local"
0446:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, IN (n.bnProject.bnUsers) AS u, IN (u.bnRoles) AS r
0447:         *                              WHERE n.bnProject.name LIKE ?1
0448:         *                              AND u.name = ?2
0449:         *                              AND (n.state = 1 OR n.state =3)
0450:         *                              AND r.id = n.bnRole.id"
0451:         *     transaction-type="Supports"
0452:         *
0453:         * @ejb.finder
0454:         *     signature="Collection findUserModelTerminated(java.lang.String model,java.lang.String userName)"
0455:         *     view-type="local" result-type-mapping="Local"
0456:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n
0457:         *                              WHERE n.bnProject.name LIKE ?1
0458:         *                              AND n.executor = ?2
0459:         *                              AND n.state = 10"
0460:         *     transaction-type="Supports"
0461:         *
0462:         * @ejb.finder
0463:         *     signature="Collection findUserInstancesProjectNodes(java.lang.String model,java.lang.String userName)"
0464:         *     view-type="local" result-type-mapping="Local"
0465:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n
0466:         *                              WHERE n.bnProject.name LIKE ?1
0467:         *                              AND n.bnProject.creator = ?2
0468:         *                              AND (n.state = 1 OR n.state =3 OR n.state=6)"
0469:         *     transaction-type="Supports"
0470:         *
0471:         * @ejb.finder
0472:         *     signature="Collection findUserInstanceNodes(java.lang.String instance,java.lang.String userName)"
0473:         *     view-type="local" result-type-mapping="Local"
0474:         *     query="SELECT DISTINCT OBJECT(n) FROM BnNode AS n, IN (n.bnProject.bnUsers) AS u, IN (u.bnRoles) AS r
0475:         *                              WHERE n.bnProject.name = ?1
0476:         *                              AND u.name = ?2
0477:         *                              AND (n.state = 1 OR n.state =3)
0478:         *                              AND r.id = n.bnRole.id
0479:         *                              AND (n.activityPerformer IS NULL OR n.activityPerformer = ?2)"
0480:         *     transaction-type="Supports"
0481:         *
0482:         * @ejb.value-object
0483:         *    match="*"
0484:         *    name="BnNode"
0485:         *
0486:         * @ejb.value-object
0487:         *    match="light"
0488:         *    name="BnNodeLight"
0489:         *
0490:         * @jboss.persistence
0491:         *    table-name="BnNode"
0492:         *    create-table="true"
0493:         *    remove-table="false"
0494:         *
0495:         * @jboss.container-configuration name="Standard CMP 2.x EntityBean for Bonita"
0496:         **/
0497:        public abstract class BnNodeBean implements  EntityBean {
0498:
0499:            // -------------------------------------------------------------------------
0500:            // Members
0501:            // -------------------------------------------------------------------------
0502:
0503:            public EntityContext mContext;
0504:
0505:            // -------------------------------------------------------------------------
0506:            // Methods
0507:            // -------------------------------------------------------------------------
0508:
0509:            // -------------------------------------------------------------------------
0510:            // Properties (Getters/Setters)
0511:            // -------------------------------------------------------------------------
0512:
0513:            /**
0514:             * Retrieve the BnNode's id.
0515:             *
0516:             * @return Returns an int representing the id of this BnNode.
0517:             *
0518:             * @ejb:pk-field
0519:             * @ejb.value-object
0520:             *    match="light"
0521:             *
0522:             * @ejb:interface-method view-type="local"
0523:             * @ejb:persistence column-name="id"
0524:             * @jonas.cmp-field-jdbc-mapping
0525:             *    field-name="id"
0526:             *    jdbc-field-name="id"
0527:             *   	key-jdbc-name="fk_node"
0528:             * @ejb:transaction type="Supports"
0529:             **/
0530:            public abstract String getId();
0531:
0532:            /**
0533:             * Set the BnNode's id.
0534:             *
0535:             * @param pId The id of this BnNode. Is set at creation time.
0536:             * @ejb:transaction type="Required"
0537:             **/
0538:            public abstract void setId(String pId);
0539:
0540:            /**
0541:             * Retrieve the BnNode's type.
0542:             *
0543:             * @return Returns an int representing the type of this BnNode.
0544:             *
0545:             * @ejb:interface-method view-type="both"
0546:             * @ejb.value-object
0547:             *    match="light"
0548:             *
0549:             * @ejb:persistence column-name="type"
0550:             * @ejb:transaction type="Supports"
0551:             **/
0552:            public abstract int getType();
0553:
0554:            /**
0555:             * Set the BnNode's type.
0556:             *
0557:             * @param pType The type of this BnNode. Is set at creation time.
0558:             * @ejb:interface-method view-type="both"
0559:             * @ejb:transaction type="Required"
0560:             **/
0561:            public abstract void setType(int pType);
0562:
0563:            /**
0564:             * Retrieve the BnNode's state.
0565:             *
0566:             * @return Returns an int representing the state of this BnNode.
0567:             *
0568:             * @ejb:interface-method view-type="both"
0569:             * @ejb.value-object
0570:             *    match="light"
0571:             *
0572:             * @ejb:persistence column-name="state"
0573:             * @ejb:transaction type="Supports"
0574:             **/
0575:            public abstract int getState();
0576:
0577:            /**
0578:             * Set the BnNode's state.
0579:             *
0580:             * @param pState The type of this BnNode. Is set at creation time.
0581:             * @ejb:interface-method view-type="both"
0582:             * @ejb:transaction type="Required"
0583:             **/
0584:            public abstract void setState(int pState);
0585:
0586:            /**
0587:             * Retrieve the BnNode's anticipation mode.
0588:             *
0589:             * @return Returns a boolean indicating if the node is anticipable
0590:             *
0591:             * @ejb:interface-method view-type="both"
0592:             * @ejb.value-object
0593:             *    match="light"
0594:             *
0595:             * @ejb:persistence column-name="anticipable"
0596:             * @ejb:transaction type="Supports"
0597:             **/
0598:            public abstract boolean getAnticipable();
0599:
0600:            /**
0601:             * Set the BnNode's Anticipable mode.
0602:             *
0603:             * @param pAnticipate The mode of this BnNode.
0604:             * @ejb:interface-method view-type="both"
0605:             * @ejb:transaction type="Required"
0606:             **/
0607:            public abstract void setAnticipable(boolean pAnticipable);
0608:
0609:            /**
0610:             * Retrieve the BnNode's Name.
0611:             *
0612:             * @return Returns an int representing the Name of this BnNode.
0613:             *
0614:             * @ejb:interface-method view-type="both"
0615:             * @ejb.value-object
0616:             *    match="light"
0617:             *
0618:             * @ejb:persistence column-name="name"
0619:             * @ejb:transaction type="Supports"
0620:             **/
0621:            public abstract String getName();
0622:
0623:            /**
0624:             * Set the BnNode's Name.
0625:             *
0626:             * @param pName The Name of this BnNode.  Is set at creation time.
0627:             * @ejb:transaction type="Required"
0628:             **/
0629:            public abstract void setName(String pName);
0630:
0631:            /**
0632:             * Retrieve the BnNode's Reference.
0633:             *
0634:             * @return Returns an int representing the Reference pointed by this Node (only for subProcesses)
0635:             *
0636:             * @ejb:interface-method view-type="both"
0637:             * @ejb.value-object
0638:             *      match="light"
0639:             *
0640:             * @ejb:persistence column-name="Reference"
0641:             * @ejb:transaction type="Supports"
0642:             **/
0643:            public abstract String getReference();
0644:
0645:            /**
0646:             * Set the BnNode's Reference.
0647:             *
0648:             * @param nReference  Reference pointed by this Node (only for subProcesses)
0649:             * @ejb:interface-method view-type="both"
0650:             * @ejb:transaction type="Required"
0651:             */
0652:            public abstract void setReference(String nReference);
0653:
0654:            /**
0655:             * Retrieve the BnNode's Description.
0656:             *
0657:             * @return Returns the description of the node
0658:             *
0659:             * @ejb:interface-method view-type="both"
0660:             * @ejb.value-object
0661:             *    match="light"
0662:             *
0663:             * @ejb:persistence column-name="description"
0664:             * @ejb:transaction type="Supports"
0665:             **/
0666:            public abstract String getDescription();
0667:
0668:            /**
0669:             * Set the BnNode's Description.
0670:             *
0671:             * @param pDescription The Description of this BnNode.
0672:             * @ejb:interface-method view-type="both"
0673:             * @ejb:transaction type="Required"
0674:             **/
0675:            public abstract void setDescription(String pDescription);
0676:
0677:            /**
0678:             * Retrieve the BnNode's activityPerformer.
0679:             *
0680:             * @return Returns the activityPerformer of the node
0681:             *
0682:             * @ejb:interface-method view-type="both"
0683:             * @ejb.value-object
0684:             *    match="light"
0685:             *
0686:             * @ejb:persistence column-name="activityPerformer"
0687:             * @ejb:transaction type="Supports"
0688:             **/
0689:            public abstract String getActivityPerformer();
0690:
0691:            /**
0692:             * Set the BnNode's activityPerformer.
0693:             *
0694:             * @param pActivityPerformer The ActivityPerformer of this BnNode.
0695:             * @ejb:interface-method view-type="both"
0696:             * @ejb:transaction type="Required"
0697:             **/
0698:            public abstract void setActivityPerformer(String pActivityPerformer);
0699:
0700:            /**
0701:             * Retrieve the BnNode's StartDate.
0702:             *
0703:             * @return Returns the start date of the node
0704:             *
0705:             * @ejb:interface-method view-type="both"
0706:             * @ejb.value-object
0707:             *    match="light"
0708:             *
0709:             * @ejb:persistence column-name="startdate"
0710:             * @ejb:transaction type="Supports"
0711:             **/
0712:            public abstract Date getStartDate();
0713:
0714:            /**
0715:             * Set the BnNode's StartDate.
0716:             *
0717:             * @param pStartDate The StartDate of this BnNode.
0718:             * @ejb:interface-method view-type="both"
0719:             * @ejb:transaction type="Required"
0720:             **/
0721:            public abstract void setStartDate(Date pStartDate);
0722:
0723:            /**
0724:             * Retrieve the BnNode's EndDate.
0725:             *
0726:             * @return Returns the end date of the node
0727:             *
0728:             * @ejb:interface-method view-type="both"
0729:             * @ejb.value-object
0730:             *    match="light"
0731:             *
0732:             * @ejb:persistence column-name="enddate"
0733:             * @ejb:transaction type="Supports"
0734:             **/
0735:            public abstract Date getEndDate();
0736:
0737:            /**
0738:             * Set the BnNode's EndDate.
0739:             *
0740:             * @param pEndDate The end date of this BnNode.
0741:             * @ejb:interface-method view-type="both"
0742:             * @ejb:transaction type="Required"
0743:             **/
0744:            public abstract void setEndDate(Date pEndDate);
0745:
0746:            /**
0747:             * Retrieve the BnNode's Deadlines.
0748:             *
0749:             * @return Returns the collection of deadlines of the node
0750:             *
0751:             * @ejb:interface-method view-type="both"
0752:             * @ejb.value-object
0753:             *    match="light"
0754:             *
0755:             * @ejb:persistence column-name="deadlines"
0756:             * @ejb:transaction type="Supports"
0757:             *
0758:             * @jboss.relation-table create-table="true" remove-table="false"
0759:             **/
0760:            public abstract Collection getDeadlines();
0761:
0762:            /**
0763:             * Set the BnNode's Deadlines.
0764:             *
0765:             * @param pDeadlines The Collection of Deadlines of this BnNode.
0766:             * @ejb:interface-method view-type="both"
0767:             * @ejb:transaction type="Required"
0768:             **/
0769:            public abstract void setDeadlines(Collection pDeadlines);
0770:
0771:            /**
0772:             * Retrieve the BnNode's RelativeDeadlines.
0773:             *
0774:             * @return Returns the collection of relative deadlines of the node
0775:             *
0776:             * @ejb:interface-method view-type="both"
0777:             * @ejb.value-object
0778:             *    match="light"
0779:             *
0780:             * @ejb:persistence column-name="relativedeadlines"
0781:             * @ejb:transaction type="Supports"
0782:             *
0783:             * @jboss.relation-table create-table="true" remove-table="false"
0784:             **/
0785:            public abstract Collection getRelativeDeadlines();
0786:
0787:            /**
0788:             * Set the BnNode's Relative Deadlines.
0789:             *
0790:             * @param pDeadlines The Collection of Relative Deadlines of this BnNode.
0791:             * @ejb:interface-method view-type="both"
0792:             * @ejb:transaction type="Required"
0793:             **/
0794:            public abstract void setRelativeDeadlines(Collection pDeadlines);
0795:
0796:            /** Retrieve the BnNode's Creator.
0797:             * @return Returns the node creator
0798:             *
0799:             * @ejb:interface-method view-type="both"
0800:             * @ejb.value-object
0801:             *    match="light"
0802:             *
0803:             * @ejb:persistence column-name="creator"
0804:             * @ejb:transaction type="Supports"
0805:             **/
0806:            public abstract String getCreator();
0807:
0808:            /**
0809:             * Set the BnNode's Creator.
0810:             *
0811:             * @param pCreator The creator of this BnNode.
0812:             * @ejb:interface-method view-type="local"
0813:             * @ejb:transaction type="Required"
0814:             **/
0815:            public abstract void setCreator(String pCreator);
0816:
0817:            /** Retrieve the BnNode's Executor.
0818:             * @return Returns the node executor
0819:             *
0820:             * @ejb:interface-method view-type="both"
0821:             * @ejb.value-object
0822:             *    match="light"
0823:             *
0824:             * @ejb:persistence column-name="executor"
0825:             * @ejb:transaction type="Supports"
0826:             **/
0827:
0828:            public abstract String getExecutor();
0829:
0830:            /**
0831:             * Set the BnNode's Executor.
0832:             *
0833:             * @ejb:interface-method view-type="local"
0834:             * @param pCreator The creator of this BnNode.  Is set at creation time.
0835:             * @ejb:transaction type="Required"
0836:             **/
0837:            public abstract void setExecutor(String pExecutor);
0838:
0839:            /** Retrieve the BnNode's BnRole.
0840:             *
0841:             * @return Returns a String representing the ole associated to the BnNode.
0842:             * @ejb:interface-method view-type="local"
0843:             * @ejb:relation name="NodeRole" role-name="has-role" cascade-delete="yes"
0844:             * @ejb:value-object match="*"
0845:             *       relation="external"
0846:             *       aggregate="hero.interfaces.BnRoleValue"
0847:             *       aggregate-name="BnRole"
0848:             * @ejb:transaction type="Supports"
0849:             * @jboss.relation
0850:             *    related-pk-field = "id"
0851:             *    fk-column = "roleNodeIdFK"
0852:             **/
0853:            public abstract BnRoleLocal getBnRole();
0854:
0855:            /**
0856:             * Set the BnNode's Creator.
0857:             *
0858:             * @param pCreator The creator of this BnNode.  Is set at creation time.
0859:             * @ejb:interface-method view-type="local"
0860:             * @ejb:transaction type="Required"
0861:             **/
0862:            public abstract void setBnRole(BnRoleLocal role);
0863:
0864:            /** Retrieve the performerAssign for the node.
0865:             *
0866:             * @return Returns the node performerAssign.
0867:             * @ejb:interface-method view-type="both"
0868:             * @ejb:relation name="performerAssign-node" role-name="node2performerAssign"
0869:             * @ejb:value-object match="*"
0870:             *       relation="external"
0871:             *       aggregate="hero.interfaces.BnNodePerformerAssignValue"
0872:             *       aggregate-name="BnNodePerformerAssign"
0873:             * @ejb:transaction type="Supports"
0874:             * @jboss.relation
0875:             *    related-pk-field = "id"
0876:             *    fk-column = "nodePerformerNodeIdFK"
0877:             **/
0878:            public abstract BnNodePerformerAssignLocal getBnNodePerformerAssign();
0879:
0880:            /**
0881:             * Set the Nodes of this performerAssign
0882:             *
0883:             * @param pPerformerAssign performerAssign of the  node
0884:             * @ejb:transaction type="Required"
0885:             **/
0886:            public abstract void setBnNodePerformerAssign(
0887:                    BnNodePerformerAssignLocal pPerformerAssign);
0888:
0889:            /**
0890:             * @return  the project of the BnNode
0891:             * @ejb:interface-method view-type="local"
0892:             * @ejb:relation name="Nodes" role-name="is-node-of" cascade-delete="yes"
0893:             * @ejb:value-object match="*"
0894:             *       relation="external"
0895:             *       aggregate="hero.interfaces.BnProjectLightValue"
0896:             *       aggregate-name="BnProject"
0897:             * @ejb:transaction type="Supports"
0898:             * @jboss.relation
0899:             *    related-pk-field = "id"
0900:             *    fk-column = "projectNodeIdFK"
0901:             **/
0902:            public abstract BnProjectLocal getBnProject();
0903:
0904:            /**
0905:             * Set the BnProject Name.
0906:             *
0907:             * @param pName The Name of this BnNode.  Is set at creation time.
0908:             * @ejb:interface-method view-type="local"
0909:             * @ejb:transaction type="Required"
0910:             **/
0911:            public abstract void setBnProject(BnProjectLocal pProject);
0912:
0913:            /**
0914:             * @return  the outgoing edges of the node
0915:             * @ejb:interface-method view-type="local"
0916:             * @ejb:relation name="InBnNode" role-name="has-edges-in" target-multiple="yes"
0917:             * @ejb:transaction type="Supports"
0918:             *
0919:             * @jboss.relation-table create-table="true" remove-table="false"
0920:             *
0921:             **/
0922:            public abstract Collection getOutBnEdges();
0923:
0924:            /**
0925:             * Set the Outgoing edges of the node
0926:             *
0927:             * @param pEdges the outgoing edges of the node
0928:             * @ejb:transaction type="Required"
0929:             **/
0930:            public abstract void setOutBnEdges(Collection pEdges);
0931:
0932:            /**
0933:             * @return  the ingoing edges of the node
0934:             * @ejb:interface-method view-type="local"
0935:             * @ejb:relation name="OutBnNode" role-name="has-edges-out" target-multiple="yes"
0936:             * @ejb:transaction type="Supports"
0937:             *
0938:             **/
0939:            public abstract Collection getInBnEdges();
0940:
0941:            /**
0942:             * Set the Ingoing edges of the node
0943:             *
0944:             * @param pEdges the ingoing edges of the node
0945:             * @ejb:interface-method view-type="local"
0946:             * @ejb:transaction type="Required"
0947:             **/
0948:            public abstract void setInBnEdges(Collection pEdges);
0949:
0950:            /**
0951:             * @return  the ingoing AgentEdges of the node
0952:             * @ejb:interface-method view-type="local"
0953:             * @ejb:relation name="OutNodeInAgentEdge" role-name="has-edges-out" target-multiple="yes"
0954:             * @ejb:transaction type="Supports"
0955:             *
0956:             * @jboss.relation-table create-table="true" remove-table="false"
0957:             *
0958:             **/
0959:            public abstract Collection getInBnAgentEdges();
0960:
0961:            /**
0962:             * Set the Ingoing AgentEdges of the node
0963:             *
0964:             * @param pAgentEdges the ingoing AgentEdges of the node
0965:             * @ejb:transaction type="Required"
0966:             **/
0967:            public abstract void setInBnAgentEdges(Collection pAgentEdges);
0968:
0969:            /**
0970:             * @return Return the creation date of the BnNode
0971:             * @ejb:interface-method view-type="both"
0972:             * @ejb:persistence column-name="creationdate"
0973:             * @ejb:transaction type="Supports"
0974:             * @ejb.value-object
0975:             *      match="light"
0976:             *
0977:             **/
0978:            public abstract Date getCreationDate();
0979:
0980:            /**
0981:             * @param pDate the creation date of the BnNode
0982:             * @ejb:interface-method view-type="both"
0983:             * @ejb:transaction type="Required"
0984:             *
0985:             **/
0986:            public abstract void setCreationDate(Date pDate);
0987:
0988:            /**
0989:             * @return  the properties of the node
0990:             * @ejb:interface-method view-type="both"
0991:             * @ejb:relation name="nodeprp" role-name="is-property-of"
0992:             * @ejb.value-object
0993:             *       match="normal"
0994:             *       type="Collection"
0995:             *       relation="external"
0996:             *       aggregate="hero.interfaces.BnNodePropertyValue"
0997:             *       aggregate-name="BnPropertie"
0998:             *       members="hero.interfaces.BnNodePropertyLocal"
0999:             *       members-name="BnPropertie"
1000:             * @ejb:transaction type="Supports"
1001:             *
1002:             * @jboss.relation-table create-table="true" remove-table="false"
1003:             *
1004:             **/
1005:            public abstract Collection getBnProperties();
1006:
1007:            /**
1008:             * Set the properties of the node
1009:             * @ejb:interface-method view-type="both"
1010:             * @param pPrp the outgoing edges of the node
1011:             * @ejb:transaction type="Required"
1012:             **/
1013:            public abstract void setBnProperties(Collection pPrp);
1014:
1015:            /**
1016:             * @return  the Hooks of the node
1017:             * @ejb:interface-method view-type="both"
1018:             * @ejb:relation name="nodehook" role-name="is-hook-of"
1019:             * @ejb.value-object
1020:             *       match="normal"
1021:             *       type="Collection"
1022:             *       relation="external"
1023:             *       aggregate="hero.interfaces.BnNodeHookValue"
1024:             *       aggregate-name="BnHook"
1025:             *       members="hero.interfaces.BnNodeHookLocal"
1026:             *       members-name="BnHook"
1027:             * @ejb:transaction type="Supports"
1028:             *
1029:             * @jboss.relation-table create-table="true" remove-table="false"
1030:             *
1031:             **/
1032:            public abstract Collection getBnHooks();
1033:
1034:            /**
1035:             * Set the Hooks of the node
1036:             * @ejb:interface-method view-type="both"
1037:             * @param pHook the outgoing edges of the node
1038:             * @ejb:transaction type="Required"
1039:             **/
1040:            public abstract void setBnHooks(Collection pHook);
1041:
1042:            /**
1043:             * @return  the Hooks of the node
1044:             * @ejb:interface-method view-type="both"
1045:             * @ejb:relation name="nodeinterhook" role-name="is-interhook-of"
1046:             * @ejb.value-object
1047:             *       match="normal"
1048:             *       type="Collection"
1049:             *       relation="external"
1050:             *       aggregate="hero.interfaces.BnNodeInterHookValue"
1051:             *       aggregate-name="BnInterHook"
1052:             *       members="hero.interfaces.BnNodeInterHookLocal"
1053:             *       members-name="BnInterHook"
1054:             * @ejb:transaction type="Supports"
1055:             *
1056:             * @jboss.relation-table create-table="true" remove-table="false"
1057:             **/
1058:            public abstract Collection getBnInterHooks();
1059:
1060:            /**
1061:             * Set the Hooks of the node
1062:             * @ejb:interface-method view-type="both"
1063:             * @param pHook the outgoing edges of the node
1064:             * @ejb:transaction type="Required"
1065:             **/
1066:            public abstract void setBnInterHooks(Collection pHook);
1067:
1068:            /**
1069:             * @ejb.interface-method
1070:             * @ejb:transaction type="Supports"
1071:             */
1072:            public abstract BnNodeValue getBnNodeValue();
1073:
1074:            /**
1075:             * @ejb.interface-method
1076:             * @ejb:transaction type="Required"
1077:             */
1078:            public abstract void setBnNodeValue(BnNodeValue v);
1079:
1080:            /**
1081:             * @ejb.interface-method
1082:             * @ejb:transaction type="Supports"
1083:             */
1084:            public abstract BnNodeLightValue getBnNodeLightValue();
1085:
1086:            /**
1087:             * @ejb.interface-method
1088:             * @ejb:transaction type="Required"
1089:             */
1090:            public abstract void setBnNodeLightValue(BnNodeLightValue v);
1091:
1092:            /**
1093:             * @return true if the BnNode is executing
1094:             * @ejb.interface-method view-type="local"
1095:             * @ejb:transaction type="Supports"
1096:             */
1097:            public boolean isExecuting() {
1098:                return (this .getState() == hero.interfaces.Constants.Nd.EXECUTING || this 
1099:                        .getState() == hero.interfaces.Constants.Nd.ANTICIPATING);
1100:            }
1101:
1102:            /**
1103:             * @return true if the BnNode is TErminated
1104:             * @ejb.interface-method view-type="local"
1105:             * @ejb:transaction type="Supports"
1106:             */
1107:            public boolean isTerminated() {
1108:                return (this .getState() == hero.interfaces.Constants.Nd.TERMINATED || this 
1109:                        .getState() == hero.interfaces.Constants.Nd.FINISHED);
1110:            }
1111:
1112:            /**
1113:             * @return true if the BnNode is Cancelled
1114:             * @ejb.interface-method view-type="local"
1115:             * @ejb:transaction type="Supports"
1116:             */
1117:            public boolean isCancelled() {
1118:                return (this .getState() == hero.interfaces.Constants.Nd.DEAD);
1119:            }
1120:
1121:            /**
1122:             *
1123:             * @ejb.select
1124:             *	  result-type-mapping="Local"    
1125:             *     query="SELECT DISTINCT n.bnProject.name FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
1126:             *                   WHERE u.name = ?1 
1127:             *                   AND r.name = ?2
1128:             * 					 AND n.bnProject.type = ?3
1129:             *                   AND r.bnProject.id = n.bnProject.id
1130:             *                   AND ru.id=u.id"
1131:             */
1132:            public abstract Collection ejbSelectAdminActivitiesByProcess(
1133:                    java.lang.String userName, java.lang.String role,
1134:                    java.lang.String instance, java.lang.String cooperative)
1135:                    throws FinderException;
1136:
1137:            /**
1138:             * @ejb.home-method view-type="local"
1139:             * @param userName name of the user
1140:             * @ejb:transaction type="Supports"
1141:             *
1142:             **/
1143:            public Collection ejbHomeGetAdminActivitiesByProcess(
1144:                    String userName, String role, String instance,
1145:                    String cooperative) throws HeroException {
1146:                try {
1147:                    return (ejbSelectAdminActivitiesByProcess(userName, role,
1148:                            instance, cooperative));
1149:                } catch (FinderException fe) {
1150:                    throw new HeroException(fe.getMessage());
1151:                }
1152:            }
1153:
1154:            /**
1155:             *
1156:             * @ejb.select
1157:             *	  result-type-mapping="Local"    
1158:             *     query="SELECT DISTINCT n.executor FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
1159:             *                   WHERE u.name = ?1 
1160:             *                   AND r.name = ?2
1161:             * 					 AND (n.bnProject.type = ?3 OR n.bnProject.type = ?4)
1162:             *                   AND r.bnProject.id = n.bnProject.id
1163:             *                   AND ru.id=u.id"
1164:             */
1165:            public abstract Collection ejbSelectAdminActivitiesByExecutor(
1166:                    java.lang.String userName, java.lang.String role,
1167:                    java.lang.String instance, java.lang.String cooperative)
1168:                    throws FinderException;
1169:
1170:            /**
1171:             * @ejb.home-method view-type="local"
1172:             * @param userName name of the user
1173:             * @ejb:transaction type="Supports"
1174:             *
1175:             **/
1176:            public Collection ejbHomeGetAdminActivitiesByExecutor(
1177:                    String userName, String role, String instance,
1178:                    String cooperative) throws HeroException {
1179:                try {
1180:                    return (ejbSelectAdminActivitiesByExecutor(userName, role,
1181:                            instance, cooperative));
1182:                } catch (FinderException fe) {
1183:                    throw new HeroException(fe.getMessage());
1184:                }
1185:            }
1186:
1187:            /**
1188:             *
1189:             * @ejb.select
1190:             *	  result-type-mapping="Local"    
1191:             *     query="SELECT DISTINCT n.activityPerformer FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
1192:             *                   WHERE u.name = ?1 
1193:             *                   AND r.name = ?2
1194:             * 					 AND (n.bnProject.type = ?3 OR n.bnProject.type = ?4)
1195:             *                   AND r.bnProject.id = n.bnProject.id
1196:             *                   AND ru.id=u.id"
1197:             */
1198:            public abstract Collection ejbSelectAdminActivitiesByPerformer(
1199:                    java.lang.String userName, java.lang.String role,
1200:                    java.lang.String instance, java.lang.String cooperative)
1201:                    throws FinderException;
1202:
1203:            /**
1204:             * @ejb.home-method view-type="local"
1205:             * @param userName name of the user
1206:             * @ejb:transaction type="Supports"
1207:             *
1208:             **/
1209:            public Collection ejbHomeGetAdminActivitiesByPerformer(
1210:                    String userName, String role, String instance,
1211:                    String cooperative) throws HeroException {
1212:                try {
1213:                    return (ejbSelectAdminActivitiesByPerformer(userName, role,
1214:                            instance, cooperative));
1215:                } catch (FinderException fe) {
1216:                    throw new HeroException(fe.getMessage());
1217:                }
1218:            }
1219:
1220:            /**
1221:             *
1222:             * @ejb.select
1223:             *	  result-type-mapping="Local"    
1224:             *     query="SELECT DISTINCT n.state FROM BnNode AS n, BnRole as r, IN (n.bnProject.bnUsers) AS u, IN (r.bnUsers) as ru
1225:             *                   WHERE u.name = ?1 
1226:             *                   AND r.name = ?2
1227:             * 					 AND (n.bnProject.type = ?3 OR n.bnProject.type = ?4)
1228:             *                   AND r.bnProject.id = n.bnProject.id
1229:             *                   AND ru.id=u.id"
1230:             */
1231:            public abstract Collection ejbSelectAdminActivitiesByState(
1232:                    java.lang.String userName, java.lang.String role,
1233:                    java.lang.String instance, java.lang.String cooperative)
1234:                    throws FinderException;
1235:
1236:            /**
1237:             * @ejb.home-method view-type="local"
1238:             * @param userName name of the user
1239:             * @ejb:transaction type="Supports"
1240:             *
1241:             **/
1242:            public Collection ejbHomeGetAdminActivitiesByState(String userName,
1243:                    String role, String instance, String cooperative)
1244:                    throws HeroException {
1245:                try {
1246:                    return (ejbSelectAdminActivitiesByState(userName, role,
1247:                            instance, cooperative));
1248:                } catch (FinderException fe) {
1249:                    throw new HeroException(fe.getMessage());
1250:                }
1251:            }
1252:
1253:            // -------------------------------------------------------------------------
1254:            // Framework Callbacks
1255:            // -------------------------------------------------------------------------
1256:
1257:            /**
1258:             * Create a BnNode based on the supplied BnNode Value Object.
1259:             *
1260:             *
1261:             * @throws InvalidValueException If one of the values are not correct,
1262:             *                               this will not roll back the transaction
1263:             *                               because the caller has the chance to
1264:             *                               fix the problem and try again
1265:             * @throws EJBException If no new unique ID could be retrieved this will
1266:             *                      rollback the transaction because there is no
1267:             *                      hope to try again
1268:             * @throws CreateException Because we have to do so (EJB spec.)
1269:             *
1270:             * @ejb:create-method view-type="both"
1271:             **/
1272:            public BnNodePK ejbCreate(BnNodeValue nd)
1273:                    throws InvalidValueException, EJBException, CreateException {
1274:                try {
1275:                    BonitaServiceLocator serviceLocator = BonitaServiceLocator
1276:                            .getInstance();
1277:                    this .setId(hero.interfaces.BnNodeUtil.generateGUID(this ));
1278:                    this .setDeadlines(new ArrayList());
1279:                    this .setRelativeDeadlines(new ArrayList());
1280:
1281:                } catch (BonitaServiceException e) {
1282:                    throw new CreateException(e.getMessage());
1283:                }
1284:                // This is only possible in CMPs. Otherwise return a valid PK.
1285:                return null;
1286:            }
1287:
1288:            public void ejbPostCreate(BnNodeValue nd) {
1289:                // Assign value object in ejbPostCreate to apply XDoclet best
1290:                // practice. If not done, there will be an error in JBoss if
1291:                // the Value Object has relations.
1292:                this .setBnNodeValue(nd);
1293:            }
1294:
1295:            /**
1296:             * Create a BnNode based on the supplied Name and type.
1297:             *
1298:             *
1299:             * @throws InvalidValueException If one of the values are not correct,
1300:             *                               this will not roll back the transaction
1301:             *                               because the caller has the chance to
1302:             *                               fix the problem and try again
1303:             * @throws EJBException If no new unique ID could be retrieved this will
1304:             *                      rollback the transaction because there is no
1305:             *                      hope to try again
1306:             * @throws CreateException Because we have to do so (EJB spec.)
1307:             *
1308:             * @ejb:create-method view-type="both"
1309:             **/
1310:            public BnNodePK ejbCreate(String name, int type)
1311:                    throws InvalidValueException, EJBException, CreateException {
1312:                this .setName(name);
1313:                this .setType(type);
1314:                this .setState(hero.interfaces.Constants.Nd.READY);
1315:                this .setAnticipable(true);
1316:                this .setDeadlines(new ArrayList());
1317:                this .setRelativeDeadlines(new ArrayList());
1318:                this .setId(hero.interfaces.BnNodeUtil.generateGUID(this ));
1319:
1320:                // This is only possible in CMPs. Otherwise return a valid PK.
1321:                return null;
1322:            }
1323:
1324:            public void setEntityContext(EntityContext lContext) {
1325:                mContext = lContext;
1326:            }
1327:
1328:            public void unsetEntityContext() {
1329:                mContext = null;
1330:            }
1331:
1332:            public void ejbActivate() {
1333:            }
1334:
1335:            public void ejbPassivate() {
1336:            }
1337:
1338:            public void ejbLoad() {
1339:            }
1340:
1341:            public void ejbStore() {
1342:            }
1343:
1344:            public void ejbRemove() throws RemoveException {
1345:            }
1346:
1347:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.