Source Code Cross Referenced for CmpOrder.java in  » Database-ORM » ODAL » com » odal » petstore » persistence » gen » cmp » 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.odal.petstore.persistence.gen.cmp 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * GENERATED CODE: DO NOT MODIFY IT UNDER ANY CIRCUMSTANCES!!!
003:         */package com.odal.petstore.persistence.gen.cmp;
004:
005:        import com.completex.objective.components.persistency.*;
006:        import java.sql.SQLException;
007:        import java.util.List;
008:        import java.util.ArrayList;
009:        import java.util.Date;
010:
011:        public class CmpOrder extends
012:                com.odal.petstore.persistence.gen.pos.OrderPO implements 
013:                java.io.Externalizable {
014:
015:            public CmpOrder() {
016:            }
017:
018:            public CmpOrder(long orderId) {
019:                super (orderId);
020:            }
021:
022:            //
023:            // Complex object part:
024:            //
025:            public static final String CPX_CHILD_LINE_ITEM = "lineItem";
026:            protected static final com.completex.objective.components.persistency.type.TracingArrayListCollectionFactory LINE_ITEM_COLLECTION_FACTORY = new com.completex.objective.components.persistency.type.TracingArrayListCollectionFactory();
027:            private List lineItems;
028:
029:            protected static final int CPX_INDEX_LINE_ITEM = 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) cpxFactoryLineItem());
042:                    link = new ChainedLink(
043:                            query,
044:                            new int[] { CmpOrder.ICOL_ORDER_ID, },
045:                            new int[] { com.odal.petstore.persistence.gen.pos.LineItemPO.ICOL_ORDER_ID, },
046:                            CPX_CHILD_LINE_ITEM);
047:                    link.setLazyRetrieval(true);
048:                    link.setCascadeInsert(true);
049:                    link.setCascadeUpdate(true);
050:                    link.setCascadeDelete(true);
051:                    link.setInsertBeforeParent(false);
052:                    query
053:                            .setMultipleResultFactory(LINE_ITEM_COLLECTION_FACTORY);
054:                    links[CPX_INDEX_LINE_ITEM] = 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.odal.petstore.persistence.gen.pos.LineItemPO cpxFactoryLineItem() {
066:                return new com.odal.petstore.persistence.gen.pos.LineItemPO();
067:            }
068:
069:            public List getLineItems() {
070:                List value = (List) getChildObject(CPX_CHILD_LINE_ITEM,
071:                        this .lineItems);
072:                return (this .lineItems = _ridOfLineItemsNull(value));
073:            }
074:
075:            public List _getLineItems() {
076:                List value = (List) getChildObjectStraight(CPX_CHILD_LINE_ITEM,
077:                        this .lineItems);
078:                return (this .lineItems = _ridOfLineItemsNull(value));
079:            }
080:
081:            public void setLineItems(List lineItems) {
082:                this .lineItems = (List) setChildObjectSafe(CPX_CHILD_LINE_ITEM,
083:                        lineItems);
084:            }
085:
086:            public List addLineItems() {
087:                List lineItems = (List) LINE_ITEM_COLLECTION_FACTORY
088:                        .newCollection();
089:                java.util.Collection collection = lineItems;
090:                handleAddCollection(collection);
091:                setLineItems(lineItems);
092:                return this .lineItems;
093:            }
094:
095:            protected List _ridOfLineItemsNull(List value) {
096:                if (value == null) {
097:                    value = lazyLineItems();
098:                }
099:                return value;
100:            }
101:
102:            public boolean addLineItem(
103:                    com.odal.petstore.persistence.gen.pos.LineItemPO lineItem) {
104:                return lazyLineItems().add(lineItem);
105:            }
106:
107:            protected List lazyLineItems() {
108:                if (this .lineItems == null) {
109:                    addLineItems();
110:                }
111:                return this .lineItems;
112:            }
113:
114:            public boolean removeLineItem(
115:                    com.odal.petstore.persistence.gen.pos.LineItemPO lineItem) {
116:                if (this .lineItems == null) {
117:                    return false;
118:                }
119:                return this .lineItems.remove(lineItem);
120:            }
121:
122:            protected void doUnflatten() {
123:                unflatten(toLink(), CPX_CHILD_LINE_ITEM, lineItems);
124:            }
125:
126:            protected void doFlatten() {
127:                flatten(lineItems);
128:            }
129:
130:            protected void doPreFlatten() {
131:                _getLineItems();
132:            }
133:
134:            //
135:            // Compound object part: 
136:            //        
137:
138:            private static com.odal.petstore.persistence.gen.pos.OrderStatusPO CPD_FACTORY_ORDER_STATUS;
139:
140:            private transient int cpdIndexOrderStatus;
141:
142:            protected void doSetupCompound() {
143:                super .doSetupCompound();
144:                cpdIndexOrderStatus = nextCompoundIndex();
145:                compoundEntry(cpdIndexOrderStatus,
146:                        (PersistentObject) cpdFactoryOrderStatus()
147:                                .newPersistentInstance());
148:                compoundCascadeDelete(cpdIndexOrderStatus, true);
149:                compoundCascadeInsert(cpdIndexOrderStatus, true);
150:            }
151:
152:            protected com.odal.petstore.persistence.gen.pos.OrderStatusPO cpdFactoryOrderStatus() {
153:                if (CPD_FACTORY_ORDER_STATUS == null) {
154:                    synchronized (com.odal.petstore.persistence.gen.pos.OrderStatusPO.class) {
155:                        if (CPD_FACTORY_ORDER_STATUS == null) {
156:                            CPD_FACTORY_ORDER_STATUS = new com.odal.petstore.persistence.gen.pos.OrderStatusPO();
157:                        }
158:                    }
159:                }
160:                return CPD_FACTORY_ORDER_STATUS;
161:            }
162:
163:            // Containment type - "is"
164:            protected com.odal.petstore.persistence.gen.pos.OrderStatusPO extractCpdEntryOrderStatus() {
165:                return (com.odal.petstore.persistence.gen.pos.OrderStatusPO) compoundEntry(cpdIndexOrderStatus);
166:            }
167:
168:            //
169:            // timestamp:
170:            //
171:            public Date getTimestamp() {
172:                return extractCpdEntryOrderStatus().getTimestamp();
173:            }
174:
175:            public void setTimestamp(Date timestamp) {
176:                extractCpdEntryOrderStatus().setTimestamp(timestamp);
177:            }
178:
179:            public boolean izNullTimestamp() {
180:                return extractCpdEntryOrderStatus().izNullTimestamp();
181:            }
182:
183:            public void setNullTimestamp() {
184:                extractCpdEntryOrderStatus().setNullTimestamp();
185:            }
186:
187:            //
188:            // status:
189:            //
190:            public String getStatus() {
191:                return extractCpdEntryOrderStatus().getStatus();
192:            }
193:
194:            public void setStatus(String status) {
195:                extractCpdEntryOrderStatus().setStatus(status);
196:            }
197:
198:            public boolean izNullStatus() {
199:                return extractCpdEntryOrderStatus().izNullStatus();
200:            }
201:
202:            public void setNullStatus() {
203:                extractCpdEntryOrderStatus().setNullStatus();
204:            }
205:
206:            public boolean compound() {
207:                return true;
208:            }
209:
210:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.