Source Code Cross Referenced for CustomerOrderPoCtl.java in  » Database-ORM » ODAL » com » completex » objective » persistency » examples » ex005 » pos » 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.ex005.pos 
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.ex005.pos;
004:
005:        import com.completex.objective.components.persistency.core.impl.AbstractLifeCycleController;
006:        import com.completex.objective.components.persistency.LifeCycleController;
007:        import com.completex.objective.components.persistency.Record;
008:        import com.completex.objective.components.persistency.rule.*;
009:        import com.completex.objective.components.persistency.rule.impl.*;
010:        import java.math.BigDecimal;
011:        import com.completex.objective.components.persistency.PersistentObject;
012:
013:        public class CustomerOrderPoCtl extends AbstractLifeCycleController
014:                implements  PersistentRule {
015:
016:            public static final PersistentObject PERSISTENT = new CustomerOrderPO();
017:
018:            protected RecordValidator recordInsertValidator = new RecordValidatorImpl(
019:                    PERSISTENT, true);
020:
021:            public CustomerOrderPoCtl(String cacheName) {
022:                super (cacheName);
023:            }
024:
025:            public CustomerOrderPoCtl(
026:                    com.completex.objective.components.ocache.OdalCache cache) {
027:                super (cache);
028:            }
029:
030:            protected void initInsertValidator() {
031:                /* COLUMN NAME: ORDER_ID ; ALIAS NAME: ORDER_ID */
032:                initInsertValidatorOrderId();
033:                /* COLUMN NAME: PARENT_ORDER_ID ; ALIAS NAME: PARENT_ORDER_ID */
034:                initInsertValidatorParentOrderId();
035:                /* COLUMN NAME: CUSTOMER_ID ; ALIAS NAME: CUSTOMER_ID */
036:                initInsertValidatorCustomerId();
037:                /* COLUMN NAME: LAST_UPDATED ; ALIAS NAME: LAST_UPDATED */
038:                initInsertValidatorLastUpdated();
039:                /* COLUMN NAME: CREATION_DATE ; ALIAS NAME: CREATION_DATE */
040:                initInsertValidatorCreationDate();
041:            }
042:
043:            /* COLUMN NAME: ORDER_ID ; ALIAS NAME: ORDER_ID */
044:            protected void initInsertValidatorOrderId() {
045:                //getRecordInsertValidator().addFieldValidator(CustomerOrderPO.ICOL_ORDER_ID, new NumberSizeFieldValidator(new BigDecimal("-"), new BigDecimal("")));
046:            }
047:
048:            /* COLUMN NAME: PARENT_ORDER_ID ; ALIAS NAME: PARENT_ORDER_ID */
049:            protected void initInsertValidatorParentOrderId() {
050:                //getRecordInsertValidator().addFieldValidator(CustomerOrderPO.ICOL_PARENT_ORDER_ID, new NumberSizeFieldValidator(new BigDecimal("-"), new BigDecimal("")));
051:            }
052:
053:            /* COLUMN NAME: CUSTOMER_ID ; ALIAS NAME: CUSTOMER_ID */
054:            protected void initInsertValidatorCustomerId() {
055:                getRecordInsertValidator().addFieldValidator(
056:                        CustomerOrderPO.ICOL_CUSTOMER_ID,
057:                        new RequiredFieldValidator());
058:                //getRecordInsertValidator().addFieldValidator(CustomerOrderPO.ICOL_CUSTOMER_ID, new NumberSizeFieldValidator(new BigDecimal("-"), new BigDecimal("")));
059:            }
060:
061:            /* COLUMN NAME: LAST_UPDATED ; ALIAS NAME: LAST_UPDATED */
062:            protected void initInsertValidatorLastUpdated() {
063:            }
064:
065:            /* COLUMN NAME: CREATION_DATE ; ALIAS NAME: CREATION_DATE */
066:            protected void initInsertValidatorCreationDate() {
067:            }
068:
069:            protected RecordValidator recordUpdateValidator = new RecordValidatorImpl(
070:                    PERSISTENT, true);
071:
072:            protected void initUpdateValidator() {
073:                /* COLUMN NAME: ORDER_ID ; ALIAS NAME: ORDER_ID */
074:                initUpdateValidatorOrderId();
075:                /* COLUMN NAME: PARENT_ORDER_ID ; ALIAS NAME: PARENT_ORDER_ID */
076:                initUpdateValidatorParentOrderId();
077:                /* COLUMN NAME: CUSTOMER_ID ; ALIAS NAME: CUSTOMER_ID */
078:                initUpdateValidatorCustomerId();
079:                /* COLUMN NAME: LAST_UPDATED ; ALIAS NAME: LAST_UPDATED */
080:                initUpdateValidatorLastUpdated();
081:                /* COLUMN NAME: CREATION_DATE ; ALIAS NAME: CREATION_DATE */
082:                initUpdateValidatorCreationDate();
083:            }
084:
085:            /* COLUMN NAME: ORDER_ID ; ALIAS NAME: ORDER_ID */
086:            protected void initUpdateValidatorOrderId() {
087:            }
088:
089:            /* COLUMN NAME: PARENT_ORDER_ID ; ALIAS NAME: PARENT_ORDER_ID */
090:            protected void initUpdateValidatorParentOrderId() {
091:            }
092:
093:            /* COLUMN NAME: CUSTOMER_ID ; ALIAS NAME: CUSTOMER_ID */
094:            protected void initUpdateValidatorCustomerId() {
095:                getRecordUpdateValidator().addFieldValidator(
096:                        CustomerOrderPO.ICOL_CUSTOMER_ID,
097:                        new NotNullFieldValidator());
098:            }
099:
100:            /* COLUMN NAME: LAST_UPDATED ; ALIAS NAME: LAST_UPDATED */
101:            protected void initUpdateValidatorLastUpdated() {
102:            }
103:
104:            /* COLUMN NAME: CREATION_DATE ; ALIAS NAME: CREATION_DATE */
105:            protected void initUpdateValidatorCreationDate() {
106:            }
107:
108:            protected RecordConvertor recordConvertor = new RecordConvertorImpl(
109:                    PERSISTENT);
110:
111:            protected void initConvertor() {
112:                /* COLUMN NAME: ORDER_ID ; ALIAS NAME: ORDER_ID */
113:                initConvertorOrderId();
114:                /* COLUMN NAME: PARENT_ORDER_ID ; ALIAS NAME: PARENT_ORDER_ID */
115:                initConvertorParentOrderId();
116:                /* COLUMN NAME: CUSTOMER_ID ; ALIAS NAME: CUSTOMER_ID */
117:                initConvertorCustomerId();
118:                /* COLUMN NAME: LAST_UPDATED ; ALIAS NAME: LAST_UPDATED */
119:                initConvertorLastUpdated();
120:                /* COLUMN NAME: CREATION_DATE ; ALIAS NAME: CREATION_DATE */
121:                initConvertorCreationDate();
122:            }
123:
124:            /* COLUMN NAME: ORDER_ID ; ALIAS NAME: ORDER_ID */
125:            protected void initConvertorOrderId() {
126:            }
127:
128:            /* COLUMN NAME: PARENT_ORDER_ID ; ALIAS NAME: PARENT_ORDER_ID */
129:            protected void initConvertorParentOrderId() {
130:            }
131:
132:            /* COLUMN NAME: CUSTOMER_ID ; ALIAS NAME: CUSTOMER_ID */
133:            protected void initConvertorCustomerId() {
134:            }
135:
136:            /* COLUMN NAME: LAST_UPDATED ; ALIAS NAME: LAST_UPDATED */
137:            protected void initConvertorLastUpdated() {
138:            }
139:
140:            /* COLUMN NAME: CREATION_DATE ; ALIAS NAME: CREATION_DATE */
141:            protected void initConvertorCreationDate() {
142:            }
143:
144:            public CustomerOrderPoCtl() {
145:                init();
146:            }
147:
148:            public CustomerOrderPoCtl(Object[] parameters) {
149:                super (parameters);
150:            }
151:
152:            protected void init() {
153:                initInsertValidator();
154:                initUpdateValidator();
155:                initConvertor();
156:            }
157:
158:            public void beforeInsert(PersistentObject persistentObject) {
159:                try {
160:                    executeInsertRule(persistentObject);
161:                } catch (RuntimeRuleException e) {
162:                    throw e;
163:                } catch (RuleException e) {
164:                    throw new RuntimeRuleException(e);
165:                } catch (Exception e) {
166:                    throw new RuntimeRuleException(e.getMessage());
167:                }
168:            }
169:
170:            public void executeInsertRule(PersistentObject persistentObject)
171:                    throws Exception {
172:                executeConvertorRule(persistentObject);
173:                executeInsertValidatorRule(persistentObject);
174:            }
175:
176:            public void beforeUpdate(PersistentObject persistentObject) {
177:                try {
178:                    executeUpdateRule(persistentObject);
179:                } catch (RuntimeRuleException e) {
180:                    throw e;
181:                } catch (RuleException e) {
182:                    throw new RuntimeRuleException(e);
183:                } catch (Exception e) {
184:                    throw new RuntimeRuleException(e.getMessage());
185:                }
186:            }
187:
188:            public void executeUpdateRule(PersistentObject persistentObject)
189:                    throws Exception {
190:                executeConvertorRule(persistentObject);
191:                executeUpdateValidatorRule(persistentObject);
192:            }
193:
194:            protected void executeConvertorRule(
195:                    PersistentObject persistentObject) throws Exception {
196:                getRecordConvertor().executeRule(persistentObject);
197:            }
198:
199:            protected void executeInsertValidatorRule(
200:                    PersistentObject persistentObject) throws Exception {
201:                getRecordInsertValidator().executeRule(persistentObject);
202:            }
203:
204:            protected void executeUpdateValidatorRule(
205:                    PersistentObject persistentObject) throws Exception {
206:                getRecordUpdateValidator().executeRule(persistentObject);
207:            }
208:
209:            public FieldValidator getFieldValidator() {
210:                return recordInsertValidator;
211:            }
212:
213:            public FieldConvertor getFieldConvertor() {
214:                return recordConvertor;
215:            }
216:
217:            public PersistentObject getPersistentObject() {
218:                return PERSISTENT;
219:            }
220:
221:            protected RecordValidator getRecordInsertValidator() {
222:                return recordInsertValidator;
223:            }
224:
225:            protected RecordValidator getRecordUpdateValidator() {
226:                return recordUpdateValidator;
227:            }
228:
229:            protected RecordConvertor getRecordConvertor() {
230:                return recordConvertor;
231:            }
232:
233:            public Object clone() throws CloneNotSupportedException {
234:                CustomerOrderPoCtl ctl = (CustomerOrderPoCtl) super .clone();
235:                ctl.recordConvertor = (RecordConvertor) getRecordConvertor()
236:                        .clone();
237:                ctl.recordInsertValidator = (RecordValidator) getRecordInsertValidator()
238:                        .clone();
239:                ctl.recordUpdateValidator = (RecordValidator) getRecordUpdateValidator()
240:                        .clone();
241:                return ctl;
242:            }
243:        }
w__w___w___.___j__a___v__a__2s___.___c_o___m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.