View Javadoc
1   /**
2    * Copyright 2005-2016 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.bo;
17  
18  import org.kuali.rice.core.api.mo.ModelObjectBasic;
19  
20  /**
21   * Interface for classes that act as a business object within the framework
22   *
23   * <p>
24   * Business objects are special objects to the Rice framework that indicate an object has certain features
25   * (like refresh). Most business objects are persistable, see @{link PersistableBusinessObject},
26   * which means Rice can provide handle the CRUD operations performed on the object. In addition, metadata from the
27   * ORM layer will be available on these objects that is consumed by the framework to enable features.
28   * </p>
29   *
30   * <p>
31   * Business objects are a special kind of data object within the system. A data object is just a general object that
32   * provides data within the system and can be used to back the user interfaces. In general, how the system doesn't
33   * know anything about how data objects are built (for example they could come from services or some other mechanism).
34   * Make a data object implement BusinessObject causes the system to make assumptions regarding the handling of that
35   * object.
36   * </p>
37   *
38   * @author Kuali Rice Team (rice.collab@kuali.org)
39   * @deprecated use new KRAD Data framework {@link org.kuali.rice.krad.data.DataObjectService}
40   */
41  @Deprecated
42  public interface BusinessObject extends ModelObjectBasic {
43  
44      /**
45       * Invoked to refresh business objects related to the parent based on their key field values
46       *
47       * <p>
48       * During processing (for example accepting user input) the field values that participate in relationships can
49       * become out of sync with the related business objects (for example: suppose our business object has a property
50       * name bookId with a related object of type Book that contains the id property. If the user changes the value
51       * for the bookId property, our id property on the related book and the associated information is still pointing
52       * to the previous book id). This method is invoked to indicate the related objects should be refreshed based
53       * on their related keys. For @{link PersistableBusinessObject} implementations, most refreshes can be handled
54       * by the ORM tool
55       * </p>
56       */
57      public abstract void refresh();
58  }