01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.core.dao.ojb;
17:
18: import org.apache.ojb.broker.Identity;
19: import org.apache.ojb.broker.core.IdentityFactoryImpl;
20: import org.apache.ojb.broker.core.proxy.IndirectionHandlerCGLIBImpl;
21: import org.kuali.core.dao.PersistenceDao;
22:
23: public class PersistenceDaoOjb extends PlatformAwareDaoBaseOjb
24: implements PersistenceDao {
25:
26: /**
27: * @see org.kuali.core.dao.PersistenceDao#clearCache()
28: */
29: public void clearCache() {
30: getPersistenceBroker(true).clearCache();
31: }
32:
33: /**
34: * @see org.kuali.core.dao.PersistenceDao#resolveProxy(java.lang.Object)
35: */
36: public Object resolveProxy(Object o) {
37: Identity ident = new IdentityFactoryImpl(
38: getPersistenceBroker(true)).buildIdentity(o);
39: IndirectionHandlerCGLIBImpl ih = new IndirectionHandlerCGLIBImpl(
40: getPersistenceBroker(true).getPBKey(), ident);
41: return ih.getRealSubject();
42: }
43:
44: /**
45: * @see org.kuali.core.dao.PersistenceDao#retrieveAllReferences(java.lang.Object)
46: */
47: public void retrieveAllReferences(Object o) {
48: getPersistenceBroker(true).retrieveAllReferences(o);
49: }
50:
51: /**
52: * @see org.kuali.core.dao.PersistenceDao#retrieveReference(java.lang.Object, java.lang.String)
53: */
54: public void retrieveReference(Object o, String referenceName) {
55: getPersistenceBroker(true).retrieveReference(o, referenceName);
56: }
57:
58: }
|