Source Code Cross Referenced for OrderItemPoCtl.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 OrderItemPoCtl extends AbstractLifeCycleController
014:                implements  PersistentRule {
015:
016:            public static final PersistentObject PERSISTENT = new OrderItemPO();
017:
018:            protected RecordValidator recordInsertValidator = new RecordValidatorImpl(
019:                    PERSISTENT, true);
020:
021:            public OrderItemPoCtl(String cacheName) {
022:                super (cacheName);
023:            }
024:
025:            public OrderItemPoCtl(
026:                    com.completex.objective.components.ocache.OdalCache cache) {
027:                super (cache);
028:            }
029:
030:            protected void initInsertValidator() {
031:                /* COLUMN NAME: ORDER_ITEM_ID ; ALIAS NAME: ORDER_ITEM_ID */
032:                initInsertValidatorOrderItemId();
033:                /* COLUMN NAME: ORDER_ID ; ALIAS NAME: ORDER_ID */
034:                initInsertValidatorOrderId();
035:                /* COLUMN NAME: PRODUCT_ID ; ALIAS NAME: PRODUCT_ID */
036:                initInsertValidatorProductId();
037:                /* COLUMN NAME: QUANTITY ; ALIAS NAME: QUANTITY */
038:                initInsertValidatorQuantity();
039:                /* COLUMN NAME: STATE ; ALIAS NAME: STATE */
040:                initInsertValidatorState();
041:                /* COLUMN NAME: LAST_UPDATED ; ALIAS NAME: LAST_UPDATED */
042:                initInsertValidatorLastUpdated();
043:                /* COLUMN NAME: CREATION_DATE ; ALIAS NAME: CREATION_DATE */
044:                initInsertValidatorCreationDate();
045:            }
046:
047:            /* COLUMN NAME: ORDER_ITEM_ID ; ALIAS NAME: ORDER_ITEM_ID */
048:            protected void initInsertValidatorOrderItemId() {
049:                //getRecordInsertValidator().addFieldValidator(OrderItemPO.ICOL_ORDER_ITEM_ID, new NumberSizeFieldValidator(new BigDecimal("-"), new BigDecimal("")));
050:            }
051:
052:            /* COLUMN NAME: ORDER_ID ; ALIAS NAME: ORDER_ID */
053:            protected void initInsertValidatorOrderId() {
054:                getRecordInsertValidator()
055:                        .addFieldValidator(OrderItemPO.ICOL_ORDER_ID,
056:                                new RequiredFieldValidator());
057:                //getRecordInsertValidator().addFieldValidator(OrderItemPO.ICOL_ORDER_ID, new NumberSizeFieldValidator(new BigDecimal("-"), new BigDecimal("")));
058:            }
059:
060:            /* COLUMN NAME: PRODUCT_ID ; ALIAS NAME: PRODUCT_ID */
061:            protected void initInsertValidatorProductId() {
062:                //getRecordInsertValidator().addFieldValidator(OrderItemPO.ICOL_PRODUCT_ID, new NumberSizeFieldValidator(new BigDecimal("-"), new BigDecimal("")));
063:            }
064:
065:            /* COLUMN NAME: QUANTITY ; ALIAS NAME: QUANTITY */
066:            protected void initInsertValidatorQuantity() {
067:                //getRecordInsertValidator().addFieldValidator(OrderItemPO.ICOL_QUANTITY, new NumberSizeFieldValidator(new BigDecimal("-"), new BigDecimal("")));
068:            }
069:
070:            /* COLUMN NAME: STATE ; ALIAS NAME: STATE */
071:            protected void initInsertValidatorState() {
072:                getRecordInsertValidator().addFieldValidator(
073:                        OrderItemPO.ICOL_STATE, new RequiredFieldValidator());
074:                getRecordInsertValidator().addFieldValidator(
075:                        OrderItemPO.ICOL_STATE,
076:                        new StringSizeFieldValidator(0, 40));
077:            }
078:
079:            /* COLUMN NAME: LAST_UPDATED ; ALIAS NAME: LAST_UPDATED */
080:            protected void initInsertValidatorLastUpdated() {
081:            }
082:
083:            /* COLUMN NAME: CREATION_DATE ; ALIAS NAME: CREATION_DATE */
084:            protected void initInsertValidatorCreationDate() {
085:            }
086:
087:            protected RecordValidator recordUpdateValidator = new RecordValidatorImpl(
088:                    PERSISTENT, true);
089:
090:            protected void initUpdateValidator() {
091:                /* COLUMN NAME: ORDER_ITEM_ID ; ALIAS NAME: ORDER_ITEM_ID */
092:                initUpdateValidatorOrderItemId();
093:                /* COLUMN NAME: ORDER_ID ; ALIAS NAME: ORDER_ID */
094:                initUpdateValidatorOrderId();
095:                /* COLUMN NAME: PRODUCT_ID ; ALIAS NAME: PRODUCT_ID */
096:                initUpdateValidatorProductId();
097:                /* COLUMN NAME: QUANTITY ; ALIAS NAME: QUANTITY */
098:                initUpdateValidatorQuantity();
099:                /* COLUMN NAME: STATE ; ALIAS NAME: STATE */
100:                initUpdateValidatorState();
101:                /* COLUMN NAME: LAST_UPDATED ; ALIAS NAME: LAST_UPDATED */
102:                initUpdateValidatorLastUpdated();
103:                /* COLUMN NAME: CREATION_DATE ; ALIAS NAME: CREATION_DATE */
104:                initUpdateValidatorCreationDate();
105:            }
106:
107:            /* COLUMN NAME: ORDER_ITEM_ID ; ALIAS NAME: ORDER_ITEM_ID */
108:            protected void initUpdateValidatorOrderItemId() {
109:            }
110:
111:            /* COLUMN NAME: ORDER_ID ; ALIAS NAME: ORDER_ID */
112:            protected void initUpdateValidatorOrderId() {
113:                getRecordUpdateValidator().addFieldValidator(
114:                        OrderItemPO.ICOL_ORDER_ID, new NotNullFieldValidator());
115:            }
116:
117:            /* COLUMN NAME: PRODUCT_ID ; ALIAS NAME: PRODUCT_ID */
118:            protected void initUpdateValidatorProductId() {
119:            }
120:
121:            /* COLUMN NAME: QUANTITY ; ALIAS NAME: QUANTITY */
122:            protected void initUpdateValidatorQuantity() {
123:            }
124:
125:            /* COLUMN NAME: STATE ; ALIAS NAME: STATE */
126:            protected void initUpdateValidatorState() {
127:                getRecordUpdateValidator().addFieldValidator(
128:                        OrderItemPO.ICOL_STATE, new NotNullFieldValidator());
129:            }
130:
131:            /* COLUMN NAME: LAST_UPDATED ; ALIAS NAME: LAST_UPDATED */
132:            protected void initUpdateValidatorLastUpdated() {
133:            }
134:
135:            /* COLUMN NAME: CREATION_DATE ; ALIAS NAME: CREATION_DATE */
136:            protected void initUpdateValidatorCreationDate() {
137:            }
138:
139:            protected RecordConvertor recordConvertor = new RecordConvertorImpl(
140:                    PERSISTENT);
141:
142:            protected void initConvertor() {
143:                /* COLUMN NAME: ORDER_ITEM_ID ; ALIAS NAME: ORDER_ITEM_ID */
144:                initConvertorOrderItemId();
145:                /* COLUMN NAME: ORDER_ID ; ALIAS NAME: ORDER_ID */
146:                initConvertorOrderId();
147:                /* COLUMN NAME: PRODUCT_ID ; ALIAS NAME: PRODUCT_ID */
148:                initConvertorProductId();
149:                /* COLUMN NAME: QUANTITY ; ALIAS NAME: QUANTITY */
150:                initConvertorQuantity();
151:                /* COLUMN NAME: STATE ; ALIAS NAME: STATE */
152:                initConvertorState();
153:                /* COLUMN NAME: LAST_UPDATED ; ALIAS NAME: LAST_UPDATED */
154:                initConvertorLastUpdated();
155:                /* COLUMN NAME: CREATION_DATE ; ALIAS NAME: CREATION_DATE */
156:                initConvertorCreationDate();
157:            }
158:
159:            /* COLUMN NAME: ORDER_ITEM_ID ; ALIAS NAME: ORDER_ITEM_ID */
160:            protected void initConvertorOrderItemId() {
161:            }
162:
163:            /* COLUMN NAME: ORDER_ID ; ALIAS NAME: ORDER_ID */
164:            protected void initConvertorOrderId() {
165:            }
166:
167:            /* COLUMN NAME: PRODUCT_ID ; ALIAS NAME: PRODUCT_ID */
168:            protected void initConvertorProductId() {
169:            }
170:
171:            /* COLUMN NAME: QUANTITY ; ALIAS NAME: QUANTITY */
172:            protected void initConvertorQuantity() {
173:            }
174:
175:            /* COLUMN NAME: STATE ; ALIAS NAME: STATE */
176:            protected void initConvertorState() {
177:                // getRecordConvertor().addFieldConvertor(OrderItemPO.ICOL_STATE, new TrimWhiteSpaceFieldConvertor());
178:                // getRecordConvertor().addFieldConvertor(OrderItemPO.ICOL_STATE, new UpperCaseFieldConvertor());
179:            }
180:
181:            /* COLUMN NAME: LAST_UPDATED ; ALIAS NAME: LAST_UPDATED */
182:            protected void initConvertorLastUpdated() {
183:            }
184:
185:            /* COLUMN NAME: CREATION_DATE ; ALIAS NAME: CREATION_DATE */
186:            protected void initConvertorCreationDate() {
187:            }
188:
189:            public OrderItemPoCtl() {
190:                init();
191:            }
192:
193:            public OrderItemPoCtl(Object[] parameters) {
194:                super (parameters);
195:            }
196:
197:            protected void init() {
198:                initInsertValidator();
199:                initUpdateValidator();
200:                initConvertor();
201:            }
202:
203:            public void beforeInsert(PersistentObject persistentObject) {
204:                try {
205:                    executeInsertRule(persistentObject);
206:                } catch (RuntimeRuleException e) {
207:                    throw e;
208:                } catch (RuleException e) {
209:                    throw new RuntimeRuleException(e);
210:                } catch (Exception e) {
211:                    throw new RuntimeRuleException(e.getMessage());
212:                }
213:            }
214:
215:            public void executeInsertRule(PersistentObject persistentObject)
216:                    throws Exception {
217:                executeConvertorRule(persistentObject);
218:                executeInsertValidatorRule(persistentObject);
219:            }
220:
221:            public void beforeUpdate(PersistentObject persistentObject) {
222:                try {
223:                    executeUpdateRule(persistentObject);
224:                } catch (RuntimeRuleException e) {
225:                    throw e;
226:                } catch (RuleException e) {
227:                    throw new RuntimeRuleException(e);
228:                } catch (Exception e) {
229:                    throw new RuntimeRuleException(e.getMessage());
230:                }
231:            }
232:
233:            public void executeUpdateRule(PersistentObject persistentObject)
234:                    throws Exception {
235:                executeConvertorRule(persistentObject);
236:                executeUpdateValidatorRule(persistentObject);
237:            }
238:
239:            protected void executeConvertorRule(
240:                    PersistentObject persistentObject) throws Exception {
241:                getRecordConvertor().executeRule(persistentObject);
242:            }
243:
244:            protected void executeInsertValidatorRule(
245:                    PersistentObject persistentObject) throws Exception {
246:                getRecordInsertValidator().executeRule(persistentObject);
247:            }
248:
249:            protected void executeUpdateValidatorRule(
250:                    PersistentObject persistentObject) throws Exception {
251:                getRecordUpdateValidator().executeRule(persistentObject);
252:            }
253:
254:            public FieldValidator getFieldValidator() {
255:                return recordInsertValidator;
256:            }
257:
258:            public FieldConvertor getFieldConvertor() {
259:                return recordConvertor;
260:            }
261:
262:            public PersistentObject getPersistentObject() {
263:                return PERSISTENT;
264:            }
265:
266:            protected RecordValidator getRecordInsertValidator() {
267:                return recordInsertValidator;
268:            }
269:
270:            protected RecordValidator getRecordUpdateValidator() {
271:                return recordUpdateValidator;
272:            }
273:
274:            protected RecordConvertor getRecordConvertor() {
275:                return recordConvertor;
276:            }
277:
278:            public Object clone() throws CloneNotSupportedException {
279:                OrderItemPoCtl ctl = (OrderItemPoCtl) super .clone();
280:                ctl.recordConvertor = (RecordConvertor) getRecordConvertor()
281:                        .clone();
282:                ctl.recordInsertValidator = (RecordValidator) getRecordInsertValidator()
283:                        .clone();
284:                ctl.recordUpdateValidator = (RecordValidator) getRecordUpdateValidator()
285:                        .clone();
286:                return ctl;
287:            }
288:        }
ww___w__.ja___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.