Source Code Cross Referenced for LifeCycleController.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.ocache.OdalCache;
012:        import com.completex.objective.components.ocache.OdalKeyFactory;
013:
014:        import java.util.Collection;
015:
016:        /**
017:         * Life cycle callback
018:         *
019:         * @author Gennady Krizhevsky
020:         */
021:        public interface LifeCycleController {
022:            public static final NullLifeCycleController NULL_LIFE_CYCLE_CONTROLLER = new NullLifeCycleController();
023:
024:            /**
025:             * Called after persistentObject Select. This call corresponds to record level 
026:             * select as opposed to <t>afterCompositeSelect</t> method that is called 
027:             * after parent record with all the subtrees si retrieved.
028:             *
029:             * @param persistentObject PersistentObject retrieved
030:             */
031:            void afterSelect(AbstractPersistentObject persistentObject);
032:
033:            /**
034:             * Called before persistentObject insert. This call corresponds to record level 
035:             * insert as opposed to <t>beforeCompositeInsert</t> method which is called before 
036:             * any of the <t>beforeInsert</t> ones. 
037:             *
038:             * @param persistentObject PersistentObject being inserted
039:             */
040:            void beforeInsert(PersistentObject persistentObject);
041:
042:            /**
043:             * Called after persistentObject insert
044:             *
045:             * @param persistentObject PersistentObject being inserted
046:             */
047:            void afterInsert(PersistentObject persistentObject);
048:
049:            /**
050:             * Called before persistentObject update
051:             *
052:             * @param persistentObject PersistentObject being updated
053:             */
054:            void beforeUpdate(PersistentObject persistentObject);
055:
056:            /**
057:             * Called after persistentObject update
058:             *
059:             * @param persistentObject PersistentObject being updated
060:             */
061:            void afterUpdate(PersistentObject persistentObject);
062:
063:            /**
064:             * Called before persistentObject delete
065:             *
066:             * @param persistentObject PersistentObject being deleted
067:             */
068:            void beforeDelete(PersistentObject persistentObject);
069:
070:            /**
071:             * Called after persistentObject delete
072:             *
073:             * @param persistentObject PersistentObject being deleted
074:             */
075:            void afterDelete(PersistentObject persistentObject);
076:
077:            /**
078:             * Concrete interpretation is up to specific persistency implementation
079:             *
080:             * @return Object[] parameters
081:             */
082:            Object[] getParameters();
083:
084:            /**
085:             * Concrete interpretation is up to specific persistency implementation
086:             *
087:             * @param parameters Object[] parameters
088:             */
089:            void setParameters(Object[] parameters);
090:
091:            /**
092:             * Factory method. Creates new LifeCycleController instance that may have some
093:             * attributes inherited from this one. 
094:             *
095:             * @return new LifeCycleController instance
096:             */
097:            LifeCycleController newLifeCycleInstance();
098:
099:            /**
100:             * Cache name is used by Persistency implementation to retrieve specified cache from
101:             * the cache factory if one is set for the Persistency instance.
102:             * If cache factory is not set and getCache() returns null then exeption is thrown.
103:             *
104:             * @return cache name
105:             * @throws com.completex.objective.components.OdalRuntimeException If cache factory is not set and getCache() returns null.
106:             */
107:            String getCacheName();
108:
109:            OdalCache getCache();
110:
111:            OdalKeyFactory getKeyFactory();
112:
113:            /**
114:             * Called before parent record with all the subtrees inserted.
115:             * @param persistentObject persistent object to be inserted
116:             */
117:            void beforeCompositeInsert(PersistentObject persistentObject);
118:
119:            /**
120:             * Called after parent record with all the subtrees si retrieved.
121:             * @param collection
122:             */
123:            void afterCompositeSelect(Collection collection);
124:
125:            /**
126:             * Null implementation
127:             */
128:            static class NullLifeCycleController implements  LifeCycleController {
129:                public void afterSelect(
130:                        AbstractPersistentObject persistentObject) {
131:                }
132:
133:                public void beforeInsert(PersistentObject persistentObject) {
134:                }
135:
136:                public void afterInsert(PersistentObject persistentObject) {
137:                }
138:
139:                public void beforeUpdate(PersistentObject persistentObject) {
140:                }
141:
142:                public void afterUpdate(PersistentObject persistentObject) {
143:                }
144:
145:                public void beforeDelete(PersistentObject persistentObject) {
146:                }
147:
148:                public void afterDelete(PersistentObject persistentObject) {
149:                }
150:
151:                public Object[] getParameters() {
152:                    return new Object[0];
153:                }
154:
155:                public void setParameters(Object[] parameters) {
156:                }
157:
158:                public LifeCycleController newLifeCycleInstance() {
159:                    return this ;
160:                }
161:
162:                public Object clone() throws CloneNotSupportedException {
163:                    return this ;
164:                }
165:
166:                public String getCacheName() {
167:                    return null;
168:                }
169:
170:                public OdalCache getCache() {
171:                    return null;
172:                }
173:
174:                public OdalKeyFactory getKeyFactory() {
175:                    return null;
176:                }
177:
178:                public void beforeCompositeInsert(
179:                        PersistentObject persistentObject) {
180:                }
181:
182:                public void afterCompositeSelect(Collection collection) {
183:                }
184:
185:            }
186:
187:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.