Source Code Cross Referenced for DelegatingStoreManager.java in  » Database-ORM » openjpa » org » apache » openjpa » kernel » 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 » openjpa » org.apache.openjpa.kernel 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one
003:         * or more contributor license agreements.  See the NOTICE file
004:         * distributed with this work for additional information
005:         * regarding copyright ownership.  The ASF licenses this file
006:         * to you under the Apache License, Version 2.0 (the
007:         * "License"); you may not use this file except in compliance
008:         * with the License.  You may obtain a copy of the License at
009:         *
010:         * http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         * Unless required by applicable law or agreed to in writing,
013:         * software distributed under the License is distributed on an
014:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         * KIND, either express or implied.  See the License for the
016:         * specific language governing permissions and limitations
017:         * under the License.    
018:         */
019:        package org.apache.openjpa.kernel;
020:
021:        import java.util.BitSet;
022:        import java.util.Collection;
023:
024:        import org.apache.openjpa.lib.rop.ResultObjectProvider;
025:        import org.apache.openjpa.meta.ClassMetaData;
026:        import org.apache.openjpa.meta.FieldMetaData;
027:
028:        /**
029:         * Base class for store manager decorators that delegate to another
030:         * store manager for some operations.
031:         *
032:         * @author Abe White
033:         */
034:        public abstract class DelegatingStoreManager implements  StoreManager {
035:
036:            private final StoreManager _store;
037:            private final DelegatingStoreManager _del;
038:
039:            /**
040:             * Constructor. Supply delegate.
041:             */
042:            public DelegatingStoreManager(StoreManager store) {
043:                _store = store;
044:                if (store instanceof  DelegatingStoreManager)
045:                    _del = (DelegatingStoreManager) _store;
046:                else
047:                    _del = null;
048:            }
049:
050:            /**
051:             * Return the wrapped store manager.
052:             */
053:            public StoreManager getDelegate() {
054:                return _store;
055:            }
056:
057:            /**
058:             * Return the base underlying native store manager.
059:             */
060:            public StoreManager getInnermostDelegate() {
061:                return (_del == null) ? _store : _del.getInnermostDelegate();
062:            }
063:
064:            public int hashCode() {
065:                return getInnermostDelegate().hashCode();
066:            }
067:
068:            public boolean equals(Object other) {
069:                if (other == this )
070:                    return true;
071:                if (other instanceof  DelegatingStoreManager)
072:                    other = ((DelegatingStoreManager) other)
073:                            .getInnermostDelegate();
074:                return getInnermostDelegate().equals(other);
075:            }
076:
077:            public void setContext(StoreContext ctx) {
078:                _store.setContext(ctx);
079:            }
080:
081:            public void beginOptimistic() {
082:                _store.beginOptimistic();
083:            }
084:
085:            public void rollbackOptimistic() {
086:                _store.rollbackOptimistic();
087:            }
088:
089:            public void begin() {
090:                _store.begin();
091:            }
092:
093:            public void commit() {
094:                _store.commit();
095:            }
096:
097:            public void rollback() {
098:                _store.rollback();
099:            }
100:
101:            public boolean exists(OpenJPAStateManager sm, Object context) {
102:                return _store.exists(sm, context);
103:            }
104:
105:            public boolean syncVersion(OpenJPAStateManager sm, Object context) {
106:                return _store.syncVersion(sm, context);
107:            }
108:
109:            public boolean initialize(OpenJPAStateManager sm, PCState state,
110:                    FetchConfiguration fetch, Object context) {
111:                return _store.initialize(sm, state, fetch, context);
112:            }
113:
114:            public boolean load(OpenJPAStateManager sm, BitSet fields,
115:                    FetchConfiguration fetch, int lockLevel, Object context) {
116:                return _store.load(sm, fields, fetch, lockLevel, context);
117:            }
118:
119:            public Collection loadAll(Collection sms, PCState state, int load,
120:                    FetchConfiguration fetch, Object context) {
121:                return _store.loadAll(sms, state, load, fetch, context);
122:            }
123:
124:            public void beforeStateChange(OpenJPAStateManager sm,
125:                    PCState fromState, PCState toState) {
126:                _store.beforeStateChange(sm, fromState, toState);
127:            }
128:
129:            public Collection flush(Collection sms) {
130:                return _store.flush(sms);
131:            }
132:
133:            public boolean assignObjectId(OpenJPAStateManager sm,
134:                    boolean preFlush) {
135:                return _store.assignObjectId(sm, preFlush);
136:            }
137:
138:            public boolean assignField(OpenJPAStateManager sm, int field,
139:                    boolean preFlush) {
140:                return _store.assignField(sm, field, preFlush);
141:            }
142:
143:            public Class getManagedType(Object oid) {
144:                return _store.getManagedType(oid);
145:            }
146:
147:            public Class getDataStoreIdType(ClassMetaData meta) {
148:                return _store.getDataStoreIdType(meta);
149:            }
150:
151:            public Object copyDataStoreId(Object oid, ClassMetaData meta) {
152:                return _store.copyDataStoreId(oid, meta);
153:            }
154:
155:            public Object newDataStoreId(Object oidVal, ClassMetaData meta) {
156:                return _store.newDataStoreId(oidVal, meta);
157:            }
158:
159:            public Object getClientConnection() {
160:                return _store.getClientConnection();
161:            }
162:
163:            public void retainConnection() {
164:                _store.retainConnection();
165:            }
166:
167:            public void releaseConnection() {
168:                _store.releaseConnection();
169:            }
170:
171:            public ResultObjectProvider executeExtent(ClassMetaData meta,
172:                    boolean subclasses, FetchConfiguration fetch) {
173:                return _store.executeExtent(meta, subclasses, fetch);
174:            }
175:
176:            public StoreQuery newQuery(String language) {
177:                return _store.newQuery(language);
178:            }
179:
180:            public FetchConfiguration newFetchConfiguration() {
181:                return _store.newFetchConfiguration();
182:            }
183:
184:            public void close() {
185:                _store.close();
186:            }
187:
188:            public int compareVersion(OpenJPAStateManager state, Object v1,
189:                    Object v2) {
190:                return _store.compareVersion(state, v1, v2);
191:            }
192:
193:            public Seq getDataStoreIdSequence(ClassMetaData forClass) {
194:                return _store.getDataStoreIdSequence(forClass);
195:            }
196:
197:            public Seq getValueSequence(FieldMetaData fmd) {
198:                return _store.getValueSequence(fmd);
199:            }
200:
201:            public boolean cancelAll() {
202:                return _store.cancelAll();
203:            }
204:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.