View Javadoc
1   /**
2    * Copyright 2005-2014 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.krad.service.impl;
17  
18  import org.kuali.rice.krad.bo.PersistableBusinessObject;
19  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
20  import org.kuali.rice.krad.bo.PersistableBusinessObjectExtension;
21  import org.kuali.rice.krad.service.LegacyAppFrameworkAdapterService;
22  import org.kuali.rice.krad.service.LegacyDataAdapter;
23  
24  /**
25   *   @see org.kuali.rice.krad.service.LegacyAppFrameworkAdapterService
26   */
27  @Deprecated
28  public class LegacyAppFrameworkAdapterServiceImpl implements LegacyAppFrameworkAdapterService{
29  
30      private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(LegacyAppFrameworkAdapterServiceImpl.class);
31  
32      private LegacyDataAdapter legacyDataAdapter;
33  
34      public LegacyDataAdapter getLegacyDataAdapter() {
35          return legacyDataAdapter;
36      }
37  
38      public void setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter) {
39          this.legacyDataAdapter = legacyDataAdapter;
40      }
41      @Deprecated
42      public void refresh(PersistableBusinessObjectBase persistableBusinessObjectBase) {
43          getLegacyDataAdapter().retrieveNonKeyFields(persistableBusinessObjectBase);
44      }
45      @Deprecated
46      public void refreshNonUpdateableReferences(PersistableBusinessObjectBase persistableBusinessObjectBase) {
47          getLegacyDataAdapter().refreshAllNonUpdatingReferences(persistableBusinessObjectBase);
48      }
49      @Deprecated
50      public void retrieveReferenceObject(PersistableBusinessObject persistableBusinessObject, String referenceObjectName) {
51          getLegacyDataAdapter().retrieveReferenceObject(persistableBusinessObject,referenceObjectName);
52      }
53  
54      @Override
55      public boolean isPersistable(Class<?> objectClass) {
56          return getLegacyDataAdapter().isPersistable(objectClass);
57      }
58  
59      @Override
60      public PersistableBusinessObjectExtension getExtension(
61              Class<? extends PersistableBusinessObject> businessObjectClass) throws InstantiationException, IllegalAccessException {
62          return (PersistableBusinessObjectExtension) getLegacyDataAdapter().getExtension(businessObjectClass);
63      }
64  
65      @Override
66      public void refreshReferenceObject(PersistableBusinessObject businessObject, String referenceObjectName) {
67          getLegacyDataAdapter().refreshReferenceObject(businessObject, referenceObjectName);
68      }
69  
70  }