Source Code Cross Referenced for TierBean.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » jtests » beans » relation » tier » 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 » J2EE » JOnAS 4.8.6 » org.objectweb.jonas.jtests.beans.relation.tier 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.objectweb.jonas.jtests.beans.relation.tier;
002:
003:        import javax.ejb.EJBException;
004:
005:        public abstract class TierBean
006:
007:        implements  javax.ejb.EntityBean {
008:
009:            protected javax.ejb.EntityContext entityCtx = null;
010:
011:            protected TierValue TierValue = null;
012:
013:            /**
014:             * Returns the numinttie
015:             * @return the numinttie
016:             */
017:            public abstract java.lang.Integer getNuminttie();
018:
019:            /**
020:             * Sets the numinttie
021:             * @param numinttie the new numinttie value
022:             */
023:            public abstract void setNuminttie(java.lang.Integer numinttie);
024:
025:            /**
026:             * Returns the emailtie
027:             * @return the emailtie
028:             */
029:            public abstract java.lang.String getEmailtie();
030:
031:            /**
032:             * Sets the emailtie
033:             * @param emailtie the new emailtie value
034:             */
035:            public abstract void setEmailtie(java.lang.String emailtie);
036:
037:            /**
038:             * This is a bi-directional one-to-one relationship CMR method
039:             * @return the related TiephyLocal.
040:             */
041:            public abstract TiephyLocal getTiephy();
042:
043:            /**
044:             * get method relation one
045:             */
046:            public TiephyValue getTiephyValue() {
047:                // return the value !
048:                return getTiephy().getTiephyValue();
049:            }
050:
051:            /**
052:             * get method relation one
053:             */
054:            public void setTiephyValue(TiephyValue value) {
055:                getTiephy().update(value);
056:            }
057:
058:            /**
059:             * Sets the related test.entity.tiephy.TiephyLocal
060:             */
061:            public abstract void setTiephy(TiephyLocal tiephy);
062:
063:            /**
064:             * This is a bi-directional one-to-one relationship CMR method
065:             * @return the related TiemorLocal.
066:             */
067:            public abstract TiemorLocal getTiemor();
068:
069:            /**
070:             * get method relation one
071:             */
072:            public TiemorValue getTiemorValue() {
073:                // return the value !
074:                return getTiemor().getTiemorValue();
075:            }
076:
077:            /**
078:             * get method relation one
079:             */
080:            public void setTiemorValue(TiemorValue value) {
081:                getTiemor().update(value);
082:            }
083:
084:            /**
085:             * Sets the related test.entity.tiemor.TiemorLocal
086:             * @param tiemor the related TiemorLocal
087:             */
088:            public abstract void setTiemor(TiemorLocal tiemor);
089:
090:            /**
091:             * Return the value object version of this entity.
092:             */
093:            public TierValue getTierValue() {
094:                try {
095:                    TierValue = new TierValue();
096:                    TierValue = setColumns(TierValue);
097:                    return TierValue;
098:                } catch (EJBException e) {
099:                    // TODO Auto-generated catch block
100:                    e.printStackTrace();
101:                } catch (IllegalStateException e) {
102:                    // TODO Auto-generated catch block
103:                    e.printStackTrace();
104:                }
105:                return null;
106:
107:            }
108:
109:            /**
110:             * Update the value object version of this entity.
111:             * @ejb.interface-method view-type="local"
112:             */
113:            public void update(TierValue value) {
114:                if (value.emailtieHasBeenSet())
115:                    setEmailtie(value.getEmailtie());
116:            }
117:
118:            /**
119:             * Creates an instance based on a value object When the client invokes a
120:             * create method, the EJB container invokes the ejbCreate method. Typically,
121:             * an ejbCreate method in an entity bean performs the following tasks:
122:             * <UL>
123:             * <LI>Inserts the entity state into the database.</LI>
124:             * <LI>Initializes the instance variables.</LI>
125:             * <LI>Returns the primary key.</LI>
126:             * </UL>
127:             * @param value the value object used to initialise the new instance
128:             * @return the primary key of the new instance
129:             * @ejb.create-method view-type="local"
130:             */
131:            public java.lang.Integer ejbCreate(TierValue value)
132:                    throws javax.ejb.CreateException {
133:                // Use Middlegen's Sequence Block PK generator. Only works for numeric
134:                // fields
135:                try {
136:                    SequenceSessionLocal sequenceGenerator = SequenceSessionUtil
137:                            .getLocalHome().create();
138:                    setNuminttie(new java.lang.Integer(
139:                            Integer
140:                                    .toString(sequenceGenerator
141:                                            .getNextSequenceNumber("CNEDI.TIERS.NUMINTTIE"))));
142:                } catch (javax.naming.NamingException e) {
143:                    throw new javax.ejb.CreateException(e.getMessage());
144:                }
145:                // Use XDoclet's GUID generator. Only works for String fields
146:                // This requires <utilobject includeGUID="true"/> in ejbdoclet.
147:
148:                setEmailtie(value.getEmailtie());
149:                // EJB 2.0 spec says return null for CMP ejbCreate methods.
150:                return null;
151:            }
152:
153:            /**
154:             * The container invokes this method immediately after it calls ejbCreate.
155:             * @param value the value object used to initialise the new instance
156:             */
157:            public void ejbPostCreate(TierValue value)
158:                    throws javax.ejb.CreateException {
159:            }
160:
161:            public void setEntityContext(javax.ejb.EntityContext entityCtx) {
162:                this .entityCtx = entityCtx;
163:            }
164:
165:            public void unsetEntityContext() {
166:                this .entityCtx = null;
167:            }
168:
169:            private TierValue setColumns(TierValue value) {
170:                value.setNuminttie(getNuminttie());
171:                value.setEmailtie(getEmailtie());
172:                return value;
173:            }
174:        }
w_w__w.java_2_s__._c_o__m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.