Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
PersistenceDaoOjb |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2007 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
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.rice.kns.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.kuali.rice.kns.dao.PersistenceDao; | |
22 | ||
23 | 0 | public class PersistenceDaoOjb extends PlatformAwareDaoBaseOjb implements PersistenceDao { |
24 | ||
25 | /** | |
26 | * @see org.kuali.rice.kns.dao.PersistenceDao#clearCache() | |
27 | */ | |
28 | public void clearCache() { | |
29 | 0 | getPersistenceBroker(true).clearCache(); |
30 | 0 | } |
31 | ||
32 | /** | |
33 | * @see org.kuali.rice.kns.dao.PersistenceDao#resolveProxy(java.lang.Object) | |
34 | */ | |
35 | public Object resolveProxy(Object o) { | |
36 | 0 | Identity ident = new IdentityFactoryImpl(getPersistenceBroker(true)).buildIdentity(o); |
37 | 0 | IndirectionHandlerCGLIBImpl ih = new IndirectionHandlerCGLIBImpl(getPersistenceBroker(true).getPBKey(), ident); |
38 | 0 | return ih.getRealSubject(); |
39 | } | |
40 | ||
41 | /** | |
42 | * @see org.kuali.rice.kns.dao.PersistenceDao#retrieveAllReferences(java.lang.Object) | |
43 | */ | |
44 | public void retrieveAllReferences(Object o) { | |
45 | 0 | getPersistenceBroker(true).retrieveAllReferences(o); |
46 | 0 | } |
47 | ||
48 | /** | |
49 | * @see org.kuali.rice.kns.dao.PersistenceDao#retrieveReference(java.lang.Object, java.lang.String) | |
50 | */ | |
51 | public void retrieveReference(Object o, String referenceName) { | |
52 | 0 | getPersistenceBroker(true).retrieveReference(o, referenceName); |
53 | 0 | } |
54 | ||
55 | } |