Source Code Cross Referenced for CpxCustomerPO.java in  » Database-ORM » ODAL » com » completex » objective » persistency » examples » ex003a » cpxpos » 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 » Database ORM » ODAL » com.completex.objective.persistency.examples.ex003a.cpxpos 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * GENERATED CODE: DO NOT MODIFY IT UNDER ANY CIRCUMSTANCES!!!
003:         */package com.completex.objective.persistency.examples.ex003a.cpxpos;
004:
005:        import com.completex.objective.components.persistency.*;
006:        import java.sql.SQLException;
007:        import java.util.List;
008:        import java.util.ArrayList;
009:
010:        public class CpxCustomerPO
011:                extends
012:                com.completex.objective.persistency.examples.ex003a.domain.Customer
013:                implements  ICpxCustomer, java.io.Externalizable {
014:
015:            public CpxCustomerPO() {
016:            }
017:
018:            public CpxCustomerPO(Long customerId) {
019:                super (customerId);
020:            }
021:
022:            //
023:            // Complex object part:
024:            //
025:            public static final String CPX_CHILD_CONTACT_REL = "contactRel";
026:            protected static final com.completex.objective.components.persistency.type.TracingArrayListCollectionFactory CONTACT_REL_COLLECTION_FACTORY = new com.completex.objective.components.persistency.type.TracingArrayListCollectionFactory();
027:            private List contactRels;
028:
029:            protected static final int CPX_INDEX_CONTACT_REL = 0;
030:
031:            public boolean complex() {
032:                return true;
033:            }
034:
035:            protected Link[] links(QueryFactory queryFactory) {
036:                try {
037:                    Link[] links = new Link[1];
038:                    Query query;
039:                    Link link;
040:                    query = queryFactory
041:                            .newQuery((PersistentObject) cpxFactoryContactRel());
042:                    link = new ChainedLink(
043:                            query,
044:                            new int[] { CpxCustomerPO.ICOL_CUSTOMER_ID, },
045:                            new int[] { com.completex.objective.persistency.examples.ex003a.domain.CustomerContactRel.ICOL_CUSTOMER_ID, },
046:                            CPX_CHILD_CONTACT_REL);
047:                    link.setLazyRetrieval(true);
048:                    link.setCascadeInsert(true);
049:                    link.setCascadeUpdate(true);
050:                    link.setCascadeDelete(true);
051:                    link.setInsertBeforeParent(false);
052:                    query
053:                            .setMultipleResultFactory(CONTACT_REL_COLLECTION_FACTORY);
054:                    links[CPX_INDEX_CONTACT_REL] = link;
055:                    return links;
056:                } catch (Exception e) {
057:                    throw new OdalRuntimePersistencyException(e);
058:                }
059:            }
060:
061:            /**
062:             *
063:             * @return Child factory
064:             */
065:            protected com.completex.objective.persistency.examples.ex003a.domain.CustomerContactRel cpxFactoryContactRel() {
066:                return new com.completex.objective.persistency.examples.ex003a.domain.CustomerContactRel();
067:            }
068:
069:            public List getContactRels() {
070:                List value = (List) getChildObject(CPX_CHILD_CONTACT_REL,
071:                        this .contactRels);
072:                return (this .contactRels = _ridOfContactRelsNull(value));
073:            }
074:
075:            public List _getContactRels() {
076:                List value = (List) getChildObjectStraight(
077:                        CPX_CHILD_CONTACT_REL, this .contactRels);
078:                return (this .contactRels = _ridOfContactRelsNull(value));
079:            }
080:
081:            public void setContactRels(List contactRels) {
082:                this .contactRels = (List) setChildObjectSafe(
083:                        CPX_CHILD_CONTACT_REL, contactRels);
084:            }
085:
086:            public List addContactRels() {
087:                List contactRels = (List) CONTACT_REL_COLLECTION_FACTORY
088:                        .newCollection();
089:                java.util.Collection collection = contactRels;
090:                handleAddCollection(collection);
091:                setContactRels(contactRels);
092:                return this .contactRels;
093:            }
094:
095:            protected List _ridOfContactRelsNull(List value) {
096:                if (value == null) {
097:                    value = lazyContactRels();
098:                }
099:                return value;
100:            }
101:
102:            public boolean addContactRel(
103:                    com.completex.objective.persistency.examples.ex003a.pos.ICustomerContactRel contactRel) {
104:                return lazyContactRels().add(contactRel);
105:            }
106:
107:            protected List lazyContactRels() {
108:                if (this .contactRels == null) {
109:                    addContactRels();
110:                }
111:                return this .contactRels;
112:            }
113:
114:            public boolean removeContactRel(
115:                    com.completex.objective.persistency.examples.ex003a.pos.ICustomerContactRel contactRel) {
116:                if (this .contactRels == null) {
117:                    return false;
118:                }
119:                return this .contactRels.remove(contactRel);
120:            }
121:
122:            protected void doUnflatten() {
123:                unflatten(toLink(), CPX_CHILD_CONTACT_REL, contactRels);
124:            }
125:
126:            protected void doFlatten() {
127:                flatten(contactRels);
128:            }
129:
130:            protected void doPreFlatten() {
131:                _getContactRels();
132:            }
133:
134:            //
135:            // Compound object part: 
136:            //        
137:
138:            public boolean compound() {
139:                return false;
140:            }
141:
142:        }
w__w__w__.___j___av_a__2s.___co__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.