Source Code Cross Referenced for TiephyBean.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 TiephyBean
006:
007:        implements  javax.ejb.EntityBean {
008:
009:            protected javax.ejb.EntityContext entityCtx = null;
010:
011:            protected TiephyValue TiephyValue = 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 nomusatie
027:             * @return the nomusatie
028:             */
029:            public abstract java.lang.String getNomusatie();
030:
031:            /**
032:             * Sets the nomusatie
033:             * @param nomusatie the new nomusatie value
034:             */
035:            public abstract void setNomusatie(java.lang.String nomusatie);
036:
037:            /**
038:             * This is a bi-directional one-to-one relationship CMR method
039:             * @return the TierLocal.
040:             */
041:            public abstract TierLocal getTier();
042:
043:            /**
044:             * get method relation one
045:             */
046:            public TierValue getTierValue() {
047:                // return the value !
048:                return getTier().getTierValue();
049:            }
050:
051:            /**
052:             * get method relation one
053:             * @ejb.interface-method view-type="local"
054:             */
055:            public void setTierValue(TierValue value) {
056:                getTier().update(value);
057:            }
058:
059:            /**
060:             * Sets the related TierLocal
061:             * @param tier the related TierLocal
062:             */
063:            public abstract void setTier(TierLocal tier);
064:
065:            /**
066:             * Return the value object version of this entity.
067:             */
068:            public TiephyValue getTiephyValue() {
069:                try {
070:                    TiephyValue = new TiephyValue();
071:                    TiephyValue = setColumns(TiephyValue);
072:                    return TiephyValue;
073:                } catch (EJBException e) {
074:                    // TODO Auto-generated catch block
075:                    e.printStackTrace();
076:                } catch (IllegalStateException e) {
077:                    // TODO Auto-generated catch block
078:                    e.printStackTrace();
079:                }
080:                return null;
081:
082:            }
083:
084:            /**
085:             * Update the value object version of this entity.
086:             * @ejb.interface-method view-type="local"
087:             */
088:            public void update(TiephyValue value) {
089:                if (value.nomusatieHasBeenSet())
090:                    setNomusatie(value.getNomusatie());
091:            }
092:
093:            /**
094:             * Creates an instance based on a value object When the client invokes a
095:             * create method, the EJB container invokes the ejbCreate method. Typically,
096:             * an ejbCreate method in an entity bean performs the following tasks:
097:             * <UL>
098:             * <LI>Inserts the entity state into the database.</LI>
099:             * <LI>Initializes the instance variables.</LI>
100:             * <LI>Returns the primary key.</LI>
101:             * </UL>
102:             * @param value the value object used to initialise the new instance
103:             * @return the primary key of the new instance
104:             */
105:            public java.lang.Integer ejbCreate(TiephyValue value, TierLocal tier)
106:                    throws javax.ejb.CreateException {
107:                // Use Middlegen's Sequence Block PK generator. Only works for numeric
108:                // fields
109:                try {
110:                    SequenceSessionLocal sequenceGenerator = SequenceSessionUtil
111:                            .getLocalHome().create();
112:                    setNuminttie(new java.lang.Integer(
113:                            Integer
114:                                    .toString(sequenceGenerator
115:                                            .getNextSequenceNumber("CNEDI.TIEPHY.NUMINTTIE"))));
116:                } catch (javax.naming.NamingException e) {
117:                    throw new javax.ejb.CreateException(e.getMessage());
118:                }
119:                // Use XDoclet's GUID generator. Only works for String fields
120:                // This requires <utilobject includeGUID="true"/> in ejbdoclet.
121:
122:                setNomusatie(value.getNomusatie());
123:                // EJB 2.0 spec says return null for CMP ejbCreate methods.
124:                return null;
125:            }
126:
127:            /**
128:             * The container invokes this method immediately after it calls ejbCreate.
129:             * @param value the value object used to initialise the new instance
130:             */
131:            public void ejbPostCreate(TiephyValue value, TierLocal tier)
132:                    throws javax.ejb.CreateException {
133:                // Set CMR fields
134:                setTier(tier);
135:            }
136:
137:            // No
138:            // D:\IBM\Eclipse3.0\eclipse\workspace\TestBugs\middlegen/src/middlegen/cmp20-tiephy-class-code.txt
139:            // found.
140:
141:            public void setEntityContext(javax.ejb.EntityContext entityCtx) {
142:                this .entityCtx = entityCtx;
143:            }
144:
145:            public void unsetEntityContext() {
146:                this .entityCtx = null;
147:            }
148:
149:            private TiephyValue setColumns(TiephyValue value) {
150:                value.setNuminttie(getNuminttie());
151:                value.setNomusatie(getNomusatie());
152:                return value;
153:            }
154:        }
w_ww_.___ja___v_a_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.