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


001:        /**
002:         *  Objective Database Abstraction Layer (ODAL)
003:         *  Copyright (c) 2004, The ODAL Development Group
004:         *  All rights reserved.
005:         *  For definition of the ODAL Development Group please refer to LICENCE.txt file
006:         *
007:         *  Distributable under LGPL license.
008:         *  See terms of license at gnu.org.
009:         */package com.completex.objective.components.persistency;
010:
011:        import com.completex.objective.components.persistency.core.Join;
012:
013:        /**
014:         * Describes compound persistent object - one that is based on array of other 
015:         * persistent objects
016:         * 
017:         * @author Gennady Krizhevsky
018:         */
019:        public interface Compound extends PersistentObjectFactory {
020:
021:            public static final ImplicitJoinMode INNER = ImplicitJoinMode.INNER;
022:            public static final ImplicitJoinMode OUTER = ImplicitJoinMode.OUTER;
023:            public static final ImplicitJoinMode NONE = ImplicitJoinMode.NONE;
024:
025:            /**
026:             * Returns number of compound etries
027:             * 
028:             * @return number of compound etries
029:             */
030:            int compoundSize();
031:
032:            /**
033:             * Sets <tt>PersistentObject</tt> - compound entry at specific index
034:             * 
035:             * @param index index which entry to be set
036:             * @param persistentObject compound entry 
037:             */
038:            void compoundEntry(int index, PersistentObject persistentObject);
039:
040:            /**
041:             * Returns <tt>PersistentObject</tt> - compound entry at specific index
042:             * 
043:             * @param index index which entry to be returned
044:             * @return <tt>PersistentObject</tt> - compound entry 
045:             * @throws IndexOutOfBoundsException if there is no entry at requested index 
046:             */
047:            PersistentObject compoundEntry(int index);
048:
049:            /**
050:             * Returns <tt>PersistentObject []</tt> - compound entries of this object
051:             * 
052:             * @return <tt>PersistentObject []</tt> - compound entries of this object
053:             */
054:            PersistentObject[] compoundEntries();
055:
056:            /**
057:             * Returns true if this is this type of object can be the 1st object of PersistentObject[] 
058:             * of compound PersistentObject.
059:             * 
060:             * @return true if this is the 1st object in PersistentObject[] of compound PersistentObject
061:             */
062:            boolean selfReferencing();
063:
064:            /**
065:             * Returns implicit join mode
066:             * 
067:             * @see ImplicitJoinMode
068:             * @return implicit join mode
069:             */
070:            ImplicitJoinMode implicitJoinMode();
071:
072:            /**
073:             * This method will be called on compound object to create default
074:             * join
075:             * @return created join
076:             */
077:            Join join();
078:
079:            /**
080:             * This method will create join implicitely based on the mutual references
081:             * It is more coarse than joinImplicitely(Join.Type [] joinTypes) one
082:             * since there are only 3 possibilities: OUTER, when all the objects with index > 0
083:             * join the [0] one with left outer join, and INNER, when all the objects are joined
084:             * with INNER join.
085:             * @return created join
086:             */
087:            Join joinImplicitely(Compound.ImplicitJoinMode implicitJoinMode);
088:
089:            /**
090:             * This method will create join implicitely based on the mutual references
091:             * To run it all the persistentObjects have to exist.
092:             * As a result, all the objects with index > 0 will joing the one with index 0
093:             * @return created join
094:             */
095:            Join joinImplicitely(Join.Type[] joinTypes);
096:
097:            /**
098:             * Populate compound Entry By Join
099:             *
100:             * @param indexFrom - entry index of the master <tt>PersistentObject</tt>
101:             * @param indexTo   - entry index of the slave <tt>PersistentObject</tt>
102:             */
103:            void populateCompoundEntryByJoin(int indexFrom, int indexTo);
104:
105:            /**
106:             * Populates all entries by join
107:             */
108:            void populateCompoundEntries();
109:
110:            /**
111:             * Returns true if cascade insert is to be performed based on entries joins
112:             * 
113:             * @return true if cascade insert is to be performed based on entries joins
114:             */
115:            boolean compoundCascadeInsert();
116:
117:            /**
118:             * Returns true if cascade delete is to be performed based on entries joins
119:             * 
120:             * @return true if cascade delete is to be performed based on entries joins
121:             */
122:            boolean compoundCascadeDelete();
123:
124:            /**
125:             * Returns true if cascade insert is to be performed based on entries joins
126:             * for entry specified by index parameter
127:             * 
128:             * @param index
129:             * @return true if cascade insert is to be performed based on entries joins
130:             * for entry specified by index parameter
131:             */
132:            boolean compoundCascadeInsert(int index);
133:
134:            /**
135:             * Sets flag to indicate if cascade insert is to be performed based on entries joins
136:             * for entry specified by index parameter
137:             *  
138:             * @param index
139:             * @param compoundCascadeInsert flag to indicate if cascade insert is to be performed based on entries joins
140:             * for entry specified by index parameter
141:             */
142:            void compoundCascadeInsert(int index, boolean compoundCascadeInsert);
143:
144:            /**
145:             * Returns true if cascade delete is to be performed based on entries joins
146:             * for entry specified by index parameter
147:             * 
148:             * @param index
149:             * @return true if cascade delete is to be performed based on entries joins
150:             * for entry specified by index parameter
151:             */
152:            boolean compoundCascadeDelete(int index);
153:
154:            /**
155:             * Sets flag to indicate if cascade delete is to be performed based on entries joins
156:             * for entry specified by index parameter
157:             *  
158:             * @param index
159:             * @param compoundCascadeDelete flag to indicate if cascade delete is to be performed based on entries joins
160:             * for entry specified by index parameter
161:             */
162:            void compoundCascadeDelete(int index, boolean compoundCascadeDelete);
163:
164:            /**
165:             * Returns true if this object has been modified
166:             *  
167:             * @return true if this object has been modified
168:             */
169:            boolean dirty();
170:
171:            /**
172:             * Joins all the compound entries according to Compound.ImplicitJoinMode passed
173:             *
174:             * @param implicitJoinMode
175:             * @return new Join
176:             */
177:            Join join(ImplicitJoinMode implicitJoinMode);
178:
179:            /**
180:             * Sets implicitJoinMode 
181:             *
182:             * @param implicitJoinMode
183:             */
184:            void implicitJoinMode(ImplicitJoinMode implicitJoinMode);
185:
186:            /**
187:             * Type of implicit (based on primary-foreign key relationship) join
188:             */
189:            public static class ImplicitJoinMode {
190:
191:                public static final ImplicitJoinMode INNER = new ImplicitJoinMode(
192:                        Join.INNER.toString());
193:                public static final ImplicitJoinMode OUTER = new ImplicitJoinMode(
194:                        Join.LEFT.toString());
195:                public static final ImplicitJoinMode NONE = new ImplicitJoinMode(
196:                        "NONE");
197:
198:                private String name;
199:
200:                private ImplicitJoinMode(String name) {
201:                    this .name = name;
202:                }
203:
204:                public String toString() {
205:                    return name;
206:                }
207:            }
208:
209:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.