1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.dao.impl;
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.apache.ojb.broker.core.proxy.ProxyHelper;
22 import org.kuali.rice.core.framework.persistence.ojb.dao.PlatformAwareDaoBaseOjb;
23 import org.kuali.rice.krad.dao.PersistenceDao;
24
25 public class PersistenceDaoOjb extends PlatformAwareDaoBaseOjb implements PersistenceDao {
26
27
28
29
30 public void clearCache() {
31 getPersistenceBroker(true).clearCache();
32 }
33
34
35
36
37 public Object resolveProxy(Object o) {
38 Identity ident = new IdentityFactoryImpl(getPersistenceBroker(true)).buildIdentity(o);
39 IndirectionHandlerCGLIBImpl ih = new IndirectionHandlerCGLIBImpl(getPersistenceBroker(true).getPBKey(), ident);
40 return ih.getRealSubject();
41 }
42
43
44
45
46 public void retrieveAllReferences(Object o) {
47 getPersistenceBroker(true).retrieveAllReferences(o);
48 }
49
50
51
52
53 public void retrieveReference(Object o, String referenceName) {
54 getPersistenceBroker(true).retrieveReference(o, referenceName);
55 }
56
57
58
59
60
61
62 public boolean isProxied(Object object) {
63 return ProxyHelper.isProxy(object);
64 }
65
66 }