Source Code Cross Referenced for SystemDatabase.java in  » Workflow-Engines » JFolder » org » jfolder » platforms » stores » base » 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 » Workflow Engines » JFolder » org.jfolder.platforms.stores.base 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * JFolder, Copyright 2001-2006 Gary Steinmetz
003:         *
004:         * Distributable under LGPL license.
005:         * See terms of license at gnu.org.
006:         */
007:
008:        package org.jfolder.platforms.stores.base;
009:
010:        //base classes
011:        import java.sql.Connection;
012:        import java.util.ArrayList;
013:
014:        //project specific classes
015:        import org.jfolder.common.UnexpectedSystemException;
016:        import org.jfolder.common.utils.misc.MiscHelper;
017:        import org.jfolder.platforms.stores.base.SystemStatement;
018:
019:        //other classes
020:
021:        public class SystemDatabase {
022:
023:            public final static int MAXIMUM_SHORT_STRING_LENGTH = 200;
024:
025:            private SystemDatabase() {
026:            }
027:
028:            public final static SystemDatabase newInstance() {
029:                return new SystemDatabase();
030:            }
031:
032:            public ArrayList getAllEntities() {
033:
034:                ArrayList outValue = new ArrayList();
035:
036:                //
037:                outValue.add(createSystemTable());
038:                outValue.add(createUserTable());
039:                outValue.add(createUserStudioTable());
040:                outValue.add(createAuditTable());
041:                outValue.add(createAuditAnnotationTable());
042:                //
043:                //outValue.add(createDocsReadOnlyTable());
044:                //outValue.add(createDocsTable());
045:                //outValue.add(createDocAnnotationsTable());
046:                //
047:                outValue.add(createPropReadOnlyTable());
048:                outValue.add(createPropTable());
049:                outValue.add(createPropDocTable());
050:                outValue.add(createPropInstanceTable());
051:                //
052:                outValue.add(createDocSysReadOnlyTable());
053:                outValue.add(createDocSysTable());
054:                outValue.add(createDocSysDirTable());
055:                outValue.add(createDocSysFileTable());
056:                outValue.add(createDocAnnotationTable());
057:                //
058:                outValue.add(createProjectSysReadOnlyTable());
059:                outValue.add(createProjectSysTable());
060:                //
061:                outValue.add(createWiReadOnlyTable());
062:                outValue.add(createWdocMapTable());
063:                outValue.add(createWtriggerTable());
064:                outValue.add(createWiAttrTable());
065:                outValue.add(createWiAttrSetTable());
066:                outValue.add(createWiTable());
067:
068:                return outValue;
069:            }
070:
071:            public void createAllEntities(Connection inConn, SystemStore inWs) {
072:
073:                //try {
074:                ArrayList al = getAllEntities();
075:                for (int i = 0; i < al.size(); i++) {
076:                    Object o = al.get(i);
077:                    CreateStatement wcs = (CreateStatement) o;
078:                    inWs.execute(wcs, inConn);
079:                }
080:                //
081:                //WorkflowCreateStatement systemTable = createSystemTable();
082:                //}
083:                //catch (SQLException sqle) {
084:                //    throw new UnexpectedSystemException(sqle);
085:                //}
086:            }
087:
088:            public void dropAllEntities(Connection inConn, SystemStore inWs) {
089:
090:                //
091:                ArrayList al = getAllEntities();
092:                for (int i = 0; i < al.size(); i++) {
093:                    Object o = al.get((al.size() - 1) - i);
094:                    CreateStatement wcs = (CreateStatement) o;
095:                    DropStatement wds = SystemStatement.newDropStatement(wcs);
096:                    //wds.setEntity(wcs);
097:                    try {
098:                        inWs.execute(wds, inConn);
099:                    } catch (UnexpectedSystemException use) {
100:                        MiscHelper.println(use.getMessage());
101:                        use.printStackTrace();
102:                    }
103:                }
104:            }
105:
106:            //
107:            public final static String T_SYSTEM = "SYSTEM";
108:            public final static String C_VERSION_T_SYSTEM = "APP_VER";
109:            public final static String C_DATABASE_T_SYSTEM = "APP_DB";
110:            public final static String C_APP_SERVER_T_SYSTEM = "APP_SERVER";
111:            public final static String C_CONFIG_T_SYSTEM = "APP_CONFIG";
112:            public final static String C_SESSION_LOCATION_T_SYSTEM = "SESSION_LOCATION";
113:            public final static String C_WRONG_DEPLOYS_T_SYSTEM = "WRONG_DEPLOYS";
114:            public final static String C_ADMIN_CONTEXT_PATH_T_SYSTEM = "ADMIN_CONTEXT_PATH";
115:            public final static String C_MACH_OF_ORIG_T_SYSTEM = "MACH_OF_ORIG";
116:            public final static String C_PERM_DIR_T_SYSTEM = "PERM_DIR";
117:            public final static String C_ORIG_TIME_T_SYSTEM = "ORIG_TIME";
118:            public final static String C_CONFIG_RESET_T_SYSTEM = "CONFIG_RESET";
119:
120:            public CreateStatement createSystemTable() {
121:
122:                CreateStatement outValue = null;
123:
124:                //
125:                outValue = SystemStatement.newCreateStatement(T_SYSTEM);
126:                //
127:                outValue.addIdColumn();
128:                outValue.addSStringColumn(C_VERSION_T_SYSTEM, false, null);
129:                outValue.addSStringColumn(C_DATABASE_T_SYSTEM, false, null);
130:                outValue.addSStringColumn(C_APP_SERVER_T_SYSTEM, false, null);
131:                outValue.addSStringColumn(C_SESSION_LOCATION_T_SYSTEM, false,
132:                        null);
133:                outValue
134:                        .addSStringColumn(C_WRONG_DEPLOYS_T_SYSTEM, false, null);
135:                outValue.addSStringColumn(C_ADMIN_CONTEXT_PATH_T_SYSTEM, false,
136:                        null);
137:                outValue.addLStringColumn(C_CONFIG_T_SYSTEM, null);
138:                outValue.addSStringColumn(C_MACH_OF_ORIG_T_SYSTEM, false, null);
139:                outValue.addSStringColumn(C_PERM_DIR_T_SYSTEM, false, null);
140:                outValue.addDecimalColumn(C_ORIG_TIME_T_SYSTEM, false, null);
141:                outValue.addBooleanColumn(C_CONFIG_RESET_T_SYSTEM, false, null);
142:
143:                return outValue;
144:            }
145:
146:            //
147:            public final static String T_USER = "USER";
148:            public final static String C_NAME_T_USER = "NAME";
149:            public final static String C_TYPE_T_USER = "TYPE";
150:
151:            public CreateStatement createUserTable() {
152:
153:                CreateStatement outValue = null;
154:
155:                //
156:                outValue = SystemStatement.newCreateStatement(T_USER);
157:                //
158:                outValue.addIdColumn();
159:                outValue.addSStringColumn(C_NAME_T_USER, false, null);
160:                outValue.addSStringColumn(C_TYPE_T_USER, false, null);
161:
162:                return outValue;
163:            }
164:
165:            //
166:            public final static String T_USER_STUDIO = "USER_STUDIO";
167:            public final static String C_USER_ID_T_USER_STUDIO = "USER_ID";
168:            public final static String C_TYPE_T_USER_STUDIO = "TYPE";
169:            public final static String C_CONFIG_T_USER_STUDIO = "CONFIG";
170:
171:            public CreateStatement createUserStudioTable() {
172:
173:                CreateStatement outValue = null;
174:
175:                //
176:                outValue = SystemStatement.newCreateStatement(T_USER_STUDIO);
177:                //
178:                outValue.addIdColumn();
179:                outValue.addDecimalColumn(C_USER_ID_T_USER_STUDIO, false,
180:                        T_USER);
181:                outValue.addSStringColumn(C_TYPE_T_USER_STUDIO, false, null);
182:                outValue.addLStringColumn(C_CONFIG_T_USER_STUDIO, null);
183:
184:                return outValue;
185:            }
186:
187:            //
188:            public final static String T_PROJECT_SYS_RO = "PROJECT_SYS_RO";
189:            public final static String C_GROUP_NAME_T_PROJECT_SYS_RO = "GROUP_NAME";
190:            public final static String C_USER_ID_T_PROJECT_SYS_RO = "USER_ID";
191:            public final static String C_PROD_LIVE_T_PROJECT_SYS_RO = "PROD_LIVE";
192:            public final static String C_PROP_RO_ID_T_PROJECT_SYS_RO = "PROP_RO_ID";
193:            public final static String C_DOC_SYS_RO_ID_T_PROJECT_SYS_RO = "DOC_SYS_RO_ID";
194:
195:            public CreateStatement createProjectSysReadOnlyTable() {
196:
197:                CreateStatement outValue = null;
198:
199:                //
200:                outValue = SystemStatement.newCreateStatement(T_PROJECT_SYS_RO);
201:                //
202:                outValue.addIdColumn();
203:                outValue.addSStringColumn(C_GROUP_NAME_T_PROJECT_SYS_RO, false,
204:                        null);
205:                outValue.addDecimalColumn(C_USER_ID_T_PROJECT_SYS_RO, true,
206:                        T_USER);
207:                outValue.addBooleanColumn(C_PROD_LIVE_T_PROJECT_SYS_RO, false,
208:                        null);
209:                outValue.addDecimalColumn(C_PROP_RO_ID_T_PROJECT_SYS_RO, false,
210:                        T_PROP_RO);
211:                outValue.addDecimalColumn(C_DOC_SYS_RO_ID_T_PROJECT_SYS_RO,
212:                        false, T_DOC_SYS_RO);
213:
214:                return outValue;
215:            }
216:
217:            //
218:            public final static String T_PROJECT_SYS = "PROJECT_SYS";
219:            public final static String C_PROJECT_SYS_RO_ID_T_PROJECT_SYS = "PROJECT_SYS_RO_ID";
220:            public final static String C_VERSION_T_PROJECT_SYS = "VERSION";
221:            public final static String C_AUDIT_ID_T_PROJECT_SYS = "AUDIT_ID";
222:            public final static String C_ACTIVE_T_PROJECT_SYS = "ACTIVE";
223:            public final static String C_ACTUAL_NAME_T_PROJECT_SYS = "ACTUAL_NAME";
224:            public final static String C_DEPLOY_VISIBLE_T_PROJECT_SYS = "DEPLOY_VISIBLE";
225:
226:            public CreateStatement createProjectSysTable() {
227:
228:                CreateStatement outValue = null;
229:
230:                //
231:                outValue = SystemStatement.newCreateStatement(T_PROJECT_SYS);
232:                //
233:                outValue.addIdColumn();
234:                outValue.addDecimalColumn(C_PROJECT_SYS_RO_ID_T_PROJECT_SYS,
235:                        false, T_PROJECT_SYS_RO);
236:                outValue.addDecimalColumn(C_VERSION_T_PROJECT_SYS, false, null);
237:                outValue.addDecimalColumn(C_AUDIT_ID_T_PROJECT_SYS, false,
238:                        T_AUDIT);
239:                outValue.addBooleanColumn(C_ACTIVE_T_PROJECT_SYS, false, null);
240:                outValue.addSStringColumn(C_ACTUAL_NAME_T_PROJECT_SYS, false,
241:                        null);
242:                outValue.addBooleanColumn(C_DEPLOY_VISIBLE_T_PROJECT_SYS,
243:                        false, null);
244:
245:                return outValue;
246:            }
247:
248:            //
249:            //public String getAuditMachineOfOrigin();
250:            //public String getAuditDateTime();
251:            //public String getAuditSeverityLevel();
252:            //public String getAuditCategoryType();
253:            //public String getAuditSourceType();
254:            //public String getAuditServerVersion();
255:            //
256:            //public BigDecimal getAuditCustomCode();
257:            //public String getAuditCustomCategoryType();
258:            //public String getAuditCustomSourceType();
259:            //public String getAuditCustomMessage();
260:            //
261:            //
262:            //public final static String C_USER_ID_T_AUDIT = "USER_ID";
263:            //public final static String C_CODE_T_AUDIT = "CODE";
264:            //public final static String C_STATUS_T_AUDIT = "STATUS";
265:            //public final static String C_COMMENT_T_AUDIT = "COMMENT";
266:            //public final static String C_TIMESTAMP_T_AUDIT = "TIMESTAMP";
267:            //public final static String C_FAULT_PRESENT_T_AUDIT = "FAULT_PRESENT";
268:            //public final static String C_FAULT_MESSAGE_T_AUDIT = "FAULT_MESSAGE";
269:            //public final static String C_FAULT_SOURCE_T_AUDIT = "FAULT_SOURCE";
270:            //
271:            //
272:            public final static String T_AUDIT = "AUDIT";
273:            //
274:            //
275:            public final static String C_USER_ID_T_AUDIT = "USER_ID";
276:            public final static String C_SEQ_NUMBER_T_AUDIT = "SEQ_NUMBER";
277:            public final static String C_MACHINE_OF_ORIG_T_AUDIT = "MACHINE_OF_ORIG";
278:            public final static String C_DATE_TIME_T_AUDIT = "DATE_TIME";
279:            public final static String C_SEVERITY_LEVEL_T_AUDIT = "SEVERITY_LEVEL";
280:            public final static String C_CATEGORY_TYPE_T_AUDIT = "CATEGORY_TYPE";
281:            public final static String C_SOURCE_TYPE_T_AUDIT = "SOURCE_TYPE";
282:            public final static String C_SERVER_VERSION_T_AUDIT = "SERVER_VERSION";
283:            //
284:            public final static String C_CUSTOM_CODE_T_AUDIT = "CUSTOM_CODE";
285:            public final static String C_CUSTOM_CAT_TYPE_T_AUDIT = "CUSTOM_CAT_TYPE";
286:            public final static String C_CUSTOM_SRC_TYPE_T_AUDIT = "CUSTOM_SRC_TYPE";
287:            public final static String C_CUSTOM_MESSAGE_T_AUDIT = "CUSTOM_MESSAGE";
288:            //
289:            public final static String C_OPENED_T_AUDIT = "OPENED";
290:
291:            public CreateStatement createAuditTable() {
292:
293:                CreateStatement outValue = null;
294:
295:                //
296:                outValue = SystemStatement.newCreateStatement(T_AUDIT);
297:                //
298:                outValue.addIdColumn();
299:                outValue.addDecimalColumn(C_USER_ID_T_AUDIT, true, T_USER);
300:                outValue.addDecimalColumn(C_SEQ_NUMBER_T_AUDIT, false, null);
301:                outValue.addSStringColumn(C_MACHINE_OF_ORIG_T_AUDIT, false,
302:                        null);
303:                outValue.addDecimalColumn(C_DATE_TIME_T_AUDIT, false, null);
304:                outValue
305:                        .addDecimalColumn(C_SEVERITY_LEVEL_T_AUDIT, false, null);
306:                outValue.addSStringColumn(C_CATEGORY_TYPE_T_AUDIT, false, null);
307:                outValue.addSStringColumn(C_SOURCE_TYPE_T_AUDIT, false, null);
308:                outValue
309:                        .addSStringColumn(C_SERVER_VERSION_T_AUDIT, false, null);
310:                //
311:                outValue.addDecimalColumn(C_CUSTOM_CODE_T_AUDIT, false, null);
312:                outValue.addSStringColumn(C_CUSTOM_CAT_TYPE_T_AUDIT, false,
313:                        null);
314:                outValue.addSStringColumn(C_CUSTOM_SRC_TYPE_T_AUDIT, false,
315:                        null);
316:                outValue.addLStringColumn(C_CUSTOM_MESSAGE_T_AUDIT, null);
317:                //
318:                outValue.addBooleanColumn(C_OPENED_T_AUDIT, false, null);
319:
320:                return outValue;
321:            }
322:
323:            //
324:            public final static String T_AUDIT_ANNOTATION = "AUDIT_ANNOTATION";
325:            //
326:            //
327:            public final static String C_AUDIT_ID_T_AUDIT_ANNOTATION = "AUDIT_ID";
328:            public final static String C_USER_ID_T_AUDIT_ANNOTATION = "USER_ID";
329:            public final static String C_DATE_TIME_T_AUDIT_ANNOTATION = "DATE_TIME";
330:            public final static String C_OPENED_T_AUDIT_ANNOTATION = "OPENED";
331:            public final static String C_AUDIT_NOTE_T_AUDIT_ANNOTATION = "AUDIT_NOTE";
332:
333:            public CreateStatement createAuditAnnotationTable() {
334:
335:                CreateStatement outValue = null;
336:
337:                //
338:                outValue = SystemStatement
339:                        .newCreateStatement(T_AUDIT_ANNOTATION);
340:                //
341:                outValue.addIdColumn();
342:                outValue.addDecimalColumn(C_AUDIT_ID_T_AUDIT_ANNOTATION, false,
343:                        T_AUDIT);
344:                outValue.addDecimalColumn(C_USER_ID_T_AUDIT_ANNOTATION, false,
345:                        T_USER);
346:                outValue.addDecimalColumn(C_DATE_TIME_T_AUDIT, false, null);
347:                //
348:                outValue.addBooleanColumn(C_OPENED_T_AUDIT_ANNOTATION, true,
349:                        null);
350:                outValue
351:                        .addLStringColumn(C_AUDIT_NOTE_T_AUDIT_ANNOTATION, null);
352:
353:                return outValue;
354:            }
355:
356:            //
357:            public final static String T_WI_RO = "WI_RO";
358:
359:            public CreateStatement createWiReadOnlyTable() {
360:
361:                CreateStatement outValue = null;
362:
363:                //
364:                outValue = SystemStatement.newCreateStatement(T_WI_RO);
365:                //
366:                outValue.addIdColumn();
367:
368:                return outValue;
369:            }
370:
371:            //
372:            public final static String T_PROP_RO = "PROP_RO";
373:            public final static String C_TYPE_T_PROP_RO = "TYPE";
374:
375:            public CreateStatement createPropReadOnlyTable() {
376:
377:                CreateStatement outValue = null;
378:
379:                //
380:                outValue = SystemStatement.newCreateStatement(T_PROP_RO);
381:                //
382:                outValue.addIdColumn();
383:                outValue.addDecimalColumn(C_TYPE_T_PROP_RO, false, null);
384:
385:                return outValue;
386:            }
387:
388:            //
389:            public final static String T_PROP = "PROP";
390:            public final static String C_PROP_RO_ID_T_PROP = "PROP_RO_ID";
391:            public final static String C_VERSION_T_PROP = "VERSION";
392:            public final static String C_SHORT_DOC_T_PROP = "SHORT_DOC";
393:
394:            //public final static String C_DOC_T_PROP = "DOC";
395:
396:            public CreateStatement createPropTable() {
397:
398:                CreateStatement outValue = null;
399:
400:                //
401:                outValue = SystemStatement.newCreateStatement(T_PROP);
402:                //
403:                outValue.addIdColumn();
404:                outValue
405:                        .addDecimalColumn(C_PROP_RO_ID_T_PROP, false, T_PROP_RO);
406:                outValue.addDecimalColumn(C_VERSION_T_PROP, false, null);
407:                outValue.addBooleanColumn(C_SHORT_DOC_T_PROP, false, null);
408:                //outValue.addLStringColumn(C_DOC_T_PROP, null);
409:                //
410:                ArrayList uniqueColumns = new ArrayList();
411:                uniqueColumns.add(C_PROP_RO_ID_T_PROP);
412:                uniqueColumns.add(C_VERSION_T_PROP);
413:                outValue.assignUnique(uniqueColumns);
414:
415:                return outValue;
416:            }
417:
418:            //
419:            public final static String T_PROP_DOC = "PROP_DOC";
420:            public final static String C_PROP_ID_T_PROP_DOC = "PROP_ID";
421:            public final static String C_SHORT_DOC_T_PROP_DOC = "SHORT_DOC";
422:            public final static String C_LONG_DOC_T_PROP_DOC = "LONG_DOC";
423:
424:            public CreateStatement createPropDocTable() {
425:
426:                CreateStatement outValue = null;
427:
428:                //
429:                outValue = SystemStatement.newCreateStatement(T_PROP_DOC);
430:                //
431:                outValue.addIdColumn();
432:                outValue.addDecimalColumn(C_PROP_ID_T_PROP_DOC, false, T_PROP);
433:                outValue.addSStringColumn(C_SHORT_DOC_T_PROP_DOC, true, null);
434:                outValue.addLStringColumn(C_LONG_DOC_T_PROP_DOC, null);
435:
436:                return outValue;
437:            }
438:
439:            //
440:            public final static String T_PROP_INSTANCE = "PROP_INSTANCE";
441:            public final static String C_PROP_ID_T_PROP_INSTANCE = "PROP_ID";
442:            public final static String C_ACTIVE_T_PROP_INSTANCE = "ACTIVE";
443:            public final static String C_GROUP_NAME_T_GROUP_INSTANCE = "GROUP_NAME";
444:            public final static String C_ACTUAL_NAME_T_GROUP_INSTANCE = "ACTUAL_NAME";
445:            public final static String C_VALUE_T_GROUP_INSTANCE = "VALUE";
446:
447:            public CreateStatement createPropInstanceTable() {
448:
449:                CreateStatement outValue = null;
450:
451:                //
452:                outValue = SystemStatement.newCreateStatement(T_PROP_INSTANCE);
453:                //
454:                outValue.addIdColumn();
455:                outValue.addDecimalColumn(C_PROP_ID_T_PROP_INSTANCE, false,
456:                        T_PROP);
457:                outValue
458:                        .addBooleanColumn(C_ACTIVE_T_PROP_INSTANCE, false, null);
459:                outValue.addSStringColumn(C_GROUP_NAME_T_GROUP_INSTANCE, false,
460:                        null);
461:                outValue.addSStringColumn(C_ACTUAL_NAME_T_GROUP_INSTANCE,
462:                        false, null);
463:                outValue
464:                        .addSStringColumn(C_VALUE_T_GROUP_INSTANCE, false, null);
465:                //
466:                ArrayList uniqueColumns = new ArrayList();
467:                uniqueColumns.add(C_PROP_ID_T_PROP_INSTANCE);
468:                uniqueColumns.add(C_GROUP_NAME_T_GROUP_INSTANCE);
469:                outValue.assignUnique(uniqueColumns);
470:
471:                return outValue;
472:            }
473:
474:            //
475:            public final static String T_DOC_SYS_RO = "DOC_SYS_RO";
476:            public final static String C_SECTION_T_DOC_SYS_RO = "SECTION";
477:            public final static String C_SUB_SECTION_T_DOC_SYS_RO = "SUB_SECTION";
478:
479:            public CreateStatement createDocSysReadOnlyTable() {
480:
481:                CreateStatement outValue = null;
482:
483:                //
484:                outValue = SystemStatement.newCreateStatement(T_DOC_SYS_RO);
485:                //
486:                outValue.addIdColumn();
487:                outValue.addSStringColumn(C_SECTION_T_DOC_SYS_RO, false, null);
488:                outValue.addSStringColumn(C_SUB_SECTION_T_DOC_SYS_RO, false,
489:                        null);
490:                //
491:                ArrayList uniqueColumns = new ArrayList();
492:                uniqueColumns.add(C_SECTION_T_DOC_SYS_RO);
493:                uniqueColumns.add(C_SUB_SECTION_T_DOC_SYS_RO);
494:                outValue.assignUnique(uniqueColumns);
495:
496:                return outValue;
497:            }
498:
499:            //
500:            public final static String T_DOC_SYS = "DOC_SYS";
501:            public final static String C_DOC_SYS_RO_ID_T_DOC_SYS = "DOC_SYS_RO_ID";
502:            public final static String C_VERSION_T_DOC_SYS = "VERSION";
503:
504:            public CreateStatement createDocSysTable() {
505:
506:                CreateStatement outValue = null;
507:
508:                //
509:                outValue = SystemStatement.newCreateStatement(T_DOC_SYS);
510:                //
511:                outValue.addIdColumn();
512:                outValue.addDecimalColumn(C_DOC_SYS_RO_ID_T_DOC_SYS, false,
513:                        T_DOC_SYS_RO);
514:                outValue.addDecimalColumn(C_VERSION_T_DOC_SYS, false, null);
515:                //
516:                ArrayList uniqueColumns = new ArrayList();
517:                uniqueColumns.add(C_DOC_SYS_RO_ID_T_DOC_SYS);
518:                uniqueColumns.add(C_VERSION_T_DOC_SYS);
519:                outValue.assignUnique(uniqueColumns);
520:
521:                return outValue;
522:            }
523:
524:            //
525:            public final static String T_DOC_SYS_DIR = "DOC_SYS_DIR";
526:            public final static String C_DOC_SYS_ID_T_DOC_SYS_DIR = "DOC_SYS_ID";
527:            public final static String C_GROUP_PATH_T_DOC_SYS_DIR = "GROUP_PATH";
528:            public final static String C_ACTUAL_NAME_T_DOC_SYS_DIR = "ACTUAL_NAME";
529:            public final static String C_ACTIVE_T_DOC_SYS_DIR = "ACTIVE";
530:
531:            public CreateStatement createDocSysDirTable() {
532:
533:                CreateStatement outValue = null;
534:
535:                //
536:                outValue = SystemStatement.newCreateStatement(T_DOC_SYS_DIR);
537:                //
538:                outValue.addIdColumn();
539:                outValue.addDecimalColumn(C_DOC_SYS_ID_T_DOC_SYS_DIR, false,
540:                        T_DOC_SYS);
541:                outValue.addSStringColumn(C_GROUP_PATH_T_DOC_SYS_DIR, false,
542:                        null);
543:                outValue.addSStringColumn(C_ACTUAL_NAME_T_DOC_SYS_DIR, false,
544:                        null);
545:                outValue.addBooleanColumn(C_ACTIVE_T_DOC_SYS_DIR, false, null);
546:                //
547:                ArrayList uniqueColumns = new ArrayList();
548:                uniqueColumns.add(C_DOC_SYS_ID_T_DOC_SYS_DIR);
549:                uniqueColumns.add(C_GROUP_PATH_T_DOC_SYS_DIR);
550:                outValue.assignUnique(uniqueColumns);
551:
552:                return outValue;
553:            }
554:
555:            //
556:            public final static String T_DOC_SYS_FILE = "DOC_SYS_FILE";
557:            public final static String C_DOC_SYS_DIR_ID_T_DOC_SYS_FILE = "DOC_SYS_DIR_ID";
558:            public final static String C_DOC_SYS_ID_T_DOC_SYS_FILE = "DOC_SYS_ID";
559:            public final static String C_GROUP_NAME_T_DOC_SYS_FILE = "GROUP_NAME";
560:            public final static String C_ACTUAL_NAME_T_DOC_SYS_FILE = "ACTUAL_NAME";
561:            public final static String C_CONTENT_T_DOC_SYS_FILE = "CONTENT";
562:            public final static String C_ACTIVE_T_DOC_SYS_FILE = "ACTIVE";
563:
564:            public CreateStatement createDocSysFileTable() {
565:
566:                CreateStatement outValue = null;
567:
568:                //
569:                outValue = SystemStatement.newCreateStatement(T_DOC_SYS_FILE);
570:                //
571:                outValue.addIdColumn();
572:                outValue.addDecimalColumn(C_DOC_SYS_DIR_ID_T_DOC_SYS_FILE,
573:                        false, T_DOC_SYS_DIR);
574:                outValue.addDecimalColumn(C_DOC_SYS_ID_T_DOC_SYS_FILE, false,
575:                        T_DOC_SYS);
576:                outValue.addSStringColumn(C_GROUP_NAME_T_DOC_SYS_FILE, false,
577:                        null);
578:                outValue.addSStringColumn(C_ACTUAL_NAME_T_DOC_SYS_FILE, false,
579:                        null);
580:                outValue.addBObjectColumn(C_CONTENT_T_DOC_SYS_FILE, null);
581:                outValue.addBooleanColumn(C_ACTIVE_T_DOC_SYS_FILE, false, null);
582:                //
583:                //ArrayList uniqueColumns = new ArrayList();
584:                //uniqueColumns.add(C_DOC_SYS_ID_T_DOC_SYS_FILE);
585:                //uniqueColumns.add(C_GROUP_NAME_T_DOC_SYS_FILE);
586:                //outValue.assignUnique(uniqueColumns);
587:
588:                return outValue;
589:            }
590:
591:            //
592:            public final static String T_DOC_ANNOTATION = "DOC_ANNOTATION";
593:            public final static String C_DOC_GROUP_ID_T_DOC_ANNOTATION = "DOC_GROUP_ID";
594:            public final static String C_CONTENT_T_DOC_ANNOTATION = "CONTENT";
595:
596:            public CreateStatement createDocAnnotationTable() {
597:
598:                CreateStatement outValue = null;
599:
600:                //
601:                outValue = SystemStatement.newCreateStatement(T_DOC_ANNOTATION);
602:                //
603:                outValue.addIdColumn();
604:                outValue.addDecimalColumn(C_DOC_GROUP_ID_T_DOC_ANNOTATION,
605:                        false, T_DOC_SYS_DIR);
606:                outValue.addBObjectColumn(C_CONTENT_T_DOC_ANNOTATION, null);
607:
608:                return outValue;
609:            }
610:
611:            //
612:            //public final static String T_DOCS = "DOCS";
613:            //public final static String C_DOCS_RO_ID_T_DOCS = "DOCS_RO_ID";
614:            ////public final static String C_WI_RO_ID_T_DOCS = "WI_RO_ID";
615:            ////public final static String C_DOC_GROUP_T_DOCS = "DOC_GROUP";
616:            //public final static String C_DOC_NAME_T_DOCS = "DOC_NAME";
617:            //public final static String C_CONTENT_T_DOCS = "CONTENT";
618:            //public final static String C_ACTIVE_T_DOCS = "ACTIVE";
619:            ////public final static String C_ANNOTATION_T_DOCS = "ANNOTATION";
620:            //
621:            //public CreateStatement createDocsTable() {
622:            //    
623:            //    CreateStatement outValue = null;
624:            //    
625:            //    //
626:            //    outValue = SystemStatement.newCreateStatement(T_DOCS);
627:            //    //
628:            //    outValue.addIdColumn();
629:            //    outValue.addDecimalColumn(C_DOCS_RO_ID_T_DOCS, false, T_DOCS_RO);
630:            //    //outValue.addSStringColumn(C_DOC_GROUP_T_DOCS, true, null);
631:            //    outValue.addSStringColumn(C_DOC_NAME_T_DOCS, true, null);
632:            //    outValue.addBObjectColumn(C_CONTENT_T_DOCS, null);
633:            //    outValue.addBooleanColumn(C_ACTIVE_T_DOCS, false, null);
634:            //    //outValue.addSStringColumn(C_ANNOTATION_T_DOC, true, null);
635:            //    
636:            //    return outValue;
637:            //}
638:
639:            //
640:            //public final static String T_DOC_ANNOTATIONS = "DOC_ANNOTATIONS";
641:            //public final static String C_DOCS_ID_T_DOC_ANNOTATIONS = "DOC_ID";
642:            //public final static String C_CONTENT_T_DOC_ANNOTATIONS = "CONTENT";
643:            //
644:            //public CreateStatement createDocAnnotationsTable() {
645:            //    
646:            //    CreateStatement outValue = null;
647:            //    
648:            //    //
649:            //    outValue = SystemStatement.newCreateStatement(T_DOC_ANNOTATIONS);
650:            //    //
651:            //    outValue.addIdColumn();
652:            //    outValue.addDecimalColumn(C_DOCS_ID_T_DOC_ANNOTATIONS, false, T_DOCS);
653:            //    outValue.addBObjectColumn(C_CONTENT_T_DOC_ANNOTATIONS, null);
654:            //    //outValue.addSStringColumn(C_DOC_GROUP_T_DOCS, true, null);
655:            //    //outValue.addSStringColumn(C_DOC_NAME_T_DOCS, true, null);
656:            //    //outValue.addBObjectColumn(C_CONTENT_T_DOCS, null);
657:            //    //outValue.addSStringColumn(C_ANNOTATION_T_DOC, true, null);
658:            //    
659:            //    return outValue;
660:            //}
661:
662:            //
663:            public final static String T_WDOC_MAP = "WDOC_MAP";
664:            public final static String C_WI_RO_ID_T_WDOC_MAP = "WI_RO_ID";
665:            public final static String C_WDOC_ID_T_WDOC_MAP = "WDOC_ID";
666:
667:            public CreateStatement createWdocMapTable() {
668:
669:                CreateStatement outValue = null;
670:
671:                //
672:                outValue = SystemStatement.newCreateStatement(T_WDOC_MAP);
673:                //
674:                outValue.addIdColumn();
675:                outValue
676:                        .addDecimalColumn(C_WI_RO_ID_T_WDOC_MAP, false, T_WI_RO);
677:                outValue.addDecimalColumn(C_WDOC_ID_T_WDOC_MAP, false,
678:                        T_DOC_SYS);
679:
680:                return outValue;
681:            }
682:
683:            //
684:            public final static String T_WTRIGGER = "WTRIGGER";
685:            public final static String C_WI_RO_ID_T_WT = "WI_RO_ID";
686:            public final static String C_XML_T_WT = "XML";
687:
688:            public CreateStatement createWtriggerTable() {
689:
690:                CreateStatement outValue = null;
691:
692:                //
693:                outValue = SystemStatement.newCreateStatement(T_WTRIGGER);
694:                //
695:                outValue.addIdColumn();
696:                outValue.addSeriesSequenceColumn();
697:                outValue.addDecimalColumn(C_WI_RO_ID_T_WT, false, T_WI_RO);
698:                outValue.addLStringColumn(C_XML_T_WT, null);
699:
700:                return outValue;
701:            }
702:
703:            //
704:            public final static String T_WI_ATTR = "WI_ATTR";
705:            public final static String C_WI_RO_ID_T_WI_ATTR = "WI_RO_ID";
706:            public final static String C_NAME_T_WI_ATTR = "NAME";
707:            public final static String C_TYPE_T_WI_ATTR = "TYPE";
708:            public final static String C_ACCESS_T_WI_ATTR = "ACCESS";
709:            public final static String C_SYSTEM_T_WI_ATTR = "SYSTEM";
710:            public final static String C_B_VALUE_T_WI_ATTR = "B_VALUE";
711:            public final static String C_S_VALUE_T_WI_ATTR = "S_VALUE";
712:            public final static String C_L_VALUE_T_WI_ATTR = "L_VALUE";
713:            public final static String C_D_VALUE_T_WI_ATTR = "D_VALUE";
714:            public final static String C_O_VALUE_T_WI_ATTR = "O_VALUE";
715:
716:            public CreateStatement createWiAttrTable() {
717:
718:                CreateStatement outValue = null;
719:
720:                //
721:                outValue = SystemStatement.newCreateStatement(T_WI_ATTR);
722:                //
723:                outValue.addIdColumn();
724:                outValue.addSeriesSequenceColumn();
725:                outValue.addDecimalColumn(C_WI_RO_ID_T_WI_ATTR, false, T_WI_RO);
726:                outValue.addSStringColumn(C_NAME_T_WI_ATTR, false, null);
727:                outValue.addSStringColumn(C_TYPE_T_WI_ATTR, false, null);
728:                outValue.addBooleanColumn(C_ACCESS_T_WI_ATTR, false, null);
729:                outValue.addBooleanColumn(C_SYSTEM_T_WI_ATTR, false, null);
730:                outValue.addBooleanColumn(C_B_VALUE_T_WI_ATTR, true, null);
731:                outValue.addSStringColumn(C_S_VALUE_T_WI_ATTR, true, null);
732:                outValue.addLStringColumn(C_L_VALUE_T_WI_ATTR, null);
733:                outValue.addDecimalColumn(C_D_VALUE_T_WI_ATTR, true, null);
734:                outValue.addBObjectColumn(C_O_VALUE_T_WI_ATTR, null);
735:
736:                return outValue;
737:            }
738:
739:            //
740:            public final static String T_WI_ATTR_SET = "WI_ATTR_SET";
741:            public final static String C_WI_RO_ID_T_WI_ATTR_SET = "WI_RO_ID";
742:            public final static String C_WI_ATTR_ID_T_WI_ATTR_SET = "WI_ATTR_ID";
743:
744:            public CreateStatement createWiAttrSetTable() {
745:
746:                CreateStatement outValue = null;
747:
748:                //
749:                outValue = SystemStatement.newCreateStatement(T_WI_ATTR_SET);
750:                //
751:                outValue.addIdColumn();
752:                outValue.addDecimalColumn(C_WI_RO_ID_T_WI_ATTR_SET, false,
753:                        T_WI_RO);
754:                outValue.addDecimalColumn(C_WI_ATTR_ID_T_WI_ATTR_SET, false,
755:                        T_WI_ATTR);
756:
757:                return outValue;
758:            }
759:
760:            //
761:            public final static String T_WI = "WI";
762:            public final static String C_WI_RO_ID_T_WI = "WI_RO_ID";
763:            public final static String C_AUDIT_ID_T_WI = "AUDIT_ID";
764:            public final static String C_UPDATE_CODE_T_WI = "UPDATE_CODE";
765:
766:            public CreateStatement createWiTable() {
767:
768:                CreateStatement outValue = null;
769:
770:                //
771:                outValue = SystemStatement.newCreateStatement(T_WI);
772:                //
773:                outValue.addIdColumn();
774:                outValue.addDecimalColumn(C_WI_RO_ID_T_WI, false, T_WI_RO);
775:                outValue.addDecimalColumn(C_AUDIT_ID_T_WI, false, T_AUDIT);
776:                outValue.addDecimalColumn(C_UPDATE_CODE_T_WI, false, null);
777:                //
778:                ArrayList updateCodeAndWiReadOnlyIdUnique = new ArrayList();
779:                updateCodeAndWiReadOnlyIdUnique.add(C_WI_RO_ID_T_WI);
780:                updateCodeAndWiReadOnlyIdUnique.add(C_UPDATE_CODE_T_WI);
781:                outValue.assignUnique(updateCodeAndWiReadOnlyIdUnique);
782:
783:                return outValue;
784:            }
785:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.